Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI failures introduced by #6275 #6454

Merged

Conversation

cosmicexplorer
Copy link
Contributor

@cosmicexplorer cosmicexplorer commented Sep 5, 2018

Problem

When #6275 was merged to master, it failed two test shards, and these errors weren't spurious.

Solution

@cosmicexplorer
Copy link
Contributor Author

The unit test failure is fixed, working on the integration test failure now.

@cosmicexplorer cosmicexplorer changed the title [WIP] Fix test failures from #6275 Fix CI failures introduced by #6275 Sep 5, 2018
@cosmicexplorer
Copy link
Contributor Author

If this doesn't pass CI, I will simply need to skip the larger test_shard_6() instead of the smaller test that integration test was failing in. Hopefully this more surgical skip will work.

@cosmicexplorer
Copy link
Contributor Author

...it turned out that failure wasn't about the test failing, it was about ./pants test being called on a python_binary() target, and then something failed. For now, the offending target (examples/src/python/example/python_distribution/hello/pants_setup_requires:bin) has been added to known_failing_targets in test_testprojects_integration.py.

@cosmicexplorer cosmicexplorer merged commit bff18f5 into pantsbuild:master Sep 5, 2018
@@ -34,6 +34,11 @@ def targets(self):
'testprojects/src/java/org/pantsbuild/testproject/thriftdeptest',
# TODO(Eric Ayers): I don't understand why this fails
'testprojects/src/java/org/pantsbuild/testproject/jvmprepcommand:compile-prep-command',
# TODO(#6455): this produces a resolution error in (currently) the test_shard_6() method with
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not totally sure, but I'm pretty damn sure, the issue here is allow_prereleases. The native dists are always prereleases as things stand with their fingerprint version numbering scheme. Pants via pex (like pip), does not resolve prereleases by default - this has to be turned on. I think you'll need come up with a semi-substantial change to Pants' pex building code / PythonRequirement to allow for isolated resolves of only certain requirements with prereleases even if the overall resolve mode is the default of allow_prereleases=False. I dug a bit this am because hello_again resolution failures were blocking my git commit via the lint hook failing. I think it makes sense to uninstall this task pipeline by default until its working reliably. If twitter needs it installed, that could be done with a site-specific plugin register.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK - this was tied up in a fairly subtle dance:

  1. allow_prereleases
  2. leaking of pantsbuild.pants prereleases from tests into pants requirement resolution cache via:
  3. egg_info --tag-build=+[rest] interacting badly when applied to a prerelease version.

I'll file here shortly with all the details.

Copy link
Contributor Author

@cosmicexplorer cosmicexplorer Sep 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspected something was funky when the version string had the + turned into an _ in the error message. I thought I remembered hearing that allow_prereleases was slightly different than the result of using the --tag-build option from someone somewhere, but I don't recall exactly -- it would make sense if "prereleases" is a superset of tagged builds.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, uninstalling this task pipeline (the native backend as well as the python_dist() support) by default sounds great, and is the focus of #5970, which I was going to get to after this and another open PR got merged.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. #5970 is about contrib - I meant more - no matter where this is housed, have it turned off by default, even in pantsbuild/pants - until it is stable. It's caused more than its fair share of thrash due to instability.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I also didn't make it clear that my intention with #5970 was also absolutely to turn these off by default (I already wanted to do this just because downloading a huge binary compiler distribution alone feels like something I would want to have to opt in to).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants