-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
fix setting project_id for gs to bq and bq to gs #30053
fix setting project_id for gs to bq and bq to gs #30053
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
Can't understand the error in Static checks
|
Likely intemittent problem (node installation failed due to conectivity ?) |
oh, got it, thanks |
:( |
Awesome work, congrats on your first merged pull request! |
@@ -193,7 +193,7 @@ def _submit_job( | |||
|
|||
return hook.insert_job( | |||
configuration=configuration, | |||
project_id=hook.project_id, | |||
project_id=configuration["extract"]["sourceTable"]["projectId"], |
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.
@Yaro1 May I know the reason why we hard code the project id from sourceTable? We got the issue when we try to extract data from Project A but we want to submit job by using our own Project B. This line does not allow us to use our default project id.
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.
@sleepy-tiger I agree, we also have this issue. I think the original bug report was based on a misunderstanding of the error, and while this fix does incidentally support the reporter's gcp configuration, I think that is mostly an accident, and it also breaks many other use cases.
see also https://github.com/apache/airflow/pull/30053/files#diff-875bf3d1bfbba7067dc754732c0e416b8ebe7a5b722bc9ac428b98934f04a16fR512 and https://github.com/apache/airflow/pull/30053/files#diff-875bf3d1bfbba7067dc754732c0e416b8ebe7a5b722bc9ac428b98934f04a16fR587, which override the project_id
that the user passes in, making it impossible to use a project_id
other than what is specified in the source or destination tables. In general, more clarity is needed in distinguishing between which projects are being used for storage, and which are being used for compute.
I plan on filing an issue about this later today if one doesn't already exist, and I'll update here
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 was closing old tabs and realized I never updated here -- the issue I filed is here: #32106, and it has been resolved to my satisfaction. You can find links to the relevant conversations from that issue, it got kind of complicated with multiple issues filed and such
closes: #29958