Conversation
d70d991 to
70b1ce7
Compare
|
@tgamblin this particular PR should be rebased (vs. squashed): I have formatted all the commit messages. |
Question related to commit messages: can you add a handle to this PR in each commit if this is not squashed? Asking because it's quite useful when you read code to annotate it and eventually read the PRs associated with the lines of interest. |
|
@scheibelp I don't know if the other PRs fix the long timeout issue, but I tweaked this branch to get a better behavior. I added diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index 409cc334e..a6956b7d4 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -324,6 +324,7 @@ def fetch(self):
'-D',
'-', # print out HTML headers
'-L', # resolve 3xx redirects
+ '--connect-timeout', '15',
self.url,
]
diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirror.py
index ceb53801c..3a863188a 100644
--- a/lib/spack/spack/mirror.py
+++ b/lib/spack/spack/mirror.py
@@ -499,7 +499,7 @@ def add_single_spec(spec, mirror_root, mirror_stats):
tty.msg("Adding package {pkg} to mirror".format(
pkg=spec.format("{name}{@version}")
))
- num_retries = 3
+ num_retries = 1
while num_retries > 0:
try:
with spec.package.stage as pkg_stage: |
4f47842 to
d7e6557
Compare
alalazo
left a comment
There was a problem hiding this comment.
I have one minor question on broken links. Waiting for that before merging this.
d7e6557 to
abe5d9a
Compare
|
(EDIT 12/12: some of this is incorrect and has been corrected by #13908 (comment)) This is failing because as part of addressing #13908 (comment) I invoke I can either:
The latter does not seem very reasonable to me so I'll be thinking about how to do the first one. |
|
@scheibelp I think
Another alternative might be to return early if the link if os.path.exists(cosmetic_path):
returnwhich means it's not broken (so basically rule out every exception to the happy code path at the beginning of the method). |
|
Thanks for the suggestion!
I encountered this problem on Mac OS so that might be why it comes up for me
I agree that checking both |
When creating a cosmetic symlink for a resource in a mirror, remove it if it already exists. The symlink is removed in case the logic to create the symlink has changed.
The targets for the cosmetic paths in mirrrors were being calculated incorrectly as of fb3a3ba: the symlinks used relative paths as targets, and the relative path was computed relative to the wrong directory.
Since cache_mirror does the fetch itself, it also needs to do the checksum itself if it wants to verify that the source stored in the mirror is valid. Note that this isn't strictly required because fetching (including from mirrors) always separately verifies the checksum.
When updating a mirror, Spack was re-retrieving all patches (since the fetch logic for patches is separate). This updates the patch logic to allow the mirror logic to avoid this.
BundlePackages use a noop fetch strategy. The mirror logic was assuming that the fetcher had a resource to cach after performing a fetch. This adds a special check to skip caching if the stage is associated with a BundleFetchStrategy. Note that this should allow caching resources associated with BundlePackages.
abe5d9a to
7ba1d0e
Compare
|
#13908 (comment) worked for me but to clarify: I asserted in #13908 (comment) that So at this point all requests are addressed. |
(update 12/4: this PR should be rebased the commits apply fixes for thematically-related but functionally-separate problems, and I intend that the commits are properly-formatted and organized for that)
Fixes #13722 (or rather addresses the parts of it that were not addressed by #13789)
Fixes #14067
Closes #14093
BundlePackagesspack mirror createon the same mirror directory (in develop this currently reports errors)