You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Yaro1 (via GitHub)" <gi...@apache.org> on 2023/03/12 13:27:51 UTC

[GitHub] [airflow] Yaro1 opened a new pull request, #30053: fix setting project_id for gs to bq and bq to gs

Yaro1 opened a new pull request, #30053:
URL: https://github.com/apache/airflow/pull/30053

   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #29958
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] bhagany commented on a diff in pull request #30053: fix setting project_id for gs to bq and bq to gs

Posted by "bhagany (via GitHub)" <gi...@apache.org>.
bhagany commented on code in PR #30053:
URL: https://github.com/apache/airflow/pull/30053#discussion_r1235500903


##########
airflow/providers/google/cloud/transfers/bigquery_to_gcs.py:
##########
@@ -193,7 +193,7 @@ def _submit_job(
 
         return hook.insert_job(
             configuration=configuration,
-            project_id=hook.project_id,
+            project_id=configuration["extract"]["sourceTable"]["projectId"],

Review Comment:
   @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



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Yaro1 commented on pull request #30053: fix setting project_id for gs to bq and bq to gs

Posted by "Yaro1 (via GitHub)" <gi...@apache.org>.
Yaro1 commented on PR #30053:
URL: https://github.com/apache/airflow/pull/30053#issuecomment-1474872988

   what about review......? :(((((


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Yaro1 commented on pull request #30053: fix setting project_id for gs to bq and bq to gs

Posted by "Yaro1 (via GitHub)" <gi...@apache.org>.
Yaro1 commented on PR #30053:
URL: https://github.com/apache/airflow/pull/30053#issuecomment-1475389936

   :(


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk merged pull request #30053: fix setting project_id for gs to bq and bq to gs

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #30053:
URL: https://github.com/apache/airflow/pull/30053


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] sleepy-tiger commented on a diff in pull request #30053: fix setting project_id for gs to bq and bq to gs

Posted by "sleepy-tiger (via GitHub)" <gi...@apache.org>.
sleepy-tiger commented on code in PR #30053:
URL: https://github.com/apache/airflow/pull/30053#discussion_r1233807317


##########
airflow/providers/google/cloud/transfers/bigquery_to_gcs.py:
##########
@@ -193,7 +193,7 @@ def _submit_job(
 
         return hook.insert_job(
             configuration=configuration,
-            project_id=hook.project_id,
+            project_id=configuration["extract"]["sourceTable"]["projectId"],

Review Comment:
   @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. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #30053: fix setting project_id for gs to bq and bq to gs

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #30053:
URL: https://github.com/apache/airflow/pull/30053#issuecomment-1465229963

   Likely intemittent problem (node installation failed due to conectivity ?)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] boring-cyborg[bot] commented on pull request #30053: fix setting project_id for gs to bq and bq to gs

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #30053:
URL: https://github.com/apache/airflow/pull/30053#issuecomment-1465200053

   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)
   Here are some useful points:
   - Pay attention to the quality of your code (ruff, mypy and type annotations). Our [pre-commits]( https://github.com/apache/airflow/blob/main/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks) will help you with that.
   - In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/docs/apache-airflow/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
   - Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/BREEZE.rst) for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
   - Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
   - Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
   - Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#coding-style-and-best-practices).
   Apache Airflow is a community-driven project and together we are making it better 🚀.
   In case of doubts contact the developers at:
   Mailing List: dev@airflow.apache.org
   Slack: https://s.apache.org/airflow-slack
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Yaro1 commented on pull request #30053: fix setting project_id for gs to bq and bq to gs

Posted by "Yaro1 (via GitHub)" <gi...@apache.org>.
Yaro1 commented on PR #30053:
URL: https://github.com/apache/airflow/pull/30053#issuecomment-1465291544

   oh, got it, thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] bhagany commented on a diff in pull request #30053: fix setting project_id for gs to bq and bq to gs

Posted by "bhagany (via GitHub)" <gi...@apache.org>.
bhagany commented on code in PR #30053:
URL: https://github.com/apache/airflow/pull/30053#discussion_r1272466593


##########
airflow/providers/google/cloud/transfers/bigquery_to_gcs.py:
##########
@@ -193,7 +193,7 @@ def _submit_job(
 
         return hook.insert_job(
             configuration=configuration,
-            project_id=hook.project_id,
+            project_id=configuration["extract"]["sourceTable"]["projectId"],

Review Comment:
   I was closing old tabs and realized I never updated here -- the issue I filed is here: https://github.com/apache/airflow/issues/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



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #30053: fix setting project_id for gs to bq and bq to gs

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #30053:
URL: https://github.com/apache/airflow/pull/30053#issuecomment-1465211827

   cc: @lwyszomi and team, could you please take a a look and see if that is sound?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Yaro1 commented on pull request #30053: fix setting project_id for gs to bq and bq to gs

Posted by "Yaro1 (via GitHub)" <gi...@apache.org>.
Yaro1 commented on PR #30053:
URL: https://github.com/apache/airflow/pull/30053#issuecomment-1465228266

   Can't understand the error in [Static checks](https://github.com/apache/airflow/actions/runs/4397719832/jobs/7701405895#logs)
   
   ```
   An unexpected error has occurred: CalledProcessError: command: ('/opt/pipx/venvs/apache-airflow-breeze/bin/python', '-mnodeenv', '--prebuilt', '--clean-src', '/home/runner/.cache/pre-commit/repo7ocuinbu/node_env-18.6.0', '-n', '18.6.0')
   return code: 1
   stdout: (none)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] boring-cyborg[bot] commented on pull request #30053: fix setting project_id for gs to bq and bq to gs

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #30053:
URL: https://github.com/apache/airflow/pull/30053#issuecomment-1475815716

   Awesome work, congrats on your first merged pull request!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org