Skip to content

Fix issue where fetch failed to prefer local mirrors over public remote resources#13545

Merged
tgamblin merged 4 commits intospack:developfrom
opadron:fix/13537-bad-fetch-strategy-preference
Nov 4, 2019
Merged

Fix issue where fetch failed to prefer local mirrors over public remote resources#13545
tgamblin merged 4 commits intospack:developfrom
opadron:fix/13537-bad-fetch-strategy-preference

Conversation

@opadron
Copy link
Copy Markdown
Member

@opadron opadron commented Nov 1, 2019

Also updates the S3FetchStrategy so that it throws a SpackError if the fetch fails. Before, it was throwing URLError, which was not being caught in stage.py. (This uncaught exception is what had originally confused me and led to my erroneous changes in stage.py.)

Fixes #13537

…te resources

  Also updates the S3FetchStrategy so that it
  throws a SpackError if the fetch fails.  Before,
  it was throwing URLError, which was not being
  caught in stage.py
@opadron opadron requested a review from scheibelp November 1, 2019 20:07
@scheibelp scheibelp self-assigned this Nov 1, 2019
Copy link
Copy Markdown
Member

@scheibelp scheibelp left a comment

Choose a reason for hiding this comment

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

I have one request and one question, let me know if you disagree. Thanks!

@scheibelp
Copy link
Copy Markdown
Member

Pending the flake update, this looks good to me

@tgamblin tgamblin merged commit 0784ec1 into spack:develop Nov 4, 2019
tgamblin pushed a commit that referenced this pull request Nov 4, 2019
…13545)

- [x] insert at beginning of list so fetch grabs local mirrors before remote resources
- [x] update the S3FetchStrategy so that it throws a SpackError if the fetch fails.  
      Before, it was throwing URLError, which was not being caught in stage.py.
- [x] move error handling out of S3FetchStrategy and into web_util.read_from_url()
- [x] pass string instead of URLError to SpackWebError
@bartlettroscoe
Copy link
Copy Markdown

@tgamblin, is this change also going to go into the next minor release of the line 0.13.x?

@opadron opadron deleted the fix/13537-bad-fetch-strategy-preference branch November 4, 2019 13:30
@scheibelp
Copy link
Copy Markdown
Member

@bartlettroscoe yes: everything that is added to the https://github.com/spack/spack/projects/13 (which appears under the "projects" section of the PR page) will be in 0.13.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Updated spack install tries to get tarballs off internet first before looking in local mirror!

5 participants