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

Use trigger_and_wait for alias point step in create filtered index DAG #2620

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

AetherUnbound
Copy link
Collaborator

@AetherUnbound AetherUnbound commented Jul 11, 2023

Fixes

Fixes #2619 by @AetherUnbound

Description

This PR uses the trigger_and_wait_for_task method for the point alias step of the create_filtered_<media-type>_index DAG. This ensures that the point alias step completes before the deletion is attempted.

Testing Instructions

  1. just down -v
  2. just api/init
  3. just i && just c
  4. Enable the create_filtered_image_index DAG, then the image_data_refresh DAG
  5. Observe that the wait step completes before deletion is attempted.

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • I ran the DAG documentation generator (if applicable).

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@AetherUnbound AetherUnbound requested a review from a team as a code owner July 11, 2023 21:42
@github-actions github-actions bot added the 🧱 stack: catalog Related to the catalog and Airflow DAGs label Jul 11, 2023
@openverse-bot openverse-bot added 🟥 priority: critical Must be addressed ASAP 🛠 goal: fix Bug fix 💻 aspect: code Concerns the software code in the repository 🧱 stack: ingestion server Related to the ingestion/data refresh server labels Jul 11, 2023
Copy link
Collaborator

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

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

LGTM!

Is there anywhere else this kind of fix might need to be applied, if not necessarily in this PR/issue then for another issue?

Copy link
Contributor

@obulat obulat left a comment

Choose a reason for hiding this comment

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

LGTM!
Do we have any other async tasks like this in other DAGs that might need a similar change? Should we conduct an audit for it?

@AetherUnbound
Copy link
Collaborator Author

Great questions! I will do a quick audit of the other tasks and put up another PR if I find any other necessary cases 😄 For now I'll merge this so we can kick off another filtered run 🚀

@AetherUnbound AetherUnbound merged commit a6242cc into main Jul 12, 2023
62 of 66 checks passed
@AetherUnbound AetherUnbound deleted the fix/alias-point-wait branch July 12, 2023 16:33
@AetherUnbound
Copy link
Collaborator Author

I've checked the other ES related tasks and the only step that could use a wait is the trigger_delete ones, but in all cases we don't actually need to wait for the delete for subsequent steps to complete successfully. This should be the only necessary case!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟥 priority: critical Must be addressed ASAP 🧱 stack: catalog Related to the catalog and Airflow DAGs 🧱 stack: ingestion server Related to the ingestion/data refresh server
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add a wait sensor for the create filtered index DAG's trigger alias point step
4 participants