Skip to content

WIP: etcd backups - #2383

Draft
bhperry wants to merge 1 commit into
openshift:masterfrom
bhperry:etcd-backups
Draft

WIP: etcd backups#2383
bhperry wants to merge 1 commit into
openshift:masterfrom
bhperry:etcd-backups

Conversation

@bhperry

@bhperry bhperry commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores
    • Updated internal build configuration.
    • No user-visible features, interfaces, or runtime behavior were changed.
    • This maintenance update does not alter application functionality or the end-user experience.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 27, 2026
@openshift-ci

openshift-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bhperry
Once this PR has been reviewed and has the lgtm label, please assign bertinatto for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c130aa59-6ce6-4d7c-9feb-c055a0ad11ea

📥 Commits

Reviewing files that changed from the base of the PR and between 39539af and a9a44e4.

⛔ Files ignored due to path filters (57)
  • go.sum is excluded by !**/*.sum
  • vendor/github.com/openshift/api/config/v1alpha1/register.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1alpha1/types_backup.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1alpha1/zz_generated.deepcopy.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1alpha1/zz_generated.model_name.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/features.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/features/features.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1alpha1/register.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1alpha1/types_etcdbackup.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1alpha1/types_etcdbackuppolicy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.model_name.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/backupspec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/etcdbackupspec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retentionnumberconfig.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retentionpolicy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retentionsizeconfig.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/utils.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/backup.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/config_client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/fake/fake_backup.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/generated_expansion.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/backup.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/interface.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/informers/externalversions/generic.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/backup.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/expansion_generated.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/backupjobreference.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackupjob.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackuppolicy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackuppolicyretentionrule.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackuppolicyspec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackuppolicystatus.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackupspec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackupstatus.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackupstorage.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackupstoragelocal.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackupstoragepvc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/utils.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/etcdbackuppolicy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_etcdbackuppolicy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/informers/externalversions/generic.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1/etcdbackuppolicy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1/interface.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/listers/operator/v1alpha1/etcdbackuppolicy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/listers/operator/v1alpha1/expansion_generated.go is excluded by !**/vendor/**, !vendor/**
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (1)
  • go.mod
🚧 Files skipped from review as they are similar to previous changes (1)
  • go.mod

Walkthrough

go.mod adds pinned replacement directives for the OpenShift API and client-go modules. The directives target corresponding github.com/bhperry fork modules.

Changes

OpenShift module replacements

Layer / File(s) Summary
Configure forked OpenShift modules
go.mod
Adds pinned replacements for github.com/openshift/api and github.com/openshift/client-go using corresponding github.com/bhperry modules.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the pull request's stated objective, adding support for etcd backups through forked OpenShift dependencies.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The commit changes module metadata and vendored generated API/client code only; no test files or added Ginkgo title calls are present.
Test Structure And Quality ✅ Passed The pull request changes no *_test.go files and adds no Ginkgo test blocks or cluster operations, so the test-structure quality check is not applicable.
Microshift Test Compatibility ✅ Passed The commit adds no Ginkgo e2e tests or test declarations; it changes go.mod, go.sum, and vendored API/client code only.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR adds no *_test.go files or Ginkgo declarations; it changes module replacements and vendored API/client code, so SNO test compatibility is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed The commit changes go.mod and vendored OpenShift API/client code only; it adds no deployment, pod template, operator implementation, controller, or runtime scheduling constraint.
Ote Binary Stdout Contract ✅ Passed The patch adds no stdout writes or process-level entry code; repository searches found no package main or Ginkgo suite entry point.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The commit adds no test files, test-directory paths, or Ginkgo declarations, so this IPv6 and disconnected-network check is not applicable.
No-Weak-Crypto ✅ Passed The PR adds fork replacements and generated API/client code only; changed-file scans found no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed PR contains no container privilege violations. The 2 YAML files are generated API manifests without privileged, hostNetwork, hostIPC, hostPID, SYS_ADMIN capabilities, or allowPrivilegeEscalation se...
No-Sensitive-Data-In-Logs ✅ Passed The commit changes dependency metadata and vendored/generated API clients only; added-line and AST searches found no logging/output calls or sensitive values passed to logs.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@go.mod`:
- Around line 5-8: Remove the github.com/openshift/api and
github.com/openshift/client-go replace directives from go.mod. Update their
required versions to compatible upstream releases where available, ensuring the
module builds against upstream OpenShift APIs without relying on private fork
replacements.
- Around line 5-8: Before merging the replacements for github.com/openshift/api
and github.com/openshift/client-go, document the fork provenance and validate
both modules for license compatibility, CVE/OSV advisories, integrity,
SBOM/provenance attestations, and Sigstore/cosign signatures; only retain the
replacements for production use once these checks pass.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 54c9d946-bf7d-4378-8d9a-987169776548

📥 Commits

Reviewing files that changed from the base of the PR and between 0aacacf and 0bdf1bc.

⛔ Files ignored due to path filters (61)
  • go.sum is excluded by !**/*.sum
  • vendor/github.com/openshift/api/config/v1/types_infrastructure.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1alpha1/register.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1alpha1/types_backup.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1alpha1/zz_generated.deepcopy.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1alpha1/zz_generated.model_name.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/features.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/features/features.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1alpha1/register.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1alpha1/types_etcdbackup.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1alpha1/types_etcdbackuppolicy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.model_name.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/baremetalplatformstatus.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/backupspec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/etcdbackupspec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retentionnumberconfig.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retentionpolicy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retentionsizeconfig.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/utils.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/backup.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/config_client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/fake/fake_backup.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/generated_expansion.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/backup.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/interface.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/informers/externalversions/generic.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/backup.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/expansion_generated.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/backupjobreference.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackupjob.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackuppolicy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackuppolicyretentionrule.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackuppolicyspec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackuppolicystatus.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackupspec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackupstatus.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackupstorage.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackupstoragelocal.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/etcdbackupstoragepvc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/utils.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/etcdbackuppolicy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_etcdbackuppolicy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/informers/externalversions/generic.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1/etcdbackuppolicy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1/interface.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/listers/operator/v1alpha1/etcdbackuppolicy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/listers/operator/v1alpha1/expansion_generated.go is excluded by !**/vendor/**, !vendor/**
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (1)
  • go.mod

Comment thread go.mod Outdated
Comment on lines +5 to +8
replace github.com/openshift/api => github.com/bhperry/openshift-api v0.0.0-20260727162810-8887fbaa588a

replace github.com/openshift/client-go => github.com/bhperry/openshift-client-go v0.0.0-20260727173133-6958b40cc63d

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT

cat >"$tmp/go.mod" <<EOF
module downstream.test

go 1.26

require github.com/openshift/library-go v0.0.0
replace github.com/openshift/library-go => $(pwd)
EOF

cat >"$tmp/main.go" <<'EOF'
package main

import _ "github.com/openshift/library-go/pkg/operator/status"

func main() {}
EOF

(cd "$tmp" && go list -deps ./...)

Repository: openshift/library-go

Length of output: 215


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "== go.mod relevant lines =="
sed -n '1,18p' go.mod

echo
echo "== imports of replaced dependencies in tracked Go files =="
rg -n 'github.com/(openshift/api|openshift/client-go)' -g '*.go' | head -80

echo
echo "== changed files stat =="
git diff --stat || true

echo
echo "== deterministic module graph probe =="
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT

cat >"$tmp/go.mod" <<'EOF'
module upstream.test

go 1.20

require github.com/openshift/api v0.0.0 testmodule
EOF

cat >"$tmp/main.go" <<'EOF'
package main

import (
 _ "github.com/openshift/api/image"
)

func main() {
}
EOF

echo "local import with invalid upstream module:"
set +e
(cd "$tmp" && go list -deps ./...)
local_status=$?
set -e
echo "exit=$local_status"

cat >"$tmp/go.mod" <<EOF
module main.test

go 1.20

require github.com/openshift/library-go v0.0.0 testmodule

replace github.com/openshift/library-go => $(pwd)
replace github.com/openshift/api => github.com/openshift/api v0.0.0 localmodule
EOF

cat >"$tmp/main.go" <<'EOF'
package main

import _ "github.com/openshift/library-go/pkg/controller/controllercmd"

func main() {
}
EOF

echo
echo "local main.go import with local replace on main module dependency:"
(cd "$tmp" && go list -deps ./...)
main_status=$?
echo "exit=$main_status"

Repository: openshift/library-go

Length of output: 1155


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "== go.mod relevant lines =="
sed -n '1,28p' go.mod

echo
echo "== imports of replaced dependencies in tracked Go files =="
rg -n 'github.com/(openshift/api|openshift/client-go)' -g 'go.mod' -g '*.go' | sed 's#^`#/`#github/openshift/library-go/#' | awk -F: '{print substr($0, RSTART+1, RLENGTH-RSTART-1) FS $2 ":" $3}' | head -120

echo
echo "== package declarations at each import file =="
python3 - <<'PY'
import pathlib, re
for p in pathlib.Path('go.mod','').glob('**/*.go'):
    txt=p.read_text(errors='ignore')
    if 'github.com/openshift/api' in txt or 'github.com/openshift/client-go' in txt:
        pkg=re.search(r'(?m)^\s*package\s+(\w+)', txt)
        print(f"{p} package={pkg.group(1) if pkg else '<none>'}")
PY

echo
echo "== Go replace behavior probe =="
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT

mkdir -p "$tmp/libpkg"
cat >"$tmp/libpkg/go.mod" <<'EOF'
module example.test/libpkg

go 1.20

require example.test/mainmodule v1.0.0

replace example.test/mainmodule => $PWD/../main

EOF
cat >"$tmp/libpkg/main.go" <<'EOF'
package libpkg

import _ "example.test/mainmodule/pkg"
EOF

mkdir -p "$tmp/main/pkg"
cat >"$tmp/main/go.mod" <<'EOF'
module example.test/mainmodule

go 1.20

replace example.test/mainmodule => example.test/mainmodule v9.9.9

EOF
cat >"$tmp/main/pkg/pkg.go" <<'EOF'
package pkg
EOF

echo "downstream requiring the module containing a replace directive on itself:"
set +e
(cd "$tmp/libpkg" && go list -deps ./... 2>&1)
status=$?
set -e
echo "exit=$status"

Repository: openshift/library-go

Length of output: 1516


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "== go.mod relevant lines =="
sed -n '1,35p' go.mod

echo
echo "== tracked imports of replaced dependencies =="
python3 - <<'PY'
import pathlib,re
for p in pathlib.Path('.').rglob('*.go'):
    if any(part.startswith('.') or part == 'vendor' for part in p.parts):
        continue
    txt=p.read_text(errors='ignore')
    if 'github.com/openshift/api' in txt or 'github.com/openshift/client-go' in txt:
        pkg=re.search(r'(?m)^\s*package\s+(\w+)', txt)
        print(f"{p} package={pkg.group(1) if pkg else '<none>'}")
        deps=re.findall(r'github\.com/openshift/(api|client-go)[^"\n]+', txt)
        print("  deps=", deps)
