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
Prevent S3 information on non-S3 mirrors #27701
base: develop
Are you sure you want to change the base?
Prevent S3 information on non-S3 mirrors #27701
Conversation
e88bd22
to
55d1fda
Compare
Does this fix #27694? If so, you can add |
@scheibelp, #27694 is a pull request and the reason it is linked is that there is a comment requesting this particular change. I separated them to make things easier. |
55d1fda
to
79fcaf1
Compare
79fcaf1
to
93cdae3
Compare
This comment has been minimized.
This comment has been minimized.
@alalazo, I don't see that happening on the
|
@josephsnyder Yeah, sorry for the noise. I could reproduce the error I posted reliably until I tried: $ spack clean -a and cleaning the cache made it disappear somehow. I am not sure what could have caused it in the first place though I have been moving across branches a lot... |
93cdae3
to
dd28db3
Compare
Switch from looking at the presence of the S3 information keys to determine if the dictionary URL is used to instead look at the value in the keys. Add s3_endpoint_url as an additional key value for the S3 information.
dd28db3
to
6cce365
Compare
# On creation, assume connection data is set for both | ||
if any(value for value in key_values if value in args): | ||
# Check for value in each key, instead of presence of each key | ||
if any(vars(args)[value] for value in key_values if value in args): |
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.
I seem to recall that args
is now supposed to be a namespace
object with attributes instead of a mapping with keys. (That would explain the use of vars
, here).
I think that's fine, but something would need to be done about the default for args
, since it doesn't make sense to default to an empty dict, anymore.
Maybe default to None
and have some branch that handles None
?
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 code is only called from one place, and it supplies args
. Maybe it should just make args
a required argument?
Switch from looking at the presence of the S3 information keys to
determine if the dictionary URL is used to instead look at the value
in the keys.
Add s3_endpoint_url as an additional key value for the S3 information.
See #27694 (comment)