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

Correctly report results from Testing Farm #1565

Merged

Conversation

FrNecas
Copy link

@FrNecas FrNecas commented Jun 28, 2022

Previously, if there were multiple TF jobs differentiated by their
identifier, Steve would create a celery task for each of the jobs,
regardless of their identifier for the single results event. To overcome
this, save the identifier in the DB and obtain it when a result arrives.
Check for identifier match when creating celery tasks based on jobs.

TODO:

  • Write new tests or update the old ones to cover new functionality.
  • Update doc-strings where appropriate.

Fixes #1535 (or at least I hope, will need to be verified on stg, I have a simple reproducer https://github.com/FrNecas/packit-reproducer/pull/1 )


RELEASE NOTES BEGIN
Results from Testing Farm are now correctly reported when multiple jobs with different identifier are defined.
RELEASE NOTES END

Comment on lines 483 to 485
if (
isinstance(self.event, TestingFarmResultsEvent)
and self.event.identifier != job.identifier
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to run this in the pre_check method of the TestingFarmResultsHandler? otherwise, LGTM

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, something like this is what I was looking for. I will move it there + adjust the test coverage

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So testing turned out to be more complicated than I expected due to where pre_check is called -- it is necessary to test create_tasks which uses a lot of utility functions (dumping package config, etc) + celery stuff. I tried to remove most of this through mocks and focus on the number of tasks created. Could someone please re-review the changes?

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

✔️ pre-commit SUCCESS in 2m 08s
✔️ packit-service-tests SUCCESS in 2m 27s
packit-service-tests-openshift RETRY_LIMIT in 12m 46s

Copy link
Member

@TomasTomecek TomasTomecek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏🏻

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

✔️ pre-commit SUCCESS in 1m 45s
✔️ packit-service-tests SUCCESS in 1m 51s
packit-service-tests-openshift RETRY_LIMIT in 12m 41s

@FrNecas
Copy link
Author

FrNecas commented Jun 30, 2022

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

✔️ pre-commit SUCCESS in 1m 58s
✔️ packit-service-tests SUCCESS in 1m 56s
packit-service-tests-openshift RETRY_LIMIT in 12m 07s

Copy link
Member

@lachmanfrantisek lachmanfrantisek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me!

@FrNecas
Copy link
Author

FrNecas commented Jun 30, 2022

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

✔️ pre-commit SUCCESS in 2m 50s
✔️ packit-service-tests SUCCESS in 3m 19s
packit-service-tests-openshift RETRY_LIMIT in 14m 46s

@FrNecas
Copy link
Author

FrNecas commented Jun 30, 2022

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

✔️ pre-commit SUCCESS in 2m 15s
✔️ packit-service-tests SUCCESS in 2m 25s
packit-service-tests-openshift FAILURE in 19m 19s

@FrNecas
Copy link
Author

FrNecas commented Jun 30, 2022

recheck

Previously, if there were multiple TF jobs differentiated by their
identifier, Steve would create a celery task for each of the jobs,
regardless of their identifier for the single results event. To overcome
this, save the identifier in the DB and obtain it when a result arrives.
Check for identifier match when creating celery tasks based on jobs.

Signed-off-by: František Nečas <fnecas@redhat.com>
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ pre-commit SUCCESS in 2m 04s
✔️ packit-service-tests SUCCESS in 2m 51s
✔️ packit-service-tests-openshift SUCCESS in 14m 17s

@FrNecas FrNecas added the mergeit When set, zuul wil gate and merge the PR. label Jun 30, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

✔️ pre-commit SUCCESS in 2m 01s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 3f38891 into packit:main Jun 30, 2022
@FrNecas
Copy link
Author

FrNecas commented Jun 30, 2022

And it works https://github.com/FrNecas/packit-reproducer/pull/1 🍾

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit When set, zuul wil gate and merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix reporting from multiple TF jobs
4 participants