-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Rename "bucket" to "gcs_bucket" in GCSToS3Operator #33031
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
Rename "bucket" to "gcs_bucket" in GCSToS3Operator #33031
Conversation
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
| super().__init__(**kwargs) | ||
|
|
||
| self.bucket = bucket | ||
| if bucket and gcs_bucket: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bucket is still accepted, but outputs a deprecation warning.
|
@ferruzzi This is the PR we briefly talked about in this other issue. I would appreciate your review. |
| super().__init__(**kwargs) | ||
|
|
||
| self.bucket = bucket | ||
| if bucket and gcs_bucket: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this check? If both are provided, we should use gcs_bucket IMO. To me we should do (pseudo code):
if bucket:
warnings.warn()
self.gcs_bucket = bucket
if gcs_bucket:
self.gcs_bucket = gcs_bucketAs such, if both are provided, gcs_bucket is used
| raise ValueError("You must pass either bucket or gcs_bucket.") | ||
| # The bucket attribute is unused, but must be set on the operator instance in | ||
| # order to include it in template_fields. | ||
| self.bucket = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer needed?
Co-authored-by: Vincent <97131062+vincbeck@users.noreply.github.com>
Feedback updates Co-authored-by: Vincent <97131062+vincbeck@users.noreply.github.com>
Related: #32760
This pull request renames
buckettogcs_bucketon theGCSToS3Operatorclass to distinguish between AWS and GCP buckets. The change supports both parameter names but issues a deprecation warning forbucket.Here are the corresponding unit/system tests:
Your review is appreciated.