Conversation
cf1bb9a to
e5153a8
Compare
e5153a8 to
63448f4
Compare
There was a problem hiding this comment.
This basically LGTM. I just left a few minor comments:
- The rename
spack.util.git.get_git()->spack.util.git.git()is absolutely minor. I think we are pretty inconsistent at the moment, so I'd be fine with either if you prefer the current state. - I need to double check if
skipifcan be applied on a fixture (I can't find clear docs on it, all the examples seem to suggest we need to use the imperative method during the setup phase)
Other than that it's 💯 to unify code!
| # If we're running under pytest, add this to ignore the fix for CVE-2022-39253 in | ||
| # git 2.38.1+. Do this in one place; we need git to do this in all parts of Spack. | ||
| if "pytest" in sys.modules: | ||
| git.add_default_arg("-c") | ||
| git.add_default_arg("protocol.file.allow=always") |
There was a problem hiding this comment.
Should we work around a CVE without letting users know? Where would this be relevant besides CI?
There was a problem hiding this comment.
We know the CVE doesn't affect us because it's not a multi-user environment and we created the directories ourselves.
|
@alalazo all should be fixed |
48a8607 to
55b15cf
Compare
Local `git` tests will fail with `fatal: transport 'file' not allowed` when using git 2.38.1 or higher, due to a fix for `CVE-2022-39253`. This was fixed in CI in #33429, but that doesn't help the issue for anyone's local environment. Instead of fixing this with git config in CI, we should ensure that the tests run anywhere. - [x] Introduce `spack.util.git`. - [x] Use `spack.util.git.get_git()` to get a `git` executable, instead of using `which("git")` everywhere. - [x] Make all `git` tests use a `git` fixture that goes through `spack.util.git.get_git()`. - [x] Add `-c protocol.file.allow=always` to all `git` invocations under `pytest`. - [x] Revert changes from #33429, which are no longer needed.
69ce8ed to
bb4cdee
Compare
bb4cdee to
87f9dda
Compare
|
@alalazo I can't seem to get past this sphinx issue for It doesn't seem to matter if it's fully qualified or if I add it to But everything else is done. |
alalazo
left a comment
There was a problem hiding this comment.
Sphinx tests seems to be passing on readthedocs. I think this one just needs to pass Gitlab, once it is available again.
Local `git` tests will fail with `fatal: transport 'file' not allowed` when using git 2.38.1 or higher, due to a fix for `CVE-2022-39253`. This was fixed in CI in spack#33429, but that doesn't help the issue for anyone's local environment. Instead of fixing this with git config in CI, we should ensure that the tests run anywhere. - [x] Introduce `spack.util.git`. - [x] Use `spack.util.git.get_git()` to get a git executable, instead of `which("git")` everywhere. - [x] Make all `git` tests use a `git` fixture that goes through `spack.util.git.get_git()`. - [x] Add `-c protocol.file.allow=always` to all `git` invocations under `pytest`. - [x] Revert changes from spack#33429, which are no longer needed.
Local `git` tests will fail with `fatal: transport 'file' not allowed` when using git 2.38.1 or higher, due to a fix for `CVE-2022-39253`. This was fixed in CI in spack#33429, but that doesn't help the issue for anyone's local environment. Instead of fixing this with git config in CI, we should ensure that the tests run anywhere. - [x] Introduce `spack.util.git`. - [x] Use `spack.util.git.get_git()` to get a git executable, instead of `which("git")` everywhere. - [x] Make all `git` tests use a `git` fixture that goes through `spack.util.git.get_git()`. - [x] Add `-c protocol.file.allow=always` to all `git` invocations under `pytest`. - [x] Revert changes from spack#33429, which are no longer needed.
Local `git` tests will fail with `fatal: transport 'file' not allowed` when using git 2.38.1 or higher, due to a fix for `CVE-2022-39253`. This was fixed in CI in spack#33429, but that doesn't help the issue for anyone's local environment. Instead of fixing this with git config in CI, we should ensure that the tests run anywhere. - [x] Introduce `spack.util.git`. - [x] Use `spack.util.git.get_git()` to get a git executable, instead of `which("git")` everywhere. - [x] Make all `git` tests use a `git` fixture that goes through `spack.util.git.get_git()`. - [x] Add `-c protocol.file.allow=always` to all `git` invocations under `pytest`. - [x] Revert changes from spack#33429, which are no longer needed.
Local `git` tests will fail with `fatal: transport 'file' not allowed` when using git 2.38.1 or higher, due to a fix for `CVE-2022-39253`. This was fixed in CI in spack#33429, but that doesn't help the issue for anyone's local environment. Instead of fixing this with git config in CI, we should ensure that the tests run anywhere. - [x] Introduce `spack.util.git`. - [x] Use `spack.util.git.get_git()` to get a git executable, instead of `which("git")` everywhere. - [x] Make all `git` tests use a `git` fixture that goes through `spack.util.git.get_git()`. - [x] Add `-c protocol.file.allow=always` to all `git` invocations under `pytest`. - [x] Revert changes from spack#33429, which are no longer needed.
Local `git` tests will fail with `fatal: transport 'file' not allowed` when using git 2.38.1 or higher, due to a fix for `CVE-2022-39253`. This was fixed in CI in spack#33429, but that doesn't help the issue for anyone's local environment. Instead of fixing this with git config in CI, we should ensure that the tests run anywhere. - [x] Introduce `spack.util.git`. - [x] Use `spack.util.git.get_git()` to get a git executable, instead of `which("git")` everywhere. - [x] Make all `git` tests use a `git` fixture that goes through `spack.util.git.get_git()`. - [x] Add `-c protocol.file.allow=always` to all `git` invocations under `pytest`. - [x] Revert changes from spack#33429, which are no longer needed.
Local
gittests will fail withfatal: transport 'file' not allowedwhen using git 2.38.1 or higher, due to a fix forCVE-2022-39253.This was fixed in CI in #33429, but that doesn't help the issue for anyone's local environment. Instead of fixing this with git config in CI, we should ensure that the tests run anywhere.
spack.util.git.spack.util.git.get_git()to get a git executable, instead ofwhich("git")everywhere.gittests use agitfixture that goes throughspack.util.git.get_git().-c protocol.file.allow=alwaysto allgitinvocations underpytest.