Commit 1d0c869
authored
Allow retriggering builds/tests on ELN rawhide PRs independently (#3032)
Allow retriggering builds/tests on ELN rawhide PRs independently
TODO:
Write new tests or update the old ones to cover new functionality.
Update doc-strings where appropriate.
Update or write new documentation in packit/packit.dev.
NOTE 1
When figuring out how to implement this PR, I noticed that separate handlers are run when running jobs for eln and rawhide. This implementation is based on discarding the one handler associated with the jobs that are not needed (removing it from the handlers_triggered_by_job variable). For example:
/packit-ci test rpminspect eln
Would lead to the handler corresponding with the rawhide target being removed from the list of handlers to be run. It's possible that there could be a better way of implementing this.
NOTE 2
I implemented the retriggering comment syntax as was described in the issue. However, having it implemented as a positional argument means that comments like this are valid:
/packit-ci test custom eln
/packit-ci build rawhide
But the following would be invalid and lead to a parsing error because of the missing positional argument before eln (the first positional argument cannot be missing if the second one is present):
/packit-ci test eln
If needed, I could instead turn the new argument into a keyword argument like this:
/packit-ci test --target-branch eln
EDIT: I've made it into a keyword argument in the second commit. I should probably write a new test to test the functionality of /packit-ci test --target-branch eln.
Fixes #2958
RELEASE NOTES BEGIN
In Fedora CI, it is now possible to retrigger builds and tests on ELN rawhide PRs with no dedicated eln branch independently.
RELEASE NOTES END
Reviewed-by: gemini-code-assist[bot]
Reviewed-by: Alžběta Kučerová
Reviewed-by: Nikola Forró
Reviewed-by: Laura BarcziováFile tree
7 files changed
+512
-13
lines changed- packit_service
- worker
- handlers
- tests
- integration
- unit
7 files changed
+512
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
| 337 | + | |
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
343 | 359 | | |
344 | 360 | | |
345 | 361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
73 | 104 | | |
74 | 105 | | |
75 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| |||
776 | 777 | | |
777 | 778 | | |
778 | 779 | | |
| 780 | + | |
779 | 781 | | |
780 | 782 | | |
781 | 783 | | |
| |||
1010 | 1012 | | |
1011 | 1013 | | |
1012 | 1014 | | |
| 1015 | + | |
1013 | 1016 | | |
1014 | 1017 | | |
1015 | 1018 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
360 | 361 | | |
361 | 362 | | |
362 | 363 | | |
| 364 | + | |
363 | 365 | | |
364 | 366 | | |
365 | 367 | | |
| |||
520 | 522 | | |
521 | 523 | | |
522 | 524 | | |
| 525 | + | |
523 | 526 | | |
524 | 527 | | |
525 | 528 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
146 | | - | |
| 148 | + | |
| 149 | + | |
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
| |||
176 | 179 | | |
177 | 180 | | |
178 | 181 | | |
| 182 | + | |
179 | 183 | | |
180 | 184 | | |
181 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
182 | 188 | | |
183 | 189 | | |
184 | 190 | | |
| 191 | + | |
185 | 192 | | |
186 | 193 | | |
187 | 194 | | |
| |||
192 | 199 | | |
193 | 200 | | |
194 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
195 | 208 | | |
196 | 209 | | |
197 | 210 | | |
| |||
552 | 565 | | |
553 | 566 | | |
554 | 567 | | |
555 | | - | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
556 | 573 | | |
557 | 574 | | |
558 | 575 | | |
| |||
572 | 589 | | |
573 | 590 | | |
574 | 591 | | |
| 592 | + | |
| 593 | + | |
575 | 594 | | |
576 | 595 | | |
577 | 596 | | |
578 | | - | |
| 597 | + | |
579 | 598 | | |
580 | 599 | | |
581 | 600 | | |
| |||
683 | 702 | | |
684 | 703 | | |
685 | 704 | | |
| 705 | + | |
| 706 | + | |
686 | 707 | | |
687 | 708 | | |
688 | | - | |
689 | 709 | | |
690 | 710 | | |
691 | 711 | | |
| |||
695 | 715 | | |
696 | 716 | | |
697 | 717 | | |
698 | | - | |
| 718 | + | |
| 719 | + | |
699 | 720 | | |
700 | 721 | | |
701 | 722 | | |
| |||
726 | 747 | | |
727 | 748 | | |
728 | 749 | | |
729 | | - | |
| 750 | + | |
730 | 751 | | |
731 | 752 | | |
732 | 753 | | |
| |||
0 commit comments