Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 58 additions & 54 deletions pkg/test/extensions/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,121 +213,125 @@ var extensionBinaries = []TestBinary{
},

// Extensions in other payload images
{
imageTag: "hyperkube",
binaryPath: "/usr/bin/k8s-tests-ext.gz",
},
{
imageTag: "machine-api-operator",
binaryPath: "/machine-api-tests-ext.gz",
},
{
imageTag: "aws-machine-controllers",
binaryPath: "/machine-api-provider-aws-tests-ext.gz",
},
{
imageTag: "cluster-control-plane-machine-set-operator",
binaryPath: "/cluster-control-plane-machine-set-operator-ext.gz",
imageTag: "cli",
binaryPath: "/usr/bin/oc-tests-ext.gz",
},
{
imageTag: "olm-operator-controller",
binaryPath: "/usr/bin/olmv1-tests-ext.gz",
imageTag: "cloud-credential-operator",
binaryPath: "/usr/bin/cloud-credential-tests-ext.gz",
},
{
imageTag: "machine-config-operator",
binaryPath: "/usr/bin/machine-config-tests-ext.gz",
imageTag: "cluster-authentication-operator",
binaryPath: "/usr/bin/cluster-authentication-operator-tests-ext.gz",
},
{
imageTag: "cluster-monitoring-operator",
binaryPath: "/usr/bin/cluster-monitoring-operator-tests-ext.gz",
imageTag: "cluster-cloud-controller-manager-operator",
binaryPath: "/usr/bin/cloud-controller-manager-aws-tests-ext.gz",
},
{
imageTag: "cluster-storage-operator",
binaryPath: "/usr/bin/cluster-storage-operator-tests-ext.gz",
imageTag: "cluster-config-operator",
binaryPath: "/usr/bin/cluster-config-operator-tests-ext.gz",
},
{
imageTag: "cluster-kube-apiserver-operator",
binaryPath: "/usr/bin/cluster-kube-apiserver-operator-tests-ext.gz",
imageTag: "cluster-control-plane-machine-set-operator",
binaryPath: "/cluster-control-plane-machine-set-operator-ext.gz",
},
{
imageTag: "cluster-openshift-apiserver-operator",
binaryPath: "/usr/bin/cluster-openshift-apiserver-operator-tests-ext.gz",
imageTag: "cluster-etcd-operator",
binaryPath: "/usr/bin/cluster-etcd-operator-tests-ext.gz",
},
{
imageTag: "openshift-apiserver",
binaryPath: "/usr/bin/openshift-apiserver-tests-ext.gz",
imageTag: "cluster-image-registry-operator",
binaryPath: "/usr/bin/cluster-image-registry-operator-tests-ext.gz",
},
{
imageTag: "oauth-apiserver",
binaryPath: "/usr/bin/oauth-apiserver-tests-ext.gz",
imageTag: "cluster-ingress-operator",
binaryPath: "/usr/bin/cluster-ingress-operator-tests-ext.gz",
},
{
imageTag: "service-ca-operator",
binaryPath: "/usr/bin/service-ca-operator-tests-ext.gz",
imageTag: "cluster-kube-apiserver-operator",
binaryPath: "/usr/bin/cluster-kube-apiserver-operator-tests-ext.gz",
},
{
imageTag: "cluster-kube-controller-manager-operator",
binaryPath: "/usr/bin/cluster-kube-controller-manager-operator-tests-ext.gz",
},
{
imageTag: "cluster-kube-scheduler-operator",
binaryPath: "/usr/bin/cluster-kube-scheduler-operator-tests-ext.gz",
},
{
imageTag: "cluster-kube-storage-version-migrator-operator",
binaryPath: "/usr/bin/cluster-kube-storage-version-migrator-operator-tests-ext.gz",
},
{
imageTag: "operator-lifecycle-manager",
binaryPath: "/usr/bin/olmv0-tests-ext.gz",
imageTag: "cluster-monitoring-operator",
binaryPath: "/usr/bin/cluster-monitoring-operator-tests-ext.gz",
},
{
imageTag: "cluster-node-tuning-operator",
binaryPath: "/usr/bin/cluster-node-tuning-operator-test-ext.gz",
},
{
imageTag: "cluster-openshift-apiserver-operator",
binaryPath: "/usr/bin/cluster-openshift-apiserver-operator-tests-ext.gz",
},
{
imageTag: "cluster-openshift-controller-manager-operator",
binaryPath: "/usr/bin/cluster-openshift-controller-manager-operator-tests-ext.gz",
},
{
imageTag: "openshift-controller-manager",
binaryPath: "/usr/bin/openshift-controller-manager-tests-ext.gz",
imageTag: "cluster-storage-operator",
binaryPath: "/usr/bin/cluster-storage-operator-tests-ext.gz",
},
{
imageTag: "cluster-config-operator",
binaryPath: "/usr/bin/cluster-config-operator-tests-ext.gz",
imageTag: "cluster-version-operator",
binaryPath: "/usr/bin/cluster-version-operator-tests.gz",
},
Comment on lines +293 to 295
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, read the file around the disputed lines to understand the context
cat -n pkg/test/extensions/binary.go | sed -n '280,310p'

Repository: openshift/origin

Length of output: 1148


🏁 Script executed:

# Get the full extensionBinaries list to understand naming patterns
cat -n pkg/test/extensions/binary.go | sed -n '221,335p'

Repository: openshift/origin

Length of output: 4171


🏁 Script executed:

# Search for references to cluster-version-operator binary paths in the codebase
rg "cluster-version-operator.*\.gz" -B 2 -A 2

Repository: openshift/origin

Length of output: 321


🏁 Script executed:

# Search for any build or image definitions that might show what binaries are created
fd -e "Dockerfile" -e "Makefile" -e "*.sh" | head -20 | xargs -I {} grep -l "cluster-version-operator" {} 2>/dev/null || echo "No direct matches"

Repository: openshift/origin

Length of output: 77


🏁 Script executed:

# Look for any references to "-tests.gz" vs "-tests-ext.gz" patterns
rg "\-tests.*\.gz|\-test.*\.gz" | head -30

Repository: openshift/origin

Length of output: 3135


🏁 Script executed:

# Verify if there are any other references to cluster-version-operator in the codebase
# that might clarify what the actual binary filename should be
rg "cluster-version-operator" --type go -B 2 -A 2 | head -50

Repository: openshift/origin

Length of output: 5302


🏁 Script executed:

# Check git history to see if this was recently changed
cd pkg/test/extensions && git log --oneline -20 -- binary.go 2>/dev/null || echo "Git log not available"

Repository: openshift/origin

Length of output: 111


Fix missing -ext suffix in cluster-version-operator binary path

Line 294 has /usr/bin/cluster-version-operator-tests.gz, which deviates from the naming convention used consistently across all other ~30 entries in this list. Every other operator uses -tests-ext.gz (or -test-ext.gz). The correct path should be /usr/bin/cluster-version-operator-tests-ext.gz. If this file is not present in the payload image, extraction will fail and block the entire test run.

Proposed fix
  {
  	imageTag:   "cluster-version-operator",
- 	binaryPath: "/usr/bin/cluster-version-operator-tests.gz",
+ 	binaryPath: "/usr/bin/cluster-version-operator-tests-ext.gz",
  },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
imageTag: "cluster-version-operator",
binaryPath: "/usr/bin/cluster-version-operator-tests.gz",
},
imageTag: "cluster-version-operator",
binaryPath: "/usr/bin/cluster-version-operator-tests-ext.gz",
},
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/test/extensions/binary.go` around lines 293 - 295, The binaryPath value
for the entry with imageTag "cluster-version-operator" is missing the "-ext"
suffix; update the map entry where imageTag == "cluster-version-operator" (the
struct literal containing imageTag and binaryPath) to set binaryPath to
"/usr/bin/cluster-version-operator-tests-ext.gz" so it matches the naming
convention used by the other operator entries and prevents extraction failures.

{
imageTag: "cluster-etcd-operator",
binaryPath: "/usr/bin/cluster-etcd-operator-tests-ext.gz",
imageTag: "hyperkube",
binaryPath: "/usr/bin/k8s-tests-ext.gz",
},
{
imageTag: "cluster-kube-scheduler-operator",
binaryPath: "/usr/bin/cluster-kube-scheduler-operator-tests-ext.gz",
imageTag: "machine-api-operator",
binaryPath: "/machine-api-tests-ext.gz",
},
{
imageTag: "cluster-image-registry-operator",
binaryPath: "/usr/bin/cluster-image-registry-operator-tests-ext.gz",
imageTag: "machine-config-operator",
binaryPath: "/usr/bin/machine-config-tests-ext.gz",
},
{
imageTag: "cluster-version-operator",
binaryPath: "/usr/bin/cluster-version-operator-tests.gz",
imageTag: "oauth-apiserver",
binaryPath: "/usr/bin/oauth-apiserver-tests-ext.gz",
},
{
imageTag: "cluster-node-tuning-operator",
binaryPath: "/usr/bin/cluster-node-tuning-operator-test-ext.gz",
imageTag: "olm-operator-controller",
binaryPath: "/usr/bin/olmv1-tests-ext.gz",
},
{
imageTag: "cli",
binaryPath: "/usr/bin/oc-tests-ext.gz",
imageTag: "openshift-apiserver",
binaryPath: "/usr/bin/openshift-apiserver-tests-ext.gz",
},
{
imageTag: "cluster-authentication-operator",
binaryPath: "/usr/bin/cluster-authentication-operator-tests-ext.gz",
imageTag: "openshift-controller-manager",
binaryPath: "/usr/bin/openshift-controller-manager-tests-ext.gz",
},
{
imageTag: "cluster-cloud-controller-manager-operator",
binaryPath: "/usr/bin/cloud-controller-manager-aws-tests-ext.gz",
imageTag: "operator-lifecycle-manager",
binaryPath: "/usr/bin/olmv0-tests-ext.gz",
},
{
imageTag: "cloud-credential-operator",
binaryPath: "/usr/bin/cloud-credential-tests-ext.gz",
imageTag: "ovn-kubernetes",
binaryPath: "/usr/bin/ovn-kubernetes-tests-ext.gz",
},
{
imageTag: "cluster-ingress-operator",
binaryPath: "/usr/bin/cluster-ingress-operator-tests-ext.gz",
imageTag: "service-ca-operator",
binaryPath: "/usr/bin/service-ca-operator-tests-ext.gz",
},
}

Expand Down