Skip to content

Conversation

@polRk
Copy link
Member

@polRk polRk commented Jan 26, 2026

Adds a new job that automatically removes the SLO label from pull requests after the workflow run completes. Also adds a condition to only run the report job on successful workflow runs.

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Other information

Adds a new job that automatically removes the SLO label from pull
requests after the workflow run completes. Also adds a condition to
only run the report job on successful workflow runs.
Copilot AI review requested due to automatic review settings January 26, 2026 13:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds automatic cleanup of the SLO label from pull requests after workflow completion and restricts the report job to only run on successful workflow runs.

Changes:

  • Added a condition to the ydb-slo-action-report job to only run when the workflow concludes successfully
  • Added a new remove-slo-label job that removes the SLO label from PRs after the workflow completes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

remove-slo-label:
if: always() && github.event.workflow_run.event == 'pull_request'
name: Remove SLO Label
needs: ydb-slo-action-report
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The remove-slo-label job has a dependency issue. It declares needs: ydb-slo-action-report (line 27), but the ydb-slo-action-report job only runs when github.event.workflow_run.conclusion == 'success' (line 17).

If the workflow run fails (conclusion is 'failure', 'cancelled', 'timed_out', etc.), the ydb-slo-action-report job will be skipped. When a job is skipped, any jobs that depend on it via needs will also be skipped by default, even if they have if: always().

This means the remove-slo-label job will not run when the SLO workflow fails, which is likely not the intended behavior - the SLO label should be removed regardless of whether the workflow succeeds or fails.

To fix this, either:

  1. Remove the needs: ydb-slo-action-report dependency entirely if there's no actual dependency between these jobs, or
  2. Change the condition to if: always() && !cancelled() && github.event.workflow_run.event == 'pull_request' and add needs: [ydb-slo-action-report] with brackets to make it explicit that this job should run even if the needed job is skipped.

However, examining the logic more carefully, these two jobs appear to be independent - the label removal doesn't actually depend on the report being published. The most appropriate fix would be to remove the needs clause entirely.

Suggested change
needs: ydb-slo-action-report

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants