-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[image-builder-bob] Force refresh of oauth token #18620
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
Conversation
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.
Awesome, nice find, @aledbf !
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.
@aledbf one last question.
Separate from the StatusUnauthorized
change you made, what do you think of adding the below?
if resp.StatusCode == http.StatusBadRequest {
log.WithField("URL", resp.Request.URL.String()).Warn("bad request")
time.Sleep(2 * time.Second) // wait for the provider
return true, nil
}
My thought is, this is what the user essentially did (retry), so why not have proxy automate retry on 400, too.
I want to address token expiration in the PR. |
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.
👍 👍
Description
Borrow code from the soci-snapshotter to force the refresh of the oauth token.
xref ENG-757
xref #18611
Summary generated by Copilot
🤖 Generated by Copilot at ca99984
Workaround a bug in docker authorizer that prevents token refresh for private registries. Modify
proxy.go
to duplicate registry responses and add a TODO comment.Preview status
Gitpod was successfully deployed to your preview environment.
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold