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

refactor(connector): add proper prefix for aws related properties for connector #16671

Merged
merged 2 commits into from May 14, 2024

Conversation

yuhao-su
Copy link
Contributor

@yuhao-su yuhao-su commented May 9, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

As mentioned in #16625 (comment), the original connector field name can be ambiguous in non AWS context.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

In pulsar, bigquery and msk documentation, those field name should be changed:

external_id -> aws.credentials.role.external_id
endpoint_url -> aws.endpoint_url
access_key -> aws.credentials.access_key_id
secret_key ->aws.credentials.secret_access_key
session_token -> aws.credentials.session_token
profile-> aws.region.profile
arn -> aws.credentials.role.arn

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

Comment on lines 80 to 85
#[serde(rename = "aws.credentials.role.arn", alias = "arn")]
pub arn: Option<String>,
/// external ID in IAM role trust policy
#[serde(rename = "aws.credentials.role.external_id", alias = "external_id")]
pub external_id: Option<String>,
#[serde(rename = "aws.region.profile", alias = "profile")]
Copy link
Member

Choose a reason for hiding this comment

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

Why credentials.role before arn, external_id, and why region before profile? any reference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The arn this for the arn of the role. And the role is used for authentication. I also considered aws.authentication.role.xxx but Kinesis already used aws.credentials.role.xxx.

I'll fix the region.

@neverchanje
Copy link
Contributor

I don't see a strong motivation to add prefixes to these fields. Any conprehensible names will LGTM.

Overall, I don't have an opinion on this PR. The code LGTM though

@yuhao-su yuhao-su added this pull request to the merge queue May 14, 2024
Merged via the queue into main with commit 31774ec May 14, 2024
27 of 28 checks passed
@yuhao-su yuhao-su deleted the yuhao/rename-aws-auth-props branch May 14, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants