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

AIP-83 Logical date should be required field when triggering run via API #46390

Open
wants to merge 40 commits into
base: main
Choose a base branch
from

Conversation

vatsrahul1001
Copy link
Collaborator

@vatsrahul1001 vatsrahul1001 commented Feb 3, 2025

closes:#46188
depends: #46295

API request with the logical date as null

image

API request with the logical date as not null
image


^ Add meaningful description above
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.

vatsrahul1001 and others added 28 commits January 29, 2025 14:44
…stronomer/airflow into restore-unique-constraint-logical-date
…stronomer/airflow into restore-unique-constraint-logical-date
…stronomer/airflow into refactor-backfill-reprocess-logic
…omer/airflow into refactor-backfill-reprocess-logic
@boring-cyborg boring-cyborg bot added area:db-migrations PRs with DB migration area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues kind:documentation labels Feb 3, 2025
Comment on lines +103 to +105
self.dag_run_id = DagRun.generate_run_id(
DagRunType.MANUAL, self.logical_date if self.logical_date is not None else pendulum.now("UTC")
)
Copy link
Contributor

Choose a reason for hiding this comment

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

on the decision doc, question 6 states that when logical date is null, the run id should be generated from run_after + random string.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Run_id logic is being implemented in PR. I will update this after that change is merged

Copy link
Contributor

@dstandish dstandish left a comment

Choose a reason for hiding this comment

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

mentioned concern re run id generation logic

@jedcunningham jedcunningham added the AIP-83 Remove Execution Date Unique Constraint from DAG Run label Feb 4, 2025
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.

Nice thanks

airflow/api_fastapi/core_api/routes/public/dag_run.py Outdated Show resolved Hide resolved
airflow/api_fastapi/core_api/routes/public/dag_run.py Outdated Show resolved Hide resolved
airflow/models/backfill.py Outdated Show resolved Hide resolved
airflow/models/backfill.py Outdated Show resolved Hide resolved
vatsrahul1001 and others added 3 commits February 7, 2025 14:19
… of github.com:astronomer/airflow into make-logical-date-as-required-field-to-trigger-dag-api
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.

Looking good from the AIP stand point.

Logic looks good too but I would be more confortable if some AIP-83 owner could double check.

cc: @dstandish @uranusjr

I think we need to wait for #46398 before merging so we don't have to create a new PR afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AIP-83 Remove Execution Date Unique Constraint from DAG Run area:db-migrations PRs with DB migration area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues kind:documentation
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants