-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
[AIRFLOW-5335] Update GCSHook methods so they need min IAM perms #5939
Conversation
It immediately sends requests to the server.
It does not send the request immediately. It is necessary to execute: Related discussion: #5054 (comment) |
Full example code:
Sample output:
|
@mik-laj Do you suggest adding
|
No. I don't want you to add this method because it will restore the previous behavior. I just started to check the difference between these two methods. |
Agree with @mik-laj . Although my reason for this change is not entirely the same but closely-related. When using This has advantages when using multiple buckets and you have IAM on a bucket level. |
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.
I've looked at the code and it looks correct, but I think it's worth testing it thoroughly using system tests. Unfortunately, we do not have such tests yet, but I hope that they will be created tomorrow ;-) Let's wait with merging for it.
Confirmed. With |
Thanks @nuclearpinguin |
Make sure you have checked all steps below.
Jira
Description
After we refactored to using Storage client in GCS, we need more IAM permissions.
This is because we use
get_bucket
method which requiresstorage.bucket.list
permission. Instead of that if we usebucket
method that creates Bucket object we don't need the above permission.This restores the behavior (IAM perms needed) of Airflow <=1.10.3
Tests
Tests updated
Commits
Documentation
Code Quality
flake8