airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Fixed issue of new dag getting old dataset events.

Open tosheer opened this issue 9 months ago • 5 comments

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: https://github.com/apache/airflow/issues/39456

tosheer avatar May 14 '24 05:05 tosheer

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: [email protected] Slack: https://s.apache.org/airflow-slack

boring-cyborg[bot] avatar May 14 '24 05:05 boring-cyborg[bot]

cc @uranusjr

jedcunningham avatar May 14 '24 17:05 jedcunningham

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 avatar May 15 '24 04:05 uranusjr

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

uranusjr avatar May 15 '24 04:05 uranusjr

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

tosheer avatar May 17 '24 06:05 tosheer

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)

RNHTTR avatar Jun 13 '24 19:06 RNHTTR

@RNHTTR All tests are passing now.

@uranusjr can you merge the PR?

tosheer avatar Jun 14 '24 08:06 tosheer

Tests are failing.

potiuk avatar Jun 17 '24 18:06 potiuk

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

tosheer avatar Jun 19 '24 07:06 tosheer

(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).

Dev-iL avatar Jun 20 '24 05:06 Dev-iL

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

uranusjr avatar Jul 09 '24 08:07 uranusjr

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

uranusjr avatar Aug 02 '24 07:08 uranusjr

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.

github-actions[bot] avatar Oct 13 '24 00:10 github-actions[bot]