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: deprecate old s3 and use use s3_v2 as default #17963

Merged
merged 8 commits into from
Aug 16, 2024

Conversation

tabVersion
Copy link
Contributor

@tabVersion tabVersion commented Aug 7, 2024

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

What's changed and what's your intention?

as title

resolve #16645

replace s3 with s3_v2 in the frontend so we can migrate the default to s3

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)

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.

please remove the prev s3 source part and rename s3_v2 into s3

Signed-off-by: tabversion <[email protected]>
Copy link
Member

@xxchan xxchan left a comment

Choose a reason for hiding this comment

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

LGTM. What about deprecating s3_v2 at the same time?

i.e.,

  • Backend: s3 and s3_v2 both kept, and nothing changed
  • Frontend: s3 will be rewritten to s3_v2, s3_v2 will be rejected.

@tabVersion
Copy link
Contributor Author

LGTM. What about deprecating s3_v2 at the same time?

i.e.,

  • Backend: s3 and s3_v2 both kept, and nothing changed
  • Frontend: s3 will be rewritten to s3_v2, s3_v2 will be rejected.

That's what I am thinking about. Some old user may follow their experience to proceed with s3_v2, but we tell them s3_v2 is deprecated and migrating to s3 seems strange. I prefer keeping both s3 and s3_v2.

Signed-off-by: tabVersion <[email protected]>
@tabVersion tabVersion marked this pull request as ready for review August 8, 2024 06:59
@graphite-app graphite-app bot requested a review from a team August 8, 2024 07:23
Signed-off-by: tabVersion <[email protected]>
Comment on lines +1123 to +1129
if connector == S3_CONNECTOR {
// S3 connector is deprecated, use OPENDAL_S3_CONNECTOR instead
// do s3 -> s3_v2 migration
let entry = props.get_mut(UPSTREAM_SOURCE_KEY).unwrap();
*entry = OPENDAL_S3_CONNECTOR.to_string();
connector = OPENDAL_S3_CONNECTOR.to_string();
}
Copy link
Member

@fuyufjh fuyufjh Aug 12, 2024

Choose a reason for hiding this comment

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

Will these lines work for an existing job?

I don't think it's necessary to help users write their SQL from connector='s3_v2' to 's3'. While on the other hand, it is necessary to do this for an existing job persisted in Meta.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only for new jobs. The existing jobs do not go through frontend again.

Copy link
Member

Choose a reason for hiding this comment

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

xxchan's proposal #17963 (review) sounds the most reasonable to me, that is, rejecting the s3_v2 in frontend, but allow the existing ones. Can we do that?

Copy link
Member

Choose a reason for hiding this comment

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

BTW, I think the changes here are rewriting s3 -> s3_v2, which is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

rejecting the s3_v2 in frontend, but allow the existing ones. Can we do that?

Technically, yes.
My concern is from the product side. Rejecting a higher version but accepting a lower one seems strange. And what if we evolve a new s3 source, we'd call it s3_v2 or s3_v3?

Copy link
Member

Choose a reason for hiding this comment

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

Leaving s3_v2 as an alias sounds acceptable to me, but please make sure all the docs & test cases are updated to s3.

@tabVersion
Copy link
Contributor Author

adjust the behavior to ban s3_v2

@fuyufjh fuyufjh requested review from fuyufjh and xxchan August 16, 2024 04:24
Comment on lines +1123 to +1129
if connector == S3_CONNECTOR {
// S3 connector is deprecated, use OPENDAL_S3_CONNECTOR instead
// do s3 -> s3_v2 migration
let entry = props.get_mut(UPSTREAM_SOURCE_KEY).unwrap();
*entry = OPENDAL_S3_CONNECTOR.to_string();
connector = OPENDAL_S3_CONNECTOR.to_string();
}
Copy link
Member

Choose a reason for hiding this comment

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

Leaving s3_v2 as an alias sounds acceptable to me, but please make sure all the docs & test cases are updated to s3.

Signed-off-by: tabVersion <[email protected]>
@tabVersion tabVersion added this pull request to the merge queue Aug 16, 2024
Merged via the queue into main with commit ccad6f4 Aug 16, 2024
30 of 31 checks passed
@tabVersion tabVersion deleted the tab/deprecate-s3-v1 branch August 16, 2024 06:26
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.

Deprecate File Source V1
3 participants