Skip to content
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 name format in the batch requests #32070

Merged
merged 2 commits into from Jun 22, 2023
Merged

Conversation

HaeSe0ng
Copy link
Contributor

@HaeSe0ng HaeSe0ng commented Jun 22, 2023

closes: #32069

The name argument in the hook code follows the format "projects/PROJECT_ID/regions/DATAPROC_REGION/batches/BATCH_ID". However, according to the Google Cloud DataProc API Reference, it should be in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID .

@boring-cyborg boring-cyborg bot added area:providers provider:google Google (including GCP) related issues labels Jun 22, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 22, 2023

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 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 Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment 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 for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    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

@kristopherkane
Copy link
Contributor

Also experiencing this problem.

@kristopherkane
Copy link
Contributor

@HaeSe0ng For the interim, you might be able to switch to non-deferable as it doesn't do a get_batch request up front and instead waits on the initial job request completion.

@HaeSe0ng
Copy link
Contributor Author

@kristopherkane

After the incident in our dags, I confirmed that the issue only occurs when deferrable is set to True. Therefore, I set deferrable to False already. I truly appreciate your kindness. Thank you.

FYI. Even if deferrable is False, get_batch can be called if AlreadyExist (batch with given id already exists) error occurs in DataprocCreateBatchOperator

@kristopherkane
Copy link
Contributor

Yep, we are tracking that deficiency. This is just the only route for current production Airflow. We are in contact with GCP and have been told that the API behavior is being reverted.

@hussein-awala hussein-awala added the use public runners Makes sure that Public runners are used even if commiters creates the PR (useful for testing) label Jun 22, 2023
Copy link
Member

@hussein-awala hussein-awala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting this PR. It looks good!
Let's wait for the CI to pass before merging it.

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks it passed/ Merging.

@potiuk potiuk merged commit 59d64d8 into apache:main Jun 22, 2023
42 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 22, 2023

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

@HaeSe0ng
Copy link
Contributor Author

Thank you for the reviews. May I know what version would include this PR and when would it be released?

@potiuk
Copy link
Member

potiuk commented Jun 23, 2023

For providers it is always it's 'next' and 'when ready'

@potiuk
Copy link
Member

potiuk commented Jun 23, 2023

Srsly. Watch the announcements, and release notes if you want to know when it is released. In case of providers we determine the version and timing Just before releasing them - based on what kind of changes are included. It is impossible to tell when and what version it will be. You need to watch. But it will be included in the "next" version (after we release the versions that we were voting on while this one was merged).

@HaeSe0ng
Copy link
Contributor Author

Oh, I see. I'll keep watching the announcements. Thanks for letting me know.

ferruzzi pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Jun 27, 2023
Co-authored-by: Hussein Awala <hussein@awala.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers provider:google Google (including GCP) related issues use public runners Makes sure that Public runners are used even if commiters creates the PR (useful for testing)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AioRpcError in DataprocCreateBatchOperator
5 participants