This repository manages the rebases and updates of Velero and OADP-related components, ensuring that dependencies remain in sync and compatible.
It includes scripts (hooks) used by the rebasebot during the rebase process, as well as mappings between upstream and downstream tags.
This document outlines a structured plan for rebasing and updating Velero and its OADP dependencies. The process is organized into π waves, providing a clear, predictable, and safe sequence for applying updates across multiple repositories.
The graph uses colored icons to indicate the type of update:
- π΅ β Full rebase from upstream +
go.modreplace +go.modupdate tags - π β
go.modreplace +go.modupdate tags - π’ β
go.modupdate tags only
These icons help to quickly identify the impact of each update, from full rebase to simple tag updates.
The first wave focuses on independent core dependencies without requiring go.mod replacements:
openshift/docker-distribution
βββπ βmigtools/udistribution- π΅
migtools/kopia
βββπ΅βmigtools/oadp-vmdp - π΅
openshift/restic - π΅
migtools/filebrowser
Note:
migtools/udistributionrequires only a tag update. Note:migtools/kopiarepository must be rebased from the same upstream branch or tag referenced in Velero'sgo.mod. This alignment is automatically handled by the relevant scripts in therebase-configsdirectory. Note:migtools/oadp-vmdpis rebased directly from the downstreammigtools/kopiafork.
The second wave rebases Velero and integrates with the kopia and restic dependencies prepared in the first wave:
migtools/kopia
openshift/restic
βββπ΅βopenshift/velero(restic as submodule in.gitmodules)
Note: This wave introduces a full rebase for Velero, including
go.modupdates.
The third wave rebases and updates Velero plugins and updates the OADP operator:
openshift/velero
βββπ΅βmigtools/kubevirt-velero-plugin
βββπ΅βopenshift/velero-plugin-for-csi(also requiresmigtools/kopia)
βββπ βopenshift/oadp-operator
βββπ΅βopenshift/velero-plugin-for-aws
βββπ΅βopenshift/velero-plugin-for-gcp
βββπ΅βopenshift/velero-plugin-for-legacy-aws
βββπ΅βopenshift/velero-plugin-for-microsoft-azure
Note:
velero-plugin-for-csirequires both Velero and Kopia as dependencies.
The fourth wave focuses on Non-Admin OADP components:
-
openshift/velero
βββπ βmigtools/oadp-non-admin#go.modreplace + update
βββπ βopenshift/openshift-velero-plugin(also requiresopenshift/docker-distribution/v3)#go.modreplace + update
βββπ βmigtools/kubevirt-datamover-controller
βββπ βmigtools/oadp-vm-file-restore -
openshift/oadp-operator
βββπ’βmigtools/oadp-non-admin# only tag update
βββπ’βopenshift/openshift-velero-plugin(also requiresmigtools/udistribution)# only tag update
Note: This wave is blocked only by the
openshift/oadp-operatorupdate from Wave III.
The final wave updates the OADP Must-Gather and CLI components:
-
openshift/velero
βββπ βopenshift/oadp-must-gather
βββπ βmigtools/oadp-cli(also requiresmigtools/kopia,migtools/oadp-non-admin,openshift/oadp-operator)
βββπ βmigtools/kubevirt-datamover-plugin(also requiresmigtools/kubevirt-datamover-controller) -
openshift/oadp-operator
migtools/oadp-non-admin
βββπ’βopenshift/oadp-must-gather
Note: This wave is effectively gated only by the
migtools/oadp-non-adminupdate from previous IV Wave; all other components are already ready.
The run-oadp-rebase.sh script provides a unified interface for running rebase operations.
-
Secrets Directory: Create
~/.rebasebot/secrets/with GitHub App private keys:oadp-rebasebot-app-keyoadp-rebasebot-cloner-key
-
Container Runtime: Install Docker or Podman
- Podman VM clock drift: After macOS sleep/hibernate, the podman VM clock can drift significantly, causing GitHub App JWT authentication to fail with
401 Bad credentials. Fix with:podman machine ssh "sudo date -s @$(date +%s)"
Open issue: podman-container-tools/podman#27293
/tmpvolume mounts fail: macOS's/tmpis a symlink to/private/tmp, which podman can't resolve for volume mounts. Use--working-dirwith a path under$HOMEinstead (e.g.--working-dir ~/.cache/oadp-rebase-workdir), or use/private/tmpdirectly.
# Run single repository rebase
./run-oadp-rebase.sh -b oadp-dev kopia
# Run entire wave
./run-oadp-rebase.sh -w 1
# Dry run (preview changes without applying)
./run-oadp-rebase.sh -d -w 2
# Test configuration locally
./run-oadp-rebase.sh -t -b oadp-dev kopia-d, --dry-run- Preview changes without applying them-w, --wave- Run an entire wave (1-5)-b, --branch BRANCH- Specify target branch (default: oadp-dev)-t, --test- Test configuration only (no rebase)-r, --remote- Use remote configuration files-s, --secrets-dir DIR- Custom secrets directory
# Rebase kopia for oadp-dev branch
./run-oadp-rebase.sh -b oadp-dev kopia
# Rebase kopia for oadp-1.5 branch
./run-oadp-rebase.sh -b oadp-1.5 kopia
# Run wave 1 with dry-run
./run-oadp-rebase.sh -d -w 1
# Run wave 2 for oadp-1.5 branch
./run-oadp-rebase.sh -b oadp-1.5 -w 2
# Test velero configuration
./run-oadp-rebase.sh -t -b oadp-dev veleroWhen rebasebot runs with --conflict-policy strict and detects that upstream content was lost during cherry-picking, it stops with:
ERROR - Manual intervention is needed to rebase <source> into <dest>
The working directory (.rebase/) is preserved with three remotes configured:
sourceβ upstream repositorydestβ downstream repositoryrebaseβ intermediate fork for PRs
Rebasebot starts from source/<upstream-branch> (current upstream) and cherry-picks all downstream-only commits on top. The downstream history often includes old merge commits from previous rebasebot runs (e.g., "Merge upstream:main into oadp-dev"). When these are cherry-picked with -Xtheirs, they can downgrade dependencies back to old versions because the merge commit's conflict resolution predates the current upstream.
# 1. Enter the working directory
cd .rebase
# 2. Check the git log to find the last good commit (before the problematic merge cherry-pick)
git log --oneline -10
# 3. Reset to the commit before the bad cherry-pick
# (the last meaningful downstream commit, before old merge commits)
git reset --hard <last-good-commit>
# 4. Verify upstream content was restored
git diff source/<upstream-branch> -- Dockerfile
git diff source/<upstream-branch> -- go.mod
# These should be empty or show only intentional downstream differences
# 5. Run the post-rebase hooks manually using local checkout
# Check the repo's rebase-config .env.sh file to identify which hooks are needed.
# Hook scripts are located in rebasebot-hook-scripts/ in this repository.
# Example for a repo that uses go-replace and go-mod-tidy hooks:
# Run the go-replace hook (adds go.mod replace directives for downstream dependencies)
../rebasebot-hook-scripts/go-replace_velero_<branch>.sh
# Run the go-mod-tidy hook (runs go mod tidy, go vet, and commits)
REBASEBOT_SOURCE=<upstream-branch> \
REBASEBOT_GIT_USERNAME="oadp-team-rebase-bot" \
REBASEBOT_GIT_EMAIL="oadp-maintainers@redhat.com" \
../rebasebot-hook-scripts/go-mod-tidy-and-commit.sh
# 6. Verify the result
git log --oneline -5
git status
# 7. Set up auth for pushing (if needed)
gh auth setup-git
# Or use SSH:
# git remote set-url rebase git@github.com:oadp-rebasebot/<repo>.git
# 8. Push to the rebase branch
git push rebase HEAD:rebase-bot-<branch> --forceNote: Check the corresponding config in
rebase-configs/(e.g.,openshift_velero_plugin_for_gcp_oadp-dev.env.sh) to see which hook scripts are required for each repository and branch.
Note: After pushing, you can create a PR manually from the rebase fork to the downstream repo, or re-run rebasebot β it will detect the existing branch and create/update the PR automatically.
Tip: To prevent rebasebot from overwriting your manual fixes, add the
rebase/manuallabel to the PR.
This structured π wave approach allows for:
- Fewer conflicts Independent components are updated first, so thereβs less chance of breaking anything.
- Scheduled updates Each wave can be run at any time. Rebasebot will only create a Pull Request if the dependent repository has been updated or rebased, ensuring that changes are propagated correctly across all waves.
- CI at any time All Pull Requests trigger Prow and GitHub Actions, so developers and QA can run automated tests (mandatory and optional) even before the rebase is applied.
- Predictable and traceable updates Each wave clearly shows which components depend on others and when changes are applied. This makes it easy to understand the update sequence and allows developers to step in if any merge conflicts canβt be automatically resolved.
- Frequent rebases and updates Running rebases more often helps catch merge conflicts and potential compatibility issues early, reducing the risk of problems accumulating over time.
By following this plan, oadp-team can safely perform rebases and updates across multiple repositories in a predictable, auditable manner.