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

Fix multiple run models exception for API #2165

Conversation

lbarcziova
Copy link
Member

@lbarcziova lbarcziova commented Aug 28, 2023

The exception should not be raised, as we are getting project event from the project objects such as PR/branch push/release/issues and for these, there can be multiple project events (e.g. PR with multiple pushes). Fixes #2153

TODO:

  • Write new tests or update the old ones to cover new functionality.

RELEASE NOTES BEGIN
We have fixed a bug causing issues with displaying some Project views in our dashboard.
RELEASE NOTES END

@softwarefactory-project-zuul

This comment was marked as outdated.

@lbarcziova

This comment was marked as outdated.

@softwarefactory-project-zuul

This comment was marked as outdated.

@lbarcziova
Copy link
Member Author

recheck

@softwarefactory-project-zuul

This comment was marked as outdated.

@lbarcziova
Copy link
Member Author

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://softwarefactory-project.io/zuul/t/packit-service/buildset/b621b92c3ce94869933522afadf8404b

✔️ pre-commit SUCCESS in 1m 43s
✔️ packit-service-tests SUCCESS in 1m 50s
✔️ packit-service-tests-openshift SUCCESS in 13m 41s

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://softwarefactory-project.io/zuul/t/packit-service/buildset/8eb474b075e34b12b3a6b6c8992780ac

✔️ pre-commit SUCCESS in 1m 47s
✔️ packit-service-tests SUCCESS in 1m 56s
✔️ packit-service-tests-openshift SUCCESS in 13m 56s

@lbarcziova lbarcziova marked this pull request as ready for review August 29, 2023 09:49
The exception should not be raised, as we are getting project event
from the project objects such as PR/branch push/release/issues and for
these, there can be multiple project events (e.g. PR with multiple pushes).
Fixes packit#2153
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://softwarefactory-project.io/zuul/t/packit-service/buildset/28e76a3def3c47cc9681b38ef1b2658c

✔️ pre-commit SUCCESS in 1m 43s
✔️ packit-service-tests SUCCESS in 1m 58s
✔️ packit-service-tests-openshift SUCCESS in 16m 52s

Comment on lines -351 to -355
@property
def commit_sha(self) -> str:
project_event = self.get_project_event()
return project_event.commit_sha if project_event else None

Copy link
Member

Choose a reason for hiding this comment

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

I thought we need this one, but looking at the tests it seems we don't.
Thanks for the fix!

@lbarcziova lbarcziova added the mergeit When set, zuul wil gate and merge the PR. label Aug 29, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).
https://softwarefactory-project.io/zuul/t/packit-service/buildset/e435ab48f2cb4267b2637d7b13d0de8d

✔️ pre-commit SUCCESS in 1m 45s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit badd457 into packit:main Aug 29, 2023
3 checks passed
@lbarcziova lbarcziova deleted the multiple-project-events-bug branch August 30, 2023 06:47
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.

Multiple run models for type pull_request and id 71383.
2 participants