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

Remove edited type from PR automation init review trigger, enable concurrency #3771

Merged
merged 3 commits into from Feb 12, 2024

Conversation

AetherUnbound
Copy link
Contributor

@AetherUnbound AetherUnbound commented Feb 8, 2024

Fixes

Fixes #3770 by @AetherUnbound (hopefully, hard to know ahead of time)

Description

Update: This PR now only removes edited from the pull_request_review trigger type. It also adds a concurrency limit, per @dhruvkb's suggestion: #3771 (comment)

This PR removes the edited type from both the pull_request and pull_request_review workflow triggers for the PR automation init workflow. I suspect that this particular trigger is unnecessary for any of the actions we actually want to take when the workflow is triggered. It also makes debugging difficult. When looking at the init run history, it's hard to tell which events actually triggered the run in some cases:

image

I'm hoping that this somehow addresses the issue for why the PR automation was seemingly triggered in some cases and not others, as perhaps there was a race condition between edited and closed.

Testing Instructions

Merge and find out!

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 February 8, 2024 20:44
@github-actions github-actions bot added the 🧱 stack: mgmt Related to repo management and automations label Feb 8, 2024
@openverse-bot openverse-bot added 🟨 priority: medium Not blocking but should be addressed soon 🛠 goal: fix Bug fix 🤖 aspect: dx Concerns developers' experience with the codebase labels Feb 8, 2024
@dhruvkb
Copy link
Member

dhruvkb commented Feb 9, 2024

@AetherUnbound the edited trigger in workflow is there to automatically link PRs to issues in case the "Fixes ..." line is added to the description after the PR is created.

This usually happens when contributors do not follow the PR description accurately and either do not fill out that line properly or use a variant that GitHub does not recognise. When a maintainer later edits the description, the edited event is helpful to automatically move the issue into the "In Progress" column.

As for the race-condition hypothesis, concurrency settings would be the better, idiomatic approach to fixing those rather than reducing the number of triggers.

@AetherUnbound
Copy link
Contributor Author

Ah, that's a great call! Let me try that instead 😄

@AetherUnbound AetherUnbound changed the title Remove edited type from both PR automation init triggers Remove edited type from PR automation init review trigger, enable concurrency Feb 9, 2024
Copy link
Member

@dhruvkb dhruvkb left a comment

Choose a reason for hiding this comment

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

This makes sense to me, it should ensure that events from one PR do not enter into race situations.

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.

Let's test this :)

@AetherUnbound AetherUnbound merged commit 3e57bfa into main Feb 12, 2024
41 checks passed
@AetherUnbound AetherUnbound deleted the fix/pr-automation-merged branch February 12, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: mgmt Related to repo management and automations
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Some PRs are not moved from Approved to Merged after they are merged
4 participants