Skip to content
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

V2 operator/agent should set custom user-agent for Pulumi operations #727

Closed
rquitales opened this issue Oct 24, 2024 · 4 comments · Fixed by #731
Closed

V2 operator/agent should set custom user-agent for Pulumi operations #727

rquitales opened this issue Oct 24, 2024 · 4 comments · Fixed by #731
Assignees
Labels
area/automation-api kind/engineering Work that is not visible to an external user resolution/fixed This issue was fixed

Comments

@rquitales
Copy link
Member

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

We should update our agent server code to also use a custom user-agent string for Pulumi auto api operations. This was done in v1 of the operator. Ref:

func (sess *reconcileStackSession) UpdateStack(ctx context.Context, targets []string) (shared.StackUpdateStatus, shared.Permalink, *auto.UpResult, error) {
writer := sess.logger.LogWriterDebug("Pulumi Update")
defer contract.IgnoreClose(writer)
opts := []optup.Option{optup.ProgressStreams(writer), optup.UserAgent(execAgent)}
if targets != nil {
opts = append(opts, optup.Target(targets))
}
result, err := sess.autoStack.Up(ctx, opts...)

@rquitales rquitales added area/automation-api kind/engineering Work that is not visible to an external user labels Oct 24, 2024
@EronWright EronWright added the resolution/fixed This issue was fixed label Oct 29, 2024
@EronWright
Copy link
Contributor

@rquitales I believe this is already done, for example:

optup.UserAgent(UserAgent),

@pulumi-bot

This comment has been minimized.

@EronWright EronWright self-assigned this Oct 29, 2024
@EronWright
Copy link
Contributor

EronWright commented Oct 29, 2024

I suppose we should add the version info to make the user agent be equivalent to v1:

execAgent               = fmt.Sprintf("pulumi-kubernetes-operator/%s", version.Version)

@cleverguy25
Copy link

Added to epic #586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/automation-api kind/engineering Work that is not visible to an external user resolution/fixed This issue was fixed
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants