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 Sep 12, 2024
·
2 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 [email protected]:opendatahub-io/model-registry.git (fetch)
odh [email protected]:opendatahub-io/model-registry.git (push)
origin [email protected]:<your username>/model-registry.git (fetch)
origin [email protected]:<your username>/model-registry.git (push)
upstream [email protected]:kubeflow/model-registry.git (fetch)
upstream [email protected]: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 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