-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
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. |
@@ -117,7 +120,21 @@ def __init__( | |||
) -> None: | |||
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. |
@@ -117,7 +119,23 @@ def __init__( | |||
) -> None: | |||
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_bucket
As 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?
Feedback updates Co-authored-by: Vincent <[email protected]>
Related: #32760
This pull request renames
bucket
togcs_bucket
on theGCSToS3Operator
class 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.