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

GitHub Actions: Bot removing labels added immediately after issue creation #3334

Closed
6 tasks
Zak234 opened this issue Jul 6, 2022 · 18 comments
Closed
6 tasks
Labels
automation for manulal github board maintenance actions that are going to be automated Complexity: Large Dependency An issue is blocking the completion or starting of another issue Feature: Board/GitHub Maintenance Project board maintenance that we have to do repeatedly role: back end/devOps Tasks for back-end developers size: 2pt Can be done in 7-12 hours

Comments

@Zak234
Copy link
Contributor

Zak234 commented Jul 6, 2022

Dependency

  • The Github Actions bot does not appear to be removing the ready for milestone label when an issue is created with the label attached anymore

Overview

As a developer, we have to ensure that our kanban board is organized for all teams so that productivity is high. For this issue, we want to know why the GitHub action bot is removing the "Ready for Milestone" label when applied during issue creation and change the code logic so it doesn't.

Action Items

  • Please go through the wiki article on Hack for LA's GitHub Actions
  • Review the check-labels.js file, to understand how the issue trigger bot checks and removes labels from the issue.
  • Understand why the github action bot removes the "Ready for Milestone" label if applied during issue creation. See resources for links to two helpful issues that discuss this.
  • Change the code logic to fix this error

Checks

  • Test in your local environment that it works
  • Make sure that comments are still applied correctly and other labels are still added and removed correctly.

Resources/Instructions

Never done GitHub actions? Start here!
GitHub Complex Workflows doc
GitHub Actions Workflow Directory
Events that trigger workflows
Workflow syntax for GitHub Actions
actions/github-script
GitHub RESTAPI

Architecture Notes

The idea behind the refactor is to organize our GitHub Actions so that developers can easily maintain and understand them. Currently, we want our GitHub Actions to be structured like so based on this proposal:

  • Schedules (military time)
    - Schedule Friday 0700
    - Schedule Thursday 1100
    - Schedule Daily 1100
  • Linters
    - Lint SCSS
  • PR Trigger
    - Add Linked Issue Labels to Pull Request
    - Add Pull Request Instructions
  • Issue Trigger
    - Add Missing Labels To Issues
  • WR - PR Trigger
    - WR Add Linked Issue Labels to Pull Request
    - WR Add Pull Request Instructions
  • WR - Issue Trigger

Actions with the same triggers (excluding linters, which will be their own category) will live in the same github action file. Scheduled actions will live in the same file if they trigger on the same schedule (i.e. all files that trigger everyday at 11am will live in one file, while files that trigger on Friday at 7am will be on a separate file).

That said, this structure is not set in stone. If any part of it feels strange, or you have questions, feel free to bring it up with the team so we can evolve this format!

@Zak234 Zak234 added role: back end/devOps Tasks for back-end developers Complexity: Large Feature: Board/GitHub Maintenance Project board maintenance that we have to do repeatedly automation for manulal github board maintenance actions that are going to be automated size: 2pt Can be done in 7-12 hours labels Jul 6, 2022
@github-actions

This comment was marked as outdated.

@Zak234 Zak234 changed the title GitHub Actions: Issue bot removing "Ready for Milestone" label from merge team members GitHub Actions: Bot removing "Ready for Milestone" label Jul 6, 2022
@Zak234 Zak234 mentioned this issue Jul 6, 2022
@ExperimentsInHonesty ExperimentsInHonesty added this to the 08. Team workflow milestone Oct 9, 2022
@MattPereira MattPereira self-assigned this Nov 14, 2022
@github-actions

This comment was marked as outdated.

@MattPereira

This comment was marked as outdated.

@github-actions github-actions bot added the Status: Updated No blockers and update is ready for review label Nov 18, 2022
@github-actions github-actions bot added 2 weeks inactive and removed Status: Updated No blockers and update is ready for review labels Nov 25, 2022
@github-actions

This comment was marked as outdated.

@MattPereira

This comment was marked as outdated.

@ExperimentsInHonesty
Copy link
Member

@MattPereira Please put notes from the conversation we had with Ava at the Engineering Community of Practice on 2022-11-30 about race condition.

@MattPereira
Copy link
Contributor

MattPereira commented Dec 3, 2022

Notes From Engineering CoP Meeting on 2022-11-30

  • Ava successfully recreated the bug on TEST #3759
  • She deduced that the github-actions bot is removing the Ready for Milestone label because of a race condition
  • Her recommendations:
    • Research github actions API to see if it is possible to prevent the label from being removed
    • Try altering the logic to wait X number of seconds before running the github action to prevent the race condition
    • Consider using a webhook to prevent the bug (very difficult)

@github-actions github-actions bot removed the Status: Updated No blockers and update is ready for review label Dec 16, 2022
@MattPereira

This comment was marked as outdated.

@MattPereira MattPereira added Status: Updated No blockers and update is ready for review and removed 2 weeks inactive labels Jan 2, 2023
@github-actions github-actions bot added 2 weeks inactive and removed Status: Updated No blockers and update is ready for review labels Jan 13, 2023
@github-actions

This comment was marked as outdated.

@MattPereira
Copy link
Contributor

MattPereira commented Jan 15, 2023

  1. Progress: Created another issue with the Ready For Milestone label attached during issue creation, but the github actions bot did not remove the label this time
  2. Blockers: Snowboarding this weekend
  3. Availability: 15 hours
  4. ETA: TBD

@MattPereira MattPereira added Status: Updated No blockers and update is ready for review and removed 2 weeks inactive labels Jan 15, 2023
@github-actions github-actions bot removed the Status: Updated No blockers and update is ready for review label Jan 27, 2023
@github-actions

This comment was marked as outdated.

@MattPereira
Copy link
Contributor

  1. Progress: I have been creating issues with the Ready For Milestone label attached during issue creation, but the github actions bot is not removing the label
  2. Blockers: I do not understand why it only removes the Ready For Milestone label sometimes
  3. Availability: 15 hours
  4. ETA: TBD

@MattPereira MattPereira added Status: Updated No blockers and update is ready for review and removed 2 weeks inactive labels Jan 29, 2023
@github-actions github-actions bot added 2 weeks inactive and removed Status: Updated No blockers and update is ready for review labels Feb 10, 2023
@github-actions

This comment was marked as outdated.

@MattPereira
Copy link
Contributor

MattPereira commented Feb 12, 2023

I am moving this issue back to icebox because the github actions bot has not removed a ready for milestone label from any of the many issues I have created with it.

@MattPereira MattPereira removed their assignment Feb 12, 2023
@MattPereira MattPereira added the Dependency An issue is blocking the completion or starting of another issue label Feb 14, 2023
@jdingeman jdingeman changed the title GitHub Actions: Bot removing "Ready for Milestone" label GitHub Actions: Bot removing labels Mar 8, 2023
@jdingeman jdingeman changed the title GitHub Actions: Bot removing labels GitHub Actions: Bot removing labels added immediately after issue creation Mar 8, 2023
@ExperimentsInHonesty
Copy link
Member

This issue is resolved by us changing all the issue templates to have the missing labels by default #4307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation for manulal github board maintenance actions that are going to be automated Complexity: Large Dependency An issue is blocking the completion or starting of another issue Feature: Board/GitHub Maintenance Project board maintenance that we have to do repeatedly role: back end/devOps Tasks for back-end developers size: 2pt Can be done in 7-12 hours
Projects
Development

No branches or pull requests

4 participants