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

chore: Secret Validation change #3111

Merged
merged 3 commits into from
Oct 4, 2024
Merged

Conversation

sfc-gh-fbudzynski
Copy link
Collaborator

Changes

  • changed secret validation to use generated validation without manual adjustments
  • changed parsing StringArrays to use ParseCommaSeparatedStringArray()
  • removed known issue with ConflictingFields from sdk generator README
  • removed comments and replaced them with jira issues

@sfc-gh-fbudzynski sfc-gh-fbudzynski marked this pull request as ready for review October 3, 2024 13:05
Copy link

github-actions bot commented Oct 3, 2024

Integration tests failure for 1c09768bd0697746c0d1bac8e1cc4517c93576d3

@@ -19,7 +19,7 @@ func TestInt_Secrets(t *testing.T) {

integrationId := testClientHelper().Ids.RandomAccountObjectIdentifier()

// "YYYY-MM-DD" or "YYYY-MM-DD HH-MI-SS" format has to be used, otherwise Snowflake returns error: "Invalid date/time format"
// "YYYY-MM-DD" or "YYYY-MM-DD HH:MI-SS" format has to be used, otherwise Snowflake returns error: "Invalid date/time format"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: just asking: shouldn't it be HH:MI:SS?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It should, will fix this with next PR

@@ -121,7 +120,7 @@ func TestInt_Secrets(t *testing.T) {
})
})

// regarding the https://docs.snowflake.com/en/sql-reference/sql/create-secret secret with empty oauth_scopes list should inherit scopes from security_integration, but it does not
// TODO [SNOW-1678756]: oauth_copes not inherited or not displayed correctly when not provided
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: oauth_scopes

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will correct it with next Secret related PR

opts.Set.SetForFlow.SetForOAuthClientCredentials = &SetForOAuthClientCredentials{OauthScopes: &OauthScopesList{[]ApiIntegrationScope{{Scope: "foo"}}}}
opts.Set.SetForFlow.SetForOAuthAuthorization = &SetForOAuthAuthorization{OauthRefreshToken: String("foo"), OauthRefreshTokenExpiryTime: String("bar")}
opts.Set.SetForFlow.SetForBasicAuthentication = &SetForBasicAuthentication{Username: String("foo"), Password: String("bar")}
opts.Set.SetForFlow.SetForGenericString = &SetForGenericString{SecretString: String("secret")}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: These 5 statements can be done like:

opts.Set.SetForFlow = &SetForFlow{
        SetForOAuthClientCredentials: &SetForOAuthClientCredentials{OauthScopes: &OauthScopesList{[]ApiIntegrationScope{{Scope: "foo"}}}}
        ...
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

will do this way next time and change it with next Secret PRs

@sfc-gh-fbudzynski sfc-gh-fbudzynski merged commit 666630e into main Oct 4, 2024
8 of 9 checks passed
@sfc-gh-fbudzynski sfc-gh-fbudzynski deleted the secret-conflicting-fields branch October 4, 2024 11:05
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