packit / hardly

Project is archived since Packit team agreed on prioritising work with more benefits and bigger user base.
https://packit.dev/source-git/status
MIT License
0 stars 7 forks source link

Dist-git MR is not closed when the source-git MR is closed #70

Closed csomh closed 2 years ago

csomh commented 2 years ago

Example:

This should work since #62, but for the MRs above, nothing happened.

Looking at the worker logs, the event was received and handled (the source-git repo was cloned and the dist-git repo was updated), but handling ended with a PR already exists: https://gitlab.com/packit-service/rpms/systemd/-/merge_requests/1 message and nothing else was done.

Re-opening the source-git MR produces the same behaviour, that is: there is no update in the dist-git MR.

jpopelka commented 2 years ago

The problem was in the database. It's probably related to the fact that you created src#2 with the same title & description as src#1, packit refused to create a different dist-git MR and hardly couldn't add another relation into db, because the rpms#1 was already there in a relation with the src#1.

I fixed it in the database, so it works in this case. But it's a bug and has to be investigated and fixed.

jpopelka commented 2 years ago

Might be related to packit/packit-service#1504

jpopelka commented 2 years ago

(At least) two things need to be done here:

jpopelka commented 2 years ago

we have to change the condition here because sync_release will no longer return None (but the PR itself) in case of already existing PR

79

jpopelka commented 2 years ago

We need to handle the case when someone creates another source-git PR with the same title and description. Because now, packit refuses to create another PR. We either have to:

* add some more info into the dist-git PR description, which distinguishes it from the already existing PR

Actually, the dist-git MR description contains a link to the src-git MR so "when someone creates another source-git PR with the same title and description" the dist-git MR description would be different and hence this ("packit refuses to create another PR") could not happen.

I no longer understand how the problem was triggered (as I describe in https://github.com/packit/hardly/issues/70#issuecomment-1137086094) nor how to reproduce it.

Closing