Skip to content

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.

Happy path

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.

Resolving conflicts

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.

Examples

Some examples:

Clone this wiki locally