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

/packit retest-failed and /packit rebuild-failed don't work as expected #1375

Closed
1 of 3 tasks
nikromen opened this issue Mar 2, 2022 · 5 comments
Closed
1 of 3 tasks
Assignees
Labels
kind/bug Something isn't working.

Comments

@nikromen
Copy link
Member

nikromen commented Mar 2, 2022

Expected behavior is to restart/rebuild only failed tests/builds.
Currently these commands:

  • rebuild-failed restarts everything - should restart only failed builds
  • retest-failed restarts every tests - should restart only failed tests.

everything seems to working fine to this point. *_targets_override fills up with correct targets to rebuild/retest. Something after that might be broken.

TODO:

  • fix retest-failed
  • fix rebuild-failed
  • fix - getting models from DB with commit is not enough
@nikromen nikromen self-assigned this Mar 2, 2022
@nikromen nikromen added the kind/bug Something isn't working. label Mar 2, 2022
@lachmanfrantisek
Copy link
Member

lachmanfrantisek commented Mar 23, 2022

It looks like it restarts everything for Retry Re-run button in the Checks UI as well...;(

I hit that here: https://github.com/packit/specfile/pull/25/checks?check_run_id=5656718240

@nikromen
Copy link
Member Author

nikromen commented Mar 23, 2022

Do you mean the Re-run button next to a failed job?
Screenshot_20220323_224024

EDIT: Now I can see... you ment the Re-run failed checks button. So yes, when I hit it - every build/test will restart :/ (I noted that firstly failed jobs restarts and after cca 10s the sucessfull ones are restarted too)
But it works for tests only e.g. if we'll try to hit that button here: https://github.com/packit/ogr/pull/688/checks it restarts only failed tests but when we try to re-run failed build everything will restart 😕

And.. we have an issue #1307 to support re-run all checks - when I created this issue the re-run failed checks worked just fine (without restarting passed jobs but I can't 100% tell if I tested it for builds too) ... maybe something went wrong after that?

Also Re-run for individual jobs works correctly... seems like there is something between which overrides the targets_override

(I wonder if this is still somehow related to rebuild/retest commands since it seems like the issue is somewhere else :D)

@lachmanfrantisek
Copy link
Member

lachmanfrantisek commented Mar 24, 2022

Do you mean the Re-run button next to a failed job?

Yes, sorry about the bad text for that, but I really meant Re-run for a single result.

Also Re-run for individual jobs works correctly... seems like there is something between which overrides the targets_override

I don't think so. Maybe I mixed that with something else (multi-job scenario, identifiers,...) but still think it triggered everything...

@nikromen
Copy link
Member Author

I don't think so. Maybe I mixed that with something else (multi-job scenario, identifiers,...) but still think it triggered everything...

Oh you are right... again I tested it only for testing farm... It works... but for builds everything is restarted :/
It definitely worked when Laura implemented #1227 so something definitely overrides the targets_override :D

softwarefactory-project-zuul bot added a commit that referenced this issue Apr 12, 2022
Add option to filter builds/test from comment by a given statuses

Just to add to code more reusability - if we may want to filter models by their different statuses in some CommentEvent - you can now filter them by a given statuses.
And also the main point of this PR - I added some logs so I can see which targets passed to targets_override in logs because I am clueless when debugging #1375 :D

RELEASE NOTES BEGIN

RELEASE NOTES END

Reviewed-by: Laura Barcziová <None>
softwarefactory-project-zuul bot added a commit that referenced this issue Apr 22, 2022
Fix rebuild-failed

Previously /packit rebuild-failed searched in DB for models with matching commit sha and project name. Searching by project name is redundant and it seems like project names in copr and repo's project names can differ (somehow) so result of searching is sometimes empty list.
Related to #1375

RELEASE NOTES BEGIN

RELEASE NOTES END

Reviewed-by: Matej Focko <None>
Reviewed-by: Tomas Tomecek <[email protected]>
softwarefactory-project-zuul bot added a commit that referenced this issue May 6, 2022
Filter most recent targets

for /packit rebuild-retest-failed we want to search for most recent copr/tf models in DB. Currently we search only for models which matches commit sha.
But what if some builds fails and after /packit rebuild-failed all builds succeeds?

we still have that failed model connected to commit sha so after another rebuild-failed we rebuild the previously failed build even if the latest build for corresponding target passed.

aditional functionality of filtering the most recent targets from iterable of models should solve this issue


Related to #1375 and maybe finally closes it? :D

RELEASE NOTES BEGIN

RELEASE NOTES END

Reviewed-by: Laura Barcziová <None>
Reviewed-by: None <None>
Reviewed-by: Tomas Tomecek <[email protected]>
@nikromen
Copy link
Member Author

closed with #1479

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

2 participants