prefer binary eggs which satisfy dependencies over source eggs which are even newer #1233
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#1233
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently if the zetuptoolz-based build system finds both a binary egg (for the current platform that it is building on) and a source egg, and both of them satisfy the dependency requirement, it will choose the one with the highest version number.
This is a serious problem in practice because, for example, if we have built and hosted dozens of binary eggs of zfec for many different combinations of platform and Python version, and then a newer source-code distribution of zfec is uploaded to PyPI, then the build system will no longer try to use any of those binary eggs and instead use the newer source distribution exclusively, which will fail on platforms that don't have a C compiler and Python header files present.
To fix this, change the logic in zetuptoolz to prefer a binary egg, provided that it is for your platform and Python version and satisfies the dependency requirement, over a source distribution.
comment on a different ticket about one of the (very numerous) times that this has caused trouble for a user:
(@@http://tahoe-lafs.org/trac/tahoe-lafs/ticket/773#comment:-1@@)
bug report against setuptools:
http://bugs.python.org/setuptools/issue83
David-Sarah says we shouldn't try changing setuptools/zetuptoolz at the last minute, so instead of doing this ticket for v1.8.1, we're just going to do the time-consuming but predictable work of building and hosting binary eggs for all platforms that we want to support.
Replying to zooko:
Having seen the scale of the problem in generating all those binary eggs, zooko and I have had second thoughts about that. I have a patch to zetuptoolz, and zooko has a possible test.
Attachment zetuptoolz-prefer-platform-specific-dists.darcs.patch (15949 bytes) added
bundled zetuptools: prefer platform-specific dists to platform-independent ones. refs #1233
Attachment test-prefer-bdists.darcs.patch (17233 bytes) added
Attachment zetuptoolz-debugprints.diff.patch (4733 bytes) added
In changeset:306ec02c1d2946b2:
There is now a deterministic test of this behavior, added in changeset:59dcd5014dcb440a. You can run it locally with
python misc/build_helpers/test-with-fake-dists.py
. Unfortunately it just skips the test if a satisfying version ofpycryptopp
is already installed. I couldn't figure out how to test it in that case.If a satisfying version of
pycryptopp
is not already installed, then it will test this behavior and either raise an exception saying that the build system attempted to build a fake "pycryptopp v9.9.99" from source package (so it failed the test) or it will pass saying that it used a fake "pycryptopp 0.5.24" from binary package.Looking at our buildslaves, all of ones working well enough to run the test already have pycryptopp installed:
I just manually removed pycryptopp from zomp and rebuilt build #213 to yield build #214:
Hey! Same behavior. Oh, silly me! pycryptopp is being built and stored in
./support
by thebuild
step if it isn't already present, so when the latertest-with-fake-dists
step happens it is always there! I will change the buildmaster config to dowith-with-fake-dists
first and see if that shows us something useful.Great! Some of the buildslaves don't have pycryptopp installed and so we get a demonstration of issue #1233 on them. If we commit a patch that fixes #1233 then all of these should go from red to green:
These ones have a sufficient version of pycryptopp and so are not really testing #1233:
These ones I went to bed before they finished so at the time of this writing I don't knowL
All of the red steps
test-with-fake-dists
on our Supported Builders or all builders should go green when we fix this.It would be great if someone else would try to hack zetuptoolz to fix this. If they don't, I will try.
In [4832/ticket1233]:
This is fixed by changeset:a1cef915fd689308, changeset:a44330dfeef23757, changeset:b4c14421f7c2f25a, changeset:8fef75851181ce79 on the source:ticket1233 branch! Compare before and after those four patches.
These patches also make a related improvement to behavior: do not download a distribution from a remote server if a distribution already present locally would suffice.
Please review! :-)
By the way, here is the issue ticket in the Distribute project:
http://bitbucket.org/tarek/distribute/issue/127/prefer-v141-in-binary-egg-format-over-v145
Looks like there are still some unexplained buildslave failures on this step, so not ready for review yet.
Replying to zooko:
However, they always look on remote servers to see what distributions are available, before choosing the local one. It shouldn't be necessary even to look remotely in that case. But fixing that would be part of #1220 (or the longer-term project of replacing our use of setuptools).
Replying to davidsarah:
Let's see...
Both of them exhibit the same error message:
and
Now what do these two have in common that the rest of the buildslaves, including their brother lucid-amd64 don't?
The answer seems to be that they have foolscap-0.4.2 installed, as shown by
flappclient --version
in their show-tool-versions steps. The other buildslaves, which don't hit this error, either have no foolscap installed at all or have a foolscap installed which is >= 0.5.1.Still investigating...
Hm, that
VersionConflict
looks kind of like the problem in #1190. Could that have regressed somehow but only with regard to foolscap? Could it have something to do with the "extra requirement"secure_connections
that aren't used in our other dependencies? That fix was suppoesd to be verfied by these tests: changeset:390c40cd8ce1e579, [0101030034303-93fa1-0267f4ed3c9014099eb2c9b4d8e43724d7ff85e1], changeset:c3b1bca95450ae40.Huh-oh, if I change the test suite that source:trunk/misc/build_helpers/test-with-fake-pkg.py@4801 uses to test from
allmydata.test.test_base62
(chosen because it does little) toallmydata.test.test_backupdb
(which imports pycryptopp) then test-with-fake-pkg.py fails! On my Mac OS 10.6. This is a regression, because it worked back when we committed it to trunk!I'll attach a darcs patch which changes
test-with-fake-pkg
to usetest_backupdb
...Attachment test-with-fake-pkg-improvement.darcs.patch (20976 bytes) added
Okay let's move further discussion of this
VersionConflict
over to http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1190#comment:38 .I kind of suspect that the problems with the
VersionConflict
aren't actually caused by the patches in this ticket, but are somehow being triggered by thetest-with-fake-dists
step. Perhaps we don't see thisVersionConflict
on buildbot of current trunk merely because thetest-with-fake-dists
step ends early on trunk when it gets an exception from trying to build the fakepycryptopp-9.9.99
. If we, for example, hacked the fakepycryptopp-9.9.99
so that it stopped raising an exception, thus allowingtest-with-fake-dists
to run to the end on trunk, would we get the sameVersionConflict
on "Brian ubuntu-i386 linode" and "Shawn ubuntu-amd64"?The issue with the
VersionConflict
with foolscap is fixed by changeset:50f8c37a2b0049a5 (on source:ticket1233).The buildbot is nicely green now with
&branch=ticket1233
:http://tahoe-lafs.org/buildbot/waterfall?branch=ticket1233
Please review!
On IRC, David-Sarah said: "I think ticket1233 can be committed to trunk"
In changeset:a1cef915fd689308:
In changeset:b4c14421f7c2f25a:
This appears to have failed for David-Sarah just now. They reported:
I don't understand why it didn't choose http://tahoe-lafs.org/source/tahoe-lafs/deps/tahoe-lafs-dep-eggs/pycryptopp-0.5.25-py2.6-win32.egg over pycryptopp-0.5.25.tar.gz . Hm, and from where did it get that pycryptopp-0.5.25.tar.gz , anyway? It doesn't say that it downloaded it. Oh, maybe the logic to "prefer locally available over remote as the highest priority" chose pycryptopp-0.5.25.tar.gz because it was present on the local filesystem.
In that case, perhaps this is the expected behavior and we can reclose this ticket? :-/
Maybe we should patch zetuptoolz to verbosely explain why it chose what it did and where it acquired it?
Replying to zooko:
[...]
Oh, Problem Between Keyboard and Chair. I had that in my tahoe-deps directory.
Yes. (It wasn't reopened.)
That would be useful, as a new ticket.