-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Use "vendoring" to maintain Spack's pure Python dependencies #33951
Use "vendoring" to maintain Spack's pure Python dependencies #33951
Conversation
Currently I am not vendoring EDIT: #34029 adds capabilities to bootstrap pytest |
117e2b5
to
25dcd6d
Compare
fc1ea7b
to
5aba414
Compare
@spackbot fix style |
Let me see if I can fix that for you! |
I encountered an error attempting to format style. DetailsError: <class 'sh.SignalException_SIGKILL'>,
RAN: /tmp/tmpekn986ei/spack-develop/bin/spack --color never style --fix --root /tmp/tmpekn986ei/spack
STDOUT:
STDERR:
Stack trace:
File "/usr/local/lib/python3.7/site-packages/rq/worker.py", line 1075, in perform_job
rv = job.perform()
File "/usr/local/lib/python3.7/site-packages/rq/job.py", line 854, in perform
self._result = self._execute()
File "/usr/local/lib/python3.7/site-packages/rq/job.py", line 880, in _execute
coro_result = loop.run_until_complete(result)
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "./spackbot/workers.py", line 336, in fix_style_task
spack, ["--color", "never", "style", "--fix", "--root", check_dir]
File "./spackbot/helpers.py", line 164, in run_command
raise inst
File "./spackbot/helpers.py", line 157, in run_command
control(*cmd, _out=res, _err=err, _ok_code=ok_codes)
File "/usr/local/lib/python3.7/site-packages/sh.py", line 1524, in __call__
return RunningCommand(cmd, call_args, stdin, stdout, stderr)
File "/usr/local/lib/python3.7/site-packages/sh.py", line 788, in __init__
self.wait()
File "/usr/local/lib/python3.7/site-packages/sh.py", line 845, in wait
self.handle_command_exit_code(exit_code)
File "/usr/local/lib/python3.7/site-packages/sh.py", line 869, in handle_command_exit_code
raise exc
|
5aba414
to
d29ee45
Compare
@spackbot run pipeline |
I'm sorry, gitlab does not have your latest revision yet, I can't run that pipeline for you right now. One likely possibility is that your PR pipeline has been temporarily deferred, in which case, it is awaiting a Please check the gitlab commit status message to see if more information is available. DetailsUnexpected response from gitlab: {'message': '404 Commit Not Found'} |
@spackbot run pipeline |
I'm sorry, gitlab does not have your latest revision yet, I can't run that pipeline for you right now. One likely possibility is that your PR pipeline has been temporarily deferred, in which case, it is awaiting a Please check the gitlab commit status message to see if more information is available. DetailsUnexpected response from gitlab: {'message': '404 Commit Not Found'} |
d29ee45
to
d470046
Compare
d470046
to
d7d2631
Compare
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.
This LGTM as-is. A couple comments but honestly this is great. Thanks to @pradyunsg for vendoring
.
My only worry is this, from here:
This tool has no stability promises -- it has only one intended user: pip. There may be unannounced changes to this codebase at any time, as long as the intended user (i.e. the pip project) is prepared for those changes.
But we deal with more rapidly changing dependencies than this anyway... and if vendoring
disappears it won't break spack
... the externals are already copied in and committed here.
@@ -232,7 +232,7 @@ Spack Subcommands | |||
Unit tests | |||
^^^^^^^^^^ | |||
|
|||
:mod:`spack.test` | |||
``spack.test`` |
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 not a module reference?
"pkg_resources/extern/", | ||
# trim vendored pygments styles and lexers | ||
"pygments/styles/[!_]*.py", | ||
'^pygments/lexers/(?!python|__init__|_mapping).*\.py$', |
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.
Random comment: I have thought a few times that it would be nice to vendor pygments so we could colorize YAML and JSON output.
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.
The only reason pip trims this is for distribution sizes.
You can have my word that I’ll bump the major version when I make a backwards incompatible change. Pin with a ~=1.2 or whatever variant you prefer. :) |
We aren't using Spack (heavily) in these images, all we use it for is to install from the buildcache. Spack doesn't need to know about *all* the compilers we installed to do that much. This also fixes an issue regarding the Spack code for OpenSUSE Leap 15, it used to be called `os=opensuse_leap15` but now is `os=opensuse15`. Bisection reveals the difference appeared when the distro vendered dependency was updated in spack/spack#33951 to include python-distro/distro#319. The change in Spack occured in January 2023, years after the change in distro was merged in October 2021, over a year after OpenSUSE Leap 15.2 was released in July 2020. Sigh.
depends on #34029
In this PR I am using vendoring to manage our vendored dependencies. The important modifications are in the first commit. The other two are just deleting the old dependencies and adding back the new ones.
To regenerate the tree of dependencies, from the root of our repo:
The list of our vendored dependencies is maintained in the
lib/spack/external/vendor.txt
file. Licenses etc. are copied automatically by thevendoring
tool in the folder created for the package.