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

external-plugin: add label to PR if a test with a certain label has been changed #3879

Open
dhiller opened this issue Jan 13, 2025 · 0 comments
Labels
area/automation Issues and PRs concerning automation, i.e. KubeVirt job updates, KubeVirtCI bumps etc. kind/enhancement

Comments

@dhiller
Copy link
Contributor

dhiller commented Jan 13, 2025

Outcome

Automatically highlight a PR where a test with a certain label is touched.

Note: owners-label plugin can only apply labels to matching glob expressions, it doesn't care about test labels.

Use case

if a [Conformance] test is changed, we want to apply a label to the PR (suggestion: kind/conformance)

Implementation

Create external-plugin similar to other project-infra implementations that reacts on GitHub pull_request events.

Initial implementation will add the label if any test holding source label is changed, and remove the label if no change inside the PR for any test holding source label is detected.

Notes:

  • label can also appear in parent Ginkgo nodes, so we should use the test outline to detect the label match
  • detection of test changes via ast is a bonus - meaning detecting changes in sub-level, as in library calls (libvmi etc) or other called code.

Config:

kubevirt/kubevirt:
- test_target: '[Conformance]'
  label: kind/conformance
...

/kind enhancement
/area automation

FYI @fossedihelm @brianmcarey

@kubevirt-bot kubevirt-bot added kind/enhancement area/automation Issues and PRs concerning automation, i.e. KubeVirt job updates, KubeVirtCI bumps etc. labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/automation Issues and PRs concerning automation, i.e. KubeVirt job updates, KubeVirtCI bumps etc. kind/enhancement
Projects
None yet
Development

No branches or pull requests

2 participants