Skip to content

Conversation

@ntr
Copy link
Contributor

@ntr ntr commented Feb 15, 2025


Set task/dag id labels for Dataproc Batch

Setting labels airflow-dag and airflow-task using sanitized dag and task id. This should help the users to keep track of historical execution of dataproc serverless batches.

User can use those labels to cluster dataproc batches by dags and tasks, perform historical analysis and navigate to the airflow source code.

During discussion, we considered alternative of using 'dag-display-name' but there is not enforcement for it to be a unique.

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
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.

@boring-cyborg boring-cyborg bot added the provider:google Google (including GCP) related issues label Feb 15, 2025
@boring-cyborg
Copy link

boring-cyborg bot commented Feb 15, 2025

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 Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.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.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    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

@potiuk potiuk force-pushed the batch_set_airflow_labels branch from 7a9ebdd to 83161b4 Compare February 15, 2025 22:12
@michalmodras
Copy link

This looks good to me - @VladaZakharova let's have someone in the team review as well.

@potiuk
Copy link
Member

potiuk commented Feb 17, 2025

Needs rebase :)

@VladaZakharova
Copy link
Contributor

VladaZakharova commented Feb 18, 2025

Looks good to me! (Although needs rebase)
Verified, on UI in Dataproc everything works as expected both in deff and non-deff modes :)

@potiuk Can you please approve and merge, if it looks good to you?

Thanks :)

@ntr
Copy link
Contributor Author

ntr commented Feb 20, 2025

Thanks, updated.

Copy link
Contributor

@eladkal eladkal left a comment

Choose a reason for hiding this comment

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

What problem does it solves?
is it a bug fix? feature?
please add meaningful description for this change

ah it was placed inside the template. now I see the description

@eladkal eladkal removed the request for review from ryanahamilton February 21, 2025 09:21
Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

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

Beside Elad's comment, code looks good.

@ntr ntr requested a review from eladkal February 21, 2025 18:06
@ntr ntr force-pushed the batch_set_airflow_labels branch from f522fa4 to b8fdcb9 Compare February 24, 2025 17:49
@potiuk
Copy link
Member

potiuk commented Feb 28, 2025

anything remaining @eladkal :)?

@potiuk potiuk force-pushed the batch_set_airflow_labels branch from d91b5fb to 3a25cd3 Compare March 2, 2025 15:17
@ntr
Copy link
Contributor Author

ntr commented Mar 5, 2025

@eladkal can you please take a look again? I cannot merge this PR without your approval. Thanks.

@eladkal eladkal merged commit 4bc7ffb into apache:main Mar 9, 2025
59 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Mar 9, 2025

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

azharizz pushed a commit to azharizz/airflow that referenced this pull request Mar 9, 2025
…pache#46781)

* Set task/dag labels for Dataproc Batch

* Adding airflow-dag-display-name label support
nailo2c pushed a commit to nailo2c/airflow that referenced this pull request Apr 4, 2025
…pache#46781)

* Set task/dag labels for Dataproc Batch

* Adding airflow-dag-display-name label support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants