Skip to content

Conversation

octonautcal
Copy link
Contributor

https://github.com/OctopusDeploy/OctopusDeploy/pull/37244 implements PreserveAuthenticationToken, which provides the toggle for whether or not we regenerate gRPC auth token on monitor registration. This PR adds the go SDK support for it.

Copy link
Contributor

@liam-mackie liam-mackie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with confirmation about the server version gating

InstallationID *uuid.UUID `json:"InstallationId" validate:"required"`
MachineID string `json:"MachineId" validate:"required"`
SpaceID string `json:"SpaceId,omitempty"`
PreserveAuthenticationToken *bool `json:"PreserveAuthenticationToken,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if this is set to true on a server that doesn't have it? Is there any way to gate this behind a server version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm we can grab this semVar from the root resource to compare I think?

type RootResource struct {
	Application          string     `json:"Application" validate:"required"`
	Version              string     `json:"Version" validate:"required"`
	APIVersion           string     `json:"ApiVersion" validate:"required"`
	InstallationID       *uuid.UUID `json:"InstallationId" validate:"required"`
	IsEarlyAccessProgram bool       `json:"IsEarlyAccessProgram"`
	HasLongTermSupport   bool       `json:"HasLongTermSupport"`

	resources.Resource
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have a flag elsewhere... let me see if we can use it for parameters

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually not sure here - @zentron do you have any thoughts on the API compatibility here? Should we make a new request resource that's like a v2 request?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't seen the latest TF code since the framework upgrade, but can we not just fail in the TF the version is lower than we expect and its set to a value.

Happy to let @mjhilton take the lead on preferred way to deal with schema changes in here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the TF, yeah - we have options, but in the go-client itself, there's a few more intricacies. I'm gonna see if there's any docs on this anywhere...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants