Skip to content

Fixed issue of new dag getting old dataset events. - #39603

Closed
tosheer wants to merge 17 commits into
apache:mainfrom
tosheer:new_dag_getting_old_dataset_events
Closed

Fixed issue of new dag getting old dataset events.#39603
tosheer wants to merge 17 commits into
apache:mainfrom
tosheer:new_dag_getting_old_dataset_events

Conversation

@tosheer

@tosheer tosheer commented May 14, 2024

Copy link
Copy Markdown

If a new dataset triggreed DAG is created for an already existing dataset. (Dataset has already existing dataset events) DAG see all dataset events from very first event for dataset.

Fixes: #39456

@tosheer
tosheer requested review from XD-DENG, ashb and kaxil as code owners May 14, 2024 05:04
@boring-cyborg boring-cyborg Bot added the area:Scheduler including HA (high availability) scheduler label May 14, 2024
@boring-cyborg

boring-cyborg Bot commented May 14, 2024

Copy link
Copy Markdown

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

Comment thread tests/jobs/test_scheduler_job.py Outdated
Comment thread tests/jobs/test_scheduler_job.py Outdated
@jedcunningham

Copy link
Copy Markdown
Member

cc @uranusjr

@jedcunningham
jedcunningham requested a review from uranusjr May 14, 2024 17:27
@uranusjr

Copy link
Copy Markdown
Member

To be honest I don’t really consider the current behaviour (in 2.9.1) a bug, but I can see why people expect it this way. I think we probably need an entry in newsfragment to warn users about possible breakages.

@uranusjr

Copy link
Copy Markdown
Member

Also the tests need improvements, as mentioned in above reviews.

@tosheer

tosheer commented May 17, 2024

Copy link
Copy Markdown
Author

@RNHTTR / @uranusjr Can you guys please review it and let me know if it needs any adjustments.

Comment thread airflow/jobs/scheduler_job_runner.py
Comment thread tests/jobs/test_scheduler_job.py Outdated
Comment thread tests/jobs/test_scheduler_job.py Outdated
Comment thread tests/jobs/test_scheduler_job.py
Comment thread tests/jobs/test_scheduler_job.py
Comment thread tests/jobs/test_scheduler_job.py
Comment thread tests/jobs/test_scheduler_job.py Outdated
Comment thread tests/jobs/test_scheduler_job.py Outdated
tosheer and others added 2 commits June 11, 2024 16:00
Co-authored-by: Ryan Hatter <25823361+RNHTTR@users.noreply.github.com>

@uranusjr uranusjr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me. Pending @RNHTTR’s comments.

@RNHTTR

RNHTTR commented Jun 13, 2024

Copy link
Copy Markdown
Contributor

Looks good to me. Pending @RNHTTR’s comments.

LGTM as well, but I'm unable to mark the comments as resolved :\

(Also the tests need to be addressed)

@tosheer

tosheer commented Jun 14, 2024

Copy link
Copy Markdown
Author

@RNHTTR All tests are passing now.

@uranusjr can you merge the PR?

@potiuk

potiuk commented Jun 17, 2024

Copy link
Copy Markdown
Member

Tests are failing.

@tosheer

tosheer commented Jun 19, 2024

Copy link
Copy Markdown
Author

@potiuk Test are passing now. Can you merged
Screenshot 2024-06-19 at 1 12 50 PM

@Dev-iL

Dev-iL commented Jun 20, 2024

Copy link
Copy Markdown
Collaborator

(Lesson for myself - don't post PR comments on Slack. Anyway, here's a copy of my comment from a few days ago:)

Perhaps it makes sense to have this behaviour user-configurable? Seeing past dataset events sounds useful for backfilling (i.e. when a new process becomes available for old data).

It's not clear from the docs how catchup works for dataset schedules, but I'd imagine that:

  • dataset schedule + catchup=True -> current behavior (see all past events]).
  • dataset schedule + catchup=False -> the behavior you added (see only new events).

If we take the route suggested above, we should consider what it'd mean for a DatasetOrTimeSchedule + catchup=True (I'd say either forbidden or add all runs from both schedules).

@uranusjr

uranusjr commented Jul 9, 2024

Copy link
Copy Markdown
Member

What do you think of the comment on still being able to get the old events in some way @tosheer?

@uranusjr uranusjr added this to the Airflow 3.0.0 milestone Aug 2, 2024
@uranusjr

uranusjr commented Aug 2, 2024

Copy link
Copy Markdown
Member

3.0 is a point when we can break things so let’s consider this before we do that.

@uranusjr uranusjr self-assigned this Aug 2, 2024
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Scheduler including HA (high availability) scheduler stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DAGs are able to see historical dataset events when created new

6 participants