PY

echo
echo "== Go replace directive non-inheritance probe =="
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT

mkdir -p "$tmp/downstream" "$tmp/libpkg" "$tmp/main/pkg"

cat >"$tmp/libpkg/go.mod" <<'EOF'
module example.dev/libpkg

go 1.20

require example.dev/mainmodule v1.0.0
EOF
cat >"$tmp/libpkg/main.go" <<'EOF'
package libpkg

import _ "example.dev/mainmodule/pkg"
EOF

cat >"$tmp/main/go.mod" <<'EOF'
module example.dev/mainmodule

go 1.20

replace example.dev/mainmodule => example.dev/mainmodule v9.9.9
EOF
mkdir -p "$tmp/main/pkg"
echo 'package pkg' >"$tmp/main/pkg/pkg.go"

echo "Building downstream whose dep's go.mod contains a replace:"
set +e
(cd "$tmp/downstream" && go list -deps ./... 2>&1)
status=$?
set -e
echo "exit=$status"

Repository: openshift/library-go

Length of output: 27275


Remove forked library replacements from go.mod.

replace directives are private to the module where they’re declared, so downstream consumers of github.com/openshift/library-go resolve the upstream OpenShift modules directly. Keeping these replacements here can mask real API changes but won’t be inherited by downstream module graphs.

Use upstream module versions when they’re available, or move forked APIs to packageable code that downstream consumers can rely on explicitly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` around lines 5 - 8, Remove the github.com/openshift/api and
github.com/openshift/client-go replace directives from go.mod. Update their
required versions to compatible upstream releases where available, ensuring the
module builds against upstream OpenShift APIs without relying on private fork
replacements.

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

go mod verify

go list -m -json all |
  jq -s '.[] | select(.Path == "github.com/openshift/api" or
                       .Path == "github.com/openshift/client-go") |
         {Path, Version, Replace}'

for module in github.com/bhperry/openshift-api github.com/bhperry/openshift-client-go; do
  curl -fsSL https://api.osv.dev/v1/query \
    -H 'content-type: application/json' \
    -d "{\"package\":{\"ecosystem\":\"Go\",\"name\":\"$module\"}}" |
    jq --arg module "$module" '{module: $module, vulnerabilities: [.vulns[]?.id]}'
done

Repository: openshift/library-go

Length of output: 274


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "go.mod replacement lines:"
sed -n '1,80p' go.mod | nl -ba | sed -n '1,40p'

echo
echo "Module metadata without vendor:"
GOWORK=off go env -json | jq '{GOENV: .GOENV}' || true
GOWORK=off go list -mod=readonly -m -json all |
  jq -s '.[] | select(.Path == "github.com/openshift/api" or .Path == "github.com/openshift/client-go") |
         {ModulePath: .Path, Version: .Version, Replace: .Replace}'

echo
echo "OSV queries for forked modules:"
for module in github.com/bhperry/openshift-api github.com/bhperry/openshift-client-go; do
  echo "--- $module"
  curl -fsSL https://api.osv.dev/v1/query \
    -H 'content-type: application/json' \
    -d "{\"package\":{\"ecosystem\":\"Go\",\"name\":\"$module\"}}" |
    jq --arg module "$module" '{module: $module, vuln_count: (.vulns|length), vuln_ids: [.vulns[]??.id]} ' || true
done

echo
echo "Repository references:"
rg -n "github\.com/(bhperry|openshift)/(api|client-go)|replace github\.com/openshift/(api|client-go)" -S --glob '!vendor/**' .

Repository: openshift/library-go

Length of output: 224


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "go.mod replacement lines:"
sed -n '1,80p' go.mod | awk '{printf "%6d %s\n", NR, $0}' | sed -n '1,40p'

echo
echo "Module metadata without vendor:"
GOWORK=off go list -mod=readonly -m -json all |
  awk '
    /^\{/ { p=$0; mod=0; repl="" }
    /"Path":/ { match($0,/[^"]*$/); gsub(/[^"]*"/,"",p); mod=substr(p,2) }
    /"Replace":/ { repl=$0 }
    /"Version":/ {
      match($0,/"Version":"([^"]*)"/,a)
      if (mod == "github.com/openshift/api" || mod == "github.com/openshift/client-go")
        printf "%s --- version: %s replace: %s\n", mod, a[1], repl
    }
  '

echo
echo "OSV queries for forked modules:"
for module in github.com/bhperry/openshift-api github.com/bhperry/openshift-client-go; do
  echo "--- $module"
  curl -fsSL https://api.osv.dev/v1/query \
    -H 'content-type: application/json' \
    -d "{\"package\":{\"ecosystem\":\"Go\",\"name\":\"$module\"}}" |
    jq --arg module "$module" '{module: $module, vuln_count: (.vulns|length), vuln_ids: [.vulns[]??.id]}' || true
done

echo
echo "Repository references:"
rg -n "github\.com/(bhperry|openshift)/(api|client-go)|replace github\.com/openshift/(api|client-go)" -S --glob '!vendor/**' .

Repository: openshift/library-go

Length of output: 50376


Document and validate the forked module replacements before merging.

The forks satisfy the pseudo-version requirement, but supply-chain validation must still cover license compatibility, CVE/OSV advisories, module integrity, SBOM/provenance attestations, and Sigstore/cosign signing before these personal-fork replacements are used in a production build.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` around lines 5 - 8, Before merging the replacements for
github.com/openshift/api and github.com/openshift/client-go, document the fork
provenance and validate both modules for license compatibility, CVE/OSV
advisories, integrity, SBOM/provenance attestations, and Sigstore/cosign
signatures; only retain the replacements for production use once these checks
pass.

Source: Path instructions

@bhperry
bhperry force-pushed the etcd-backups branch 3 times, most recently from 831e7ba to c7f9667 Compare July 31, 2026 19:25
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot mentioned this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant