Skip to content

package: Add fetch_options variable#15317

Merged
scheibelp merged 3 commits intospack:developfrom
michaelkuhn:per-package-fetch_options
Mar 13, 2020
Merged

package: Add fetch_options variable#15317
scheibelp merged 3 commits intospack:developfrom
michaelkuhn:per-package-fetch_options

Conversation

@michaelkuhn
Copy link
Copy Markdown
Member

PR #15212 added a new connect_timeout option that can be overriden using fetch_options but had to specified per-version. This adds a new per-package variable that can be used to override fetch_options.

PR spack#15212 added a new connect_timeout option that can be overriden using
fetch_options but had to specified per-version. This adds a new
per-package variable that can be used to override fetch_options.
@michaelkuhn
Copy link
Copy Markdown
Member Author

@scheibelp @alalazo

@scheibelp scheibelp self-assigned this Mar 4, 2020
@scheibelp
Copy link
Copy Markdown
Member

Do you think there may be cases where the URL changes and we only want to apply a timeout for a subset of versions?

I think this removes the ability to specify timeouts on a per-version basis as added in #15212. Overall I think this is more useful than that, but I think there may be cases were people would prefer the feature added in #15212.

If you think that is unlikely, we can just merge this without changes, since for its intended purpose it looks good to me.

@michaelkuhn
Copy link
Copy Markdown
Member Author

I think this removes the ability to specify timeouts on a per-version basis as added in #15212. Overall I think this is more useful than that, but I think there may be cases were people would prefer the feature added in #15212.

Per-version timeouts should still work, see for instance the resources in the gcc and verrou packages. The precedence should be: global connect_timeout, per-package fetch_options, per-version/resource fetch_options.

michaelkuhn added a commit to michaelkuhn/spack that referenced this pull request Mar 13, 2020
This makes sure that a package's fetch_options are used when fetching
new versions to checksum. This allows working around problems with slow
servers or those requiring a cookie to be set.

Depends on spack#15317
michaelkuhn added a commit to michaelkuhn/spack that referenced this pull request Mar 13, 2020
This makes sure that a package's fetch_options are used when fetching
new versions to checksum. This allows working around problems with slow
servers or those requiring a cookie to be set.

Depends on spack#15317
@scheibelp
Copy link
Copy Markdown
Member

Closing/reopening to restart tests

@scheibelp scheibelp closed this Mar 13, 2020
@scheibelp scheibelp reopened this Mar 13, 2020
@scheibelp scheibelp merged commit 14441e0 into spack:develop Mar 13, 2020
@scheibelp
Copy link
Copy Markdown
Member

Thanks for all your work on this!

michaelkuhn added a commit to michaelkuhn/spack that referenced this pull request Mar 13, 2020
This makes sure that a package's fetch_options are used when fetching
new versions to checksum. This allows working around problems with slow
servers or those requiring a cookie to be set.

Depends on spack#15317
@skosukhin
Copy link
Copy Markdown
Member

@michaelkuhn this is a nice feature, thank you. What do you think it would take to honour fetch_options["timeout"] when checking whether a URL exists?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants