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

feat: updated shield provider to support new shield version #180

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

utsav14nov
Copy link

No description provided.

@utsav14nov utsav14nov self-assigned this Sep 24, 2024
@@ -21,6 +21,7 @@ type Credentials struct {
Host string `json:"host" mapstructure:"host" validate:"required"`
AuthHeader string `json:"auth_header" mapstructure:"auth_header" validate:"required"`
AuthEmail string `json:"auth_email" mapstructure:"auth_email" validate:"required"`
Version string `json:"version" mapstructure:"version"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it make sense to rename this to 'ClientVersion' or 'UseNewClient' with a boolean type?
At first glance, it seems that the version represents the credential version

Copy link
Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

Choose a reason for hiding this comment

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

let's rename this file to shield_v2_client.go or similar

Copy link
Author

Choose a reason for hiding this comment

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

if err != nil {
return nil, err
}
if credentials.ClientVersion == "new" {
Copy link
Member

Choose a reason for hiding this comment

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

instead of "new" let's go with "v2"?

Copy link
Author

Choose a reason for hiding this comment

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

But it's not any specific version i.e. v2 or v3 we are upgrading it to.
It is a new shield for us and that new shield versions may also change with changing time.

Therefor renaming it to v2 looks like some exact version of shield, CMIIW?
and also once our shield deployment get's stable, we'll remove this logic and keep only one shield client.

@rahmatrhd
Copy link
Member

LGTM

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.

4 participants