-
Notifications
You must be signed in to change notification settings - Fork 120
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 #800
Fix CI #800
Conversation
It seems
|
@Jasha10 you can also run the test on a CircleCI instance for debugging. let me know if you need more info on this, happy to chat offline. |
Thanks for the tip, @jieru-hu! I managed to get ssh working with a running CircleCI instance. |
nice, could you add more context on the fix? |
I'm not sure why exactly The trouble was happening with this function from the noxfile: def deps(session, editable_installl):
session.install("--upgrade", "setuptools", "pip")
extra_flags = ["-e"] if editable_installl else []
session.install("-r", "requirements/dev.txt", *extra_flags, ".", silent=True) If the first call to My guess is that the Anyway, the examples on the nox docs do not suggest that using |
On a related note: |
it's probably still a good idea to upgrade pip. in Hydra's nox, |
Commit 9adc80d fails with the following nox commands: session.run("python", "-m", "pip", "install", "--upgrade", "setuptools", "pip")
session.run("pip", "install", "-r", "requirements/dev.txt", ".", silent=True) It's the same error as before: the Interestingly, I'm getting slightly different error messages when I try to reproduce the failure in an ssh session.
In the most recent commit 134be30 I've modified the |
thanks jasha. unfortunately this fix doesn't help when running I think this is broken by the latest release pip 21.3, pinning this issue on pip seems to be related to what we are seeing, although I'm not sure if this is the same issue (we are seeing the failure when install in non editable mode as well.). I tried the fix mentioned in the issue, but the fix only worked in session installing omegaconf in editable mode. Do you mind taking a closer look there? we can add our datapoint if it's not already mentioned in that issue. for now i suggest we pin the pip version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see previous comment.
The globally-installed version of pip won't be used to create sessions in nox. |
The issue here is that the
... and is unrelated to the editable issue. |
To clarify, previously, pip would make a copy of your entire project folder in $TMPDIR and build the package there. After 21.3, it runs the build from the project's root. |
I see. Thanks so much for your help @layday! |
So the root of the problem is that nox calls Here are the solutions I can think of:
Any thoughts? |
I'd just remove |
That rationale makes sense to me. Thanks again @layday! As for running multiple nox sessions one-after-another: It should not be a problem to skip deleting the .nox folder, as it's presence does not affect future nox runs -- running a nox session causes the old venv with the same session name to be deleted before the new venv for that session is created. |
It looks like you're not using |
Yes indeed, it seems that not only is
@omry, do you know if our downstream dependents are relying on omegaconf's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notes for reviewers of this PR:
exclude = .git,.nox,.tox,omegaconf/grammar/gen | ||
exclude = .git,.nox,.tox,omegaconf/grammar/gen,build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of pip version 21.3, in-tree builds are the default for pip, so a build
folder may be created.
Linters should ignore this folder.
noxfile.py
Outdated
if editable_install: | ||
# Editable installs not working in pip 21.3.0, https://github.com/pypa/pip/issues/10573 | ||
session.install("--upgrade", "setuptools", "pip!=21.3.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pinning pip version here because:
pip 21.3.0 crashes when an editable install is performed on packages that both have a pyproject.toml
file and have a setup.py
file that uses the deprecated setup_requires
keyword argument when calling the setuptools.setup
function.
This will probably be fixed in pip version 21.3.1.
As suggested in the discussion on this PR, an alternative to pinning pip here would be to remove the setup_requires=["pytest-runner"]
keyword argument from our setup.py
file. This means that the (deprecated) setup.py test
command would no longer work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@omry, do you know if our downstream dependents are relying on omegaconf's setup.py test command? If not, we can remove setup_requires and tests_require from the setup.py file so that pip will not need to be pinned for editable installs in the noxfile.
I don't know. Maybe the conda package.
| \.mypy_cache | ||
| \omegaconf/grammar/gen | ||
| omegaconf/grammar/gen | ||
| \.nox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unrelated -- just fixing a typo.
There should be no backslash. The other lines have a backslash to escape the period.
@@ -79,7 +79,6 @@ def run(self) -> None: | |||
"^omegaconf\\.egg-info$", | |||
"\\.eggs$", | |||
"^\\.mypy_cache$", | |||
"^\\.nox$", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, when running nox with pip version 21.3.0:
- When the noxfile installs omegaconf,
setup.py build
gets called. - When
build_helpers:BuildCommand
gets called, it invokesbuild_helpers.CleanCommand
. build_helpers.CleanCommand
deletes the.nox
folder- This makes nox crash.
I think this was not an issue before because older versions of pip did not do in-tree builds, i.e. the source tree would get copied to a temporary directory before the build/clean command were invoked.
Looking at the recipe in the omegaconf-feedstock repo, I'm confident that |
There is a CI failure in #799.
I want to see if CI fails on the
master
branch.