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

Too many copr builds triggered when tests jobs are defined #2669

Open
majamassarini opened this issue Dec 3, 2024 · 0 comments
Open

Too many copr builds triggered when tests jobs are defined #2669

majamassarini opened this issue Dec 3, 2024 · 0 comments
Labels
area/copr Related to the integration with copr.fedorainfracloud.org/ complexity/single-task Regular task, should be done within days. gain/high This brings a lot of value to (not strictly a lot of) users. impact/high This issue impacts multiple/lot of users. kind/bug Something isn't working.

Comments

@majamassarini
Copy link
Member

majamassarini commented Dec 3, 2024

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:

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.

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).

@majamassarini majamassarini added the area/copr Related to the integration with copr.fedorainfracloud.org/ label Dec 3, 2024
@mfocko mfocko added kind/bug Something isn't working. impact/high This issue impacts multiple/lot of users. gain/high This brings a lot of value to (not strictly a lot of) users. complexity/single-task Regular task, should be done within days. labels Dec 5, 2024
@mfocko mfocko moved this from new to priority-backlog in Packit Kanban Board Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/copr Related to the integration with copr.fedorainfracloud.org/ complexity/single-task Regular task, should be done within days. gain/high This brings a lot of value to (not strictly a lot of) users. impact/high This issue impacts multiple/lot of users. kind/bug Something isn't working.
Projects
Status: priority-backlog
Development

No branches or pull requests

2 participants