-
Notifications
You must be signed in to change notification settings - Fork 88
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
propose-downstream: Avoid creating divergant git branches #1724
Comments
Hi @gotmax23! That's a good suggestion. For now, you can let Packit open a single pull request and handle the other branches yourself. But I cannot find a nice way to open a second pull-request from a Packit's fork. Maybe using a Regarding the implementation:
|
The user interface doesn't show the option, but it's possible. See https://src.fedoraproject.org/rpms/packit/pull-request/372 and https://src.fedoraproject.org/rpms/packit/pull-request/373. I created one with https://src.fedoraproject.org/fork/gotmax23/rpms/packit/diff/rawhide..1724_test and another with https://src.fedoraproject.org/fork/gotmax23/rpms/packit/diff/f37..1724_test |
This issue has been marked as stale because it hasn't seen any Stale issues are closed after 14 days, unless the label is removed This is done in order to ensure that open issues are still relevant. Thank you for your contribution! 🦄 🚀 🤖 (Note: issues labeled with pinned or EPIC are |
/me silences the user hostile stale issue bot |
Avoid issue: packit/packit#1724 Signed-off-by: Cristian Le <[email protected]>
Slight fix to the PR targets for Fedora. There is an [issue](packit/packit#1724) that commits there diverge, so I'll have to manually create PRs on branches until then. Also, need to add `.idea` to gitignore otherwise sdist pre-commit check complains. Maybe a similar thing will be needed for vs-code and across the other projects? Signed-off-by: Cristian Le <[email protected]>
This would be a very nice improvement! We've kept |
Maybe it's not possible in the UI, but could it be achieved in the api backend. I did make new PRs on my own fork from the same branch, but a simple workaround is to make a new branch from the original one (should be the case to allow branch specific changes) amd then make a PR against that I think the workflow should be similar to the
Edge-case: Only rawhide PR has been merged and all other branches are currently divergent. This expands on step 2 above:
(Also impact is rather medium or more because it ensures we follow fedora packaging guidelines) |
The issue with the implementation is that for now, the runs are quite separated and you can't easily report/rerun per group. Otherwise, it's easy. In the time of opening a PR, we can just run the command to create a PR multiple times with different attributes. The easest (but a bit hackish) to implement might be to let user configure the set of branches that shares the same run. (This will allow us to know that sooner than from the git.) |
Do a research in general and also on using Gitlab (for CentOs Stream and probably future integration) One example could be: do a PR just for rawhide and then use other options/tools to automate merging on other branches. |
This would be excellent, we recently adopted packit for one of our repos and found that we could no longer fast forward, while this is workable, the result is we will no longer able to compare our branches to see any fixes at a glance. In the past we would compare branches to quickly glance and easily find what was different from f39 or f37, but now that will be a little bit more effort. We certainly want to keep using packit for the reduction in day to day steps but, we would certainly prefer to maintain the fastforwardable nature if possible. |
For reference if it helps, this is the code fbrnch is using for gitMergeable |
Notes from refinement
|
Thinking about this, we can even do a similar thing:
Example config: - job: pull_from_upstream
trigger: release
dist_git_branches:
- fedora-rawhide
create_pull_request_to:
- fedora-all |
I like this, but it allows for "impossible" combinations: - job: pull_from_upstream
trigger: release
dist_git_branches:
- f40
- epel9
create_pull_request_to:
- fedora-rawhide
- epel8 What about something similar to what we support with - job: pull_from_upstream
trigger: release
dist_git_branches:
fedora-rawhide:
open_pull_requests_for: [fedora-all]
epel9: {} |
Sounds good. One note on Let me understand the workflow a bit:
My thought is that in this interface the latter part could be split as a separate job like Another interface could be:
|
@nforro @lachmanfrantisek I think that as a first implementation, to keep things simple on the packit side, we don't want to check if the branch can be fast forwarded, right? Is up to the user to be sure this feature can be used, right? I will look for the Thinking at the case when a branch can't be fast-forwarded, the user will have to change the configuration, removing the non fast-forwardable branch from the |
Additionally set propose-downstream to fedora-rawhide until packit/packit#1724 is resolved. Co-authored-by: Huijing Hei <[email protected]>
I think I prefer this flow compared to the |
Rebasing interface might still be necessary at some point. Here's an example that I just encountered:
The order where the new PRs are created only after the main PR is merged, would help a lot in this situation, but there are other situation where things can unexpectedly diverge, e.g. rebuilds due to SOVERSION change, work on CI backend, etc. |
Indeed. Good point. |
@travier @LecrisUT I think I get your points. Unfortunately from the packit code perspective this imply more changes (the For this reason I would start with a simple and not at all perfect solution. Where, it is up to the user to be careful to map only fast-forwardable branches. But still, if something goes wrong (and you listed a lot of possibilities that can make things go wrong), there should be a workaround and I think that changing the configuration and retriggering the propose-downstream job should do the trick even though it is not a good user experience; I will try and test it out. As next step I think that having the As last step, we can work on splitting up the The last two points can be follow-up cards of the very basic first implementation. |
@travier @LecrisUT , as Maja has suggested, your approach sounds really valid but I am worried it will take a significant time to make happen. So, unless we have a helping hand from someone outside the team, we need to start small..;) But, I am glad we have it here so we can continue on this once we are done with a basic implementation. Regarding the first iteration, I would:
@majamassarini could you please create a new cards for these follow-ups so it's not lost in history when we close this card? |
Regarding the config schema, I like the mapping style @nforro has suggested. |
Allow dist_git_branches to be a dictionary now, dist_git_branches can be or a list of strings: ["rawhide", "fedora-stable"] or a complex dictionary { "rawhide": { "fast_forward_merge_into": ["f40"] }, "fedora-stable": {} } Related with #1724 Should fix #2375 update documentation Reviewed-by: František Lachman <[email protected]> Reviewed-by: Maja Massarini Reviewed-by: Laura Barcziová Reviewed-by: Nikola Forró
packit/packit-service@d2459ec
Whenever possible, I like to keep my distgit branches merged. It eases maintainability and testing, and ensures that the package isn't too different between Fedora releases. I make exceptions when there are different upstream major versions or when EPEL packaging quirks would require too many conditionals.
packit propose-downstream
breaks this, because it creates separate PRs with separate commits for each release, even when the branches are merged. This should be made configurable to allow using the same commit for multiple branches. I believe Pagure allows submitting PRs from the same fork branch to multiple source branches, so with this approach, packit wouldn't always need to create separate branches.Packit could also determine when the distgit branches are perfectly merged and just do this automatically, but that can be a future improvement.
The text was updated successfully, but these errors were encountered: