-
Notifications
You must be signed in to change notification settings - Fork 49
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
Implement a label_trigger
option for test jobs
#2269
Comments
As @lachmanfrantisek mentioned on the chat, this should behave like a condition (during the job scheduling the label would be just checked for presence) rather than a trigger (like watching the event when the label was added), so maybe the proposed option name is a bit misleading. |
Is there any ETA on implementing this? |
hi @psss, I have put this to |
Great, thanks for the update! |
If possible also check for labels to not be present. Think about one implementation that can be reused in more jobs. |
With regards to the previous comment, I would suggest something like: label_trigger:
present:
- test_regressions
absent:
- skip_tests
- ci_skip To clarify what we discussed during the refinement, we also considered being able to run jobs only if there are labels missing, the example above probably explains it well. |
Negative filter sounds useful. The proposed syntax looks good. Perhaps, one more brainstorming idea: What about this? trigger:
label:
present:
- test_regressions
absent:
- skip_tests
- ci_skip |
Did you have something like trigger:
label:
present:
- test_regressions
absent:
- skip_tests
- ci_skip
manual: true in mind? With |
Yeah, that was the idea, to group all triggers under a single |
Getting back to this, I would probably omit the labels:
present:
- test_regressions
absent:
- skip_tests or maybe label_conditions:
present:
- test_regressions
absent:
- skip_tests WDYT? |
Maybe it would be good to clarify the expected behavior first: What will happen if a new label is added to the pull request and there are jobs (marked with that label) already waiting in the queue? I'd say it would be nice if the missing jobs are started right away. |
From your comment and also checking the thread on Slack, I think we agreed it would behave only like a condition, so adding/removing a label would not trigger Packit's action. |
Ok, so it should behave only as a condition. Do we expect there will/could be other conditions? If so, the following would be a bit more extensible syntax: condition:
label:
present:
- test_regressions
absent:
- skip_tests
- ci_skip Single key |
oh yes, that's true I don't recall any other conditions discussed so far, but I am still for the idea to have if extensible, so your suggestion sounds good to me. |
Introduce require.label in package config Needed for packit/packit-service#2269 RELEASE NOTES BEGIN N/A RELEASE NOTES END Reviewed-by: Maja Massarini
For PR events, check whether the labels on PR match the labels configuration (require.label.present and require.label.absent) if present when getting matching jobs for events. Fixes packit#2269
Conditions on PR labels TODO: docs Fixes #2269 #2186 RELEASE NOTES BEGIN We have introduced new configuration options require.label.present and require.label.absent. By configuring these you can specify labels that need to be present or absent on a pull request for Packit to react on such PR. RELEASE NOTES END Reviewed-by: František Lachman <[email protected]>
Thanks for implementing this! Trying in: Seems that the internal jobs have been scheduled. I guess the change has not been deployed yet? |
That would fail on parsing the config 👀 |
I see. Then, it seems, it does not work as expected. |
@psss yes, there is still one piece for build- > test mapping missing, I hope I will get it to prod until tomorrow, I will let you know :) (at the moment, you would need to add the require.label also for the build job to make it work) |
Understood. Thanks for the quick response! The build workaround is probably not an option because we still need the build to be completed for the basic sanity jobs which are enabled by default. By the way, the |
Hmm not sure I follow. If there is the |
Description
Similar to
manual_trigger
thelabel_trigger
would enable specific test job only if given label is attached to the pull request.Benefit
Once the pull request has passed basic sanity tests or an agreed level of code review, it would be marked for example with a
full test
label and all future pull request changes would be tested without need to again and again manually add/packit test --identifier full
comments. Also this would resolve the problem with having to wait until the copr builds are ready, see #2265 for details.Importance
This would substantially improve the several-tier-testing experience. And prevent unnecessary manual steps.
What is the impacted category (job)?
Testing Farm tests
Workaround
Participation
The text was updated successfully, but these errors were encountered: