forked from kubeflow/model-registry
-
Notifications
You must be signed in to change notification settings - Fork 8
Notes on Pull app
Matteo Mortari edited this page Nov 8, 2024
·
3 revisions
the Pull app is widely used in ODH for syncing repos, and we use it to sync from upstream Kubeflow, to midstream this opendatahub-io/model-registry
repo.
There are few gotchas:
- ensure the
tide/merge-method-merge
label is set, this will ensure sync PRs will be merge-committed (not squashed) - the Pull app checks the commits in this repo with the same hash as from upstream
To manage the PRs by this app:
- ensure label is applied.
- list commits and identify which commit you want to keep, and which you want to ignore
- for commits to keep, I mention them in a "keep (link)" in the review
- for commits to skip, I create a revert commit, and I mention them in a "skip (links)" in the review
- providing the link in the review, make it a bit easier to see from upstream where/when it was incorporated midstream.
If I need to skip commits or resolve conflict, I generally create a PR manually, superseeding the one from the bot.
For example, assuming:
odh git@github.com:opendatahub-io/model-registry.git (fetch)
odh git@github.com:opendatahub-io/model-registry.git (push)
origin git@github.com:<your username>/model-registry.git (fetch)
origin git@github.com:<your username>/model-registry.git (push)
upstream git@github.com:kubeflow/model-registry.git (fetch)
upstream git@github.com:kubeflow/model-registry.git (push)
and assuming odh-main
tracks on odh
remote.
I perform a manual operation like the Pull app and resolve the conflicts with:
git checkout main
git pull upstream main
git checkout odh-main
git pull odh main
# I prefer to create a working branch
git checkout -b tarilabs-20240912-sync
git merge --signoff upstream/main
# will need to resolve conflicts at this point,
# using editor
# once conflict is resolved it I stage the resolved file
git commit -s
# Resolution of conflicts done, time to raise a PR
git push origin
# the command above will fail giving me the handy copy-paste, below:
git push --set-upstream origin tarilabs-20240912-sync
# the command above will give me the URL I follow,
# to which I s/kubeflow/opendatahub-io/ in the redirected URL
at this point, refer back to guideline for the happy path and close the superseeded PR.
Some examples:
- happy path example: https://github.com/opendatahub-io/model-registry/pull/110#pullrequestreview-2253713300
- resolving conflicts manually example: https://github.com/opendatahub-io/model-registry/pull/105#issue-2450367065:~:text=model%2Dregistry%23234-,(a%20merge%20commit),docker%2Dcompose%20image%20to%20upstream%C2%A0kubeflow/model%2Dregistry%23230),-superseeds%20%23104