-
Notifications
You must be signed in to change notification settings - Fork 22
feat: reuse agent tokens when a prebuilt agent reinitializes #374
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
base: main
Are you sure you want to change the base?
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.
I think this is definitely worth an integration test :-)
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 don't think this PR is ready for review yet, is it?
provider/agent.go
Outdated
} else { | ||
tflog.Info(ctx, "using a new agent token", logFields) | ||
} |
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 don't think it's necessary to log this case.
} else { | |
tflog.Info(ctx, "using a new agent token", logFields) | |
} | |
} |
// and after the workspace was claimed by a user. | ||
// | ||
// agentID is unused for now, but will be used as soon as we support multiple agents. | ||
func RunningAgentTokenEnvironmentVariable(agentID string) string { |
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.
How will the ID be injected? How will we maintain a persistent identity across terraform apply
runs?
Site wide roles have empty string org_ids
This PR closes #364