-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Working on re-triggering of failed tests, I realized we are triggering non needed copr builds.
jobs:
- job: copr_build
trigger: pull_request
identifier: latest
targets:
- fedora-latest-x86_64
- job: copr_build
trigger: pull_request
targets:
- fedora-rawhide-x86_64
The above snippet is taken from this PR; one copr build for rawhide and one for f41 with latest identifier should be enough, instead we are triggering even the rawhide build in the copr repo with latest identifier and the f41 build in the copr repo with no identifier.
This is caused by the definition of tests jobs (not listed in the snippet) for which we are looking in all defined targets:
packit-service/packit_service/worker/helpers/build/build_helper.py
Lines 94 to 96 in d6b6a6e
| for test_job in self.job_tests_all: | |
| if not test_job.skip_build: | |
| targets.update(test_job.targets) |
There are no issues for any user but we are wasting resources.
There is also another issue related with the wrong build_targets count.
packit-service/packit_service/worker/jobs.py
Lines 359 to 360 in d6b6a6e
| if isinstance(job_helper, CoprBuildJobHelper): | |
| number_of_build_targets = len(job_helper.build_targets) |
We are submitting the wrong number of build_targets (for too many times) to the pushgateway.
When there are multiple copr jobs defined and there is also at least one test job defined, we are submitting for every copr job and every test job the sum of all defined targets (since the CoprBuildJobHelper is initialized even for the tests jobs).
I think this is the cause of our wrong metrics #2430 (we have many more queued tasks than started or finished).
Metadata
Metadata
Assignees
Labels
Type
Projects
Status