|
| 1 | +# Upstream Rebase Process |
| 2 | + |
| 3 | +This repo vendors a forked `ovn-kubernetes` repo as a git submodule at |
| 4 | +`ovn-kubernetes/`. The fork contains DPF-specific patches on top of upstream |
| 5 | +`ovn-kubernetes`. Use this document to rebase the fork on the latest upstream |
| 6 | +changes, update the submodule pointer in this repo, and push the results. |
| 7 | + |
| 8 | +## Prerequisites |
| 9 | + |
| 10 | +- You have cloned this repo locally. |
| 11 | +- The submodule has an `origin` remote (your fork); you will add the `upstream` remote during setup. |
| 12 | +- Your working trees (both the submodule and this repo) are clean. |
| 13 | +- You will rebase onto `main`, and use a forked branch for test/validation if needed. |
| 14 | + |
| 15 | +## Initialize and configure the submodule |
| 16 | + |
| 17 | +1. From the top-level repo, initialize and update the submodule: |
| 18 | + - `git submodule update --init --recursive ovn-kubernetes` |
| 19 | +2. Enter the submodule: |
| 20 | + - `cd ovn-kubernetes` |
| 21 | +3. Verify remotes: |
| 22 | + - `git remote -v` |
| 23 | +4. If `upstream` is missing, add it: |
| 24 | + - `git remote add upstream https://github.com/ovn-kubernetes/ovn-kubernetes` |
| 25 | +5. Fetch latest refs: |
| 26 | + - `git fetch upstream --prune` |
| 27 | + - `git fetch origin --prune` |
| 28 | + |
| 29 | +## Rebase the fork on upstream |
| 30 | + |
| 31 | +1. In the submodule, checkout `main` and rebase it on upstream: |
| 32 | + - `cd ovn-kubernetes` |
| 33 | + - `git checkout main` |
| 34 | + - `git rebase upstream/master` |
| 35 | +2. Resolve conflicts as needed, then continue the rebase: |
| 36 | + - `git status` |
| 37 | + - `git add <resolved-files>` |
| 38 | + - `git rebase --continue` |
| 39 | +3. If you need to run tests or validation on your fork, create/use a forked branch for that instead of `main`: |
| 40 | + - `git checkout -b <fork-branch>` |
| 41 | +4. Push the rebased `main` branch back to your fork: |
| 42 | + - `git push --force-with-lease origin main` |
| 43 | + |
| 44 | +Notes: |
| 45 | + |
| 46 | +- Use `--force-with-lease` because a rebase rewrites history. |
| 47 | +- If the fork branch is shared, coordinate the rebase with other users. |
| 48 | + |
| 49 | +## Update the submodule in this repo |
| 50 | + |
| 51 | +1. Return to the top-level repo: |
| 52 | + - `cd ..` |
| 53 | +2. Update the submodule pointer to the new fork commit: |
| 54 | + - `git status` |
| 55 | + - `git add ovn-kubernetes` |
| 56 | +3. Commit and push the submodule update: |
| 57 | + - `git commit -m "Bump ovn-kubernetes submodule"` |
| 58 | + - `git push origin <branch>` |
| 59 | + |
| 60 | +## Tags |
| 61 | + |
| 62 | +The current taging strategy for the main branch is to use |
| 63 | +`v<year>.<month>.<date>-<sha of HEAD>`. |
| 64 | + |
| 65 | +for example `v26.1.27-ad5189a` |
| 66 | + |
| 67 | +## Release |
| 68 | + |
| 69 | +Follow the GitHub release process: |
| 70 | + |
| 71 | +1. Go to Releases -> Draft a new release. |
| 72 | +2. Pick a tag using the scheme in the Tags section and target `main`. |
| 73 | +3. Use the tag as the release title. |
| 74 | +4. Add a short summary of key changes and notable fixes, specifically a pointer to the ovn-kubernetes tag/sha. |
| 75 | +5. Mark it as a pre-release/latest release as needed. |
| 76 | +6. Publish the release. |
| 77 | + |
| 78 | +## Artifacts |
| 79 | + |
| 80 | +This results in the following artifcats. |
| 81 | + |
| 82 | +Helm chart repo: `oci://ghcr.io/mellanox/charts/ovn-kubernetes-chart` |
| 83 | + |
| 84 | +Helm chart version `v26.1.27-ad5189a` |
| 85 | + |
| 86 | +Image: `ghcr.io/mellanox/ovn-kubernetes-dpf-fedora:v26.1.27-ad5189a` |
0 commit comments