-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add preset headers to get_manifest request #121
Conversation
Signed-off-by: Kavish Punchoo <[email protected]>
Thanks for opening this @kavish-p - note that we need to debug what looks like a Python 3.12 issue: https://stackoverflow.com/questions/77364550/attributeerror-module-pkgutil-has-no-attribute-impimporter-did-you-mean. For the time being, my concern is that the headers are not updated for a reason. For example, data might get stale there, and so it was an implicit decision (for some registry) to refresh them. This means that although it might fix your particular use case, it could break someone else's. What I'd like to ask you to do is have a boolean to give to the client on it, something like And if you find a fix to this new bug, would be appreciated too! I thought it was related to black but (unfortunately looks to be a Python 3.12 deprecation). |
@kavish-p please rebase with master to get a fix for the formatting issue. Then next step would be to address/discuss the comments for the PR. Thank you! |
* update black to 24.1.0 and pin python to 3.11 There is a bug with using conda (3.12) and a removed dependency that is needed for setuptools. The solution for now is to use the install python action and pin to 3.11. Signed-off-by: vsoch <[email protected]>
Signed-off-by: Vanessasaurus <[email protected]>
Signed-off-by: Vanessasaurus <[email protected]>
@kavish-p a few things to work on while this is testing:
You'll also want to make sure that when refresh_headers is not defined (None) it gets set to False so we aren't having either the case of True or None, but rather True or False. |
Signed-off-by: Kavish Punchoo <[email protected]>
Signed-off-by: Kavish Punchoo <[email protected]>
Signed-off-by: Kavish Punchoo <[email protected]>
Signed-off-by: Kavish Punchoo <[email protected]>
Also @kavish-p you need to rebase against master - my commits shouldn't be in there. |
Currently when making the request to get manifests, previously set headers are ignored and only the Allowed media type headers are passed to
do_request
.I have a scenario where I set the Bearer token in the client using
self._client.set_token_auth(token)
However, the call for
get_manifest
fails as the Authorization header is not passed. It falls back to using Basic authentication indo_request
, which fails because my registry only support token authentication.