Skip to content

Fix e2e workflow: update SecureSign sample path from v1alpha1 to v1 - #99

Merged
kdacosta0 merged 1 commit into
mainfrom
fix/update-sample-path-v1alpha1-to-v1
Aug 26, 2026
Merged

Fix e2e workflow: update SecureSign sample path from v1alpha1 to v1#99
kdacosta0 merged 1 commit into
mainfrom
fix/update-sample-path-v1alpha1-to-v1

Conversation

@kdacosta0

@kdacosta0 kdacosta0 commented Aug 26, 2026

Copy link
Copy Markdown
Member

Summary

  • The secure-sign-operator repo renamed its sample CRs from rhtas_v1alpha1_*.yaml to rhtas_v1_*.yaml as part of the CRD API graduation from v1alpha1 to v1.
  • The E2E workflow's "Install SecureSign" step still referenced the old config/samples/rhtas_v1alpha1_securesign.yaml path, which no longer exists on the operator's main branch, causing the job to fail with sed: can't read config/samples/rhtas_v1alpha1_securesign.yaml: No such file or directory.
  • Updated all 3 references in .github/workflows/e2e.yml to point at config/samples/rhtas_v1_securesign.yaml instead.
  • Verified the new sample file still contains the same https://your-oidc-issuer-url placeholder used by the sed replacement, and the CR name is still securesign-sample, so no other changes are needed.

Test plan

  • grep -n "v1alpha1" .github/workflows/e2e.yml returns no matches
  • grep -n "rhtas_v1_securesign.yaml" .github/workflows/e2e.yml returns 3 matches
  • E2E GitHub Actions workflow passes on this PR (validates the fix end-to-end against the real operator sample)

Made with Cursor

@qodo-for-securesign

Copy link
Copy Markdown

PR Summary by Qodo

Fix Windows CLI archive downloads and SecureSign E2E path

🐞 Bug fix 🧪 Tests ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Support Windows ZIP binaries across content-gateway download and CDN fallback paths.
• Preserve .exe suffixes when normalizing extracted Windows CLI names.
• Update SecureSign E2E sample path and add archive regression coverage.
Diagram

graph TD
  A["CLI Request"] --> B["OpenShift Strategy"] --> D["Archive Extractor"] --> F["Binary Finder"]
  A --> C["CGW Strategy"] --> D
  D -. "download failure" .-> E["CDN Fallback"] --> D
  G["E2E Workflow"] --> H["SecureSign v1"]
Loading
High-Level Assessment

The targeted approach is appropriate: it extends the existing strategy-specific flows with format-aware extraction while reusing shared download, CDN resolution, and binary lookup helpers. A broader unified archive-dispatch abstraction could reduce minor duplication, but would expand scope without materially improving this focused reliability fix.

Files changed (9) +366 / -21

Bug fix (4) +154 / -18
cgw.goDownload platform-appropriate content-gateway archives +16/-3

Download platform-appropriate content-gateway archives

• Builds '.zip' archive names on Windows and '.tar.gz' names elsewhere. Direct and CDN fallback downloads now use the matching extraction method.

pkg/strategy/cgw/cgw.go

openshift.goAdd ZIP extraction and CDN fallback to OpenShift downloads +54/-13

Add ZIP extraction and CDN fallback to OpenShift downloads

• Recognizes ZIP links, extracts them through a Windows-compatible path, and generalizes stable-version CDN fallback across ZIP and tar.gz archives. Non-archive links retain the existing direct-download behavior.

pkg/strategy/openshift/openshift.go

cgw.goPreserve Windows executable suffixes during binary lookup +8/-2

Preserve Windows executable suffixes during binary lookup

• Uses a Windows-aware normalized link name so renamed candidates resolve to 'cliName.exe' rather than an extensionless path. Direct archive matches remain unchanged.

pkg/support/cgw.go

testSupport.goAdd secure ZIP download and extraction support +76/-0

Add secure ZIP download and extraction support

• Downloads ZIP archives through a temporary file, extracts nested entries with executable permissions, and rejects absolute or traversal paths. The helper supports archive-based CLI strategies and cleans up temporary downloads.

pkg/support/testSupport.go

Tests (4) +209 / -0
openshift_test.goCover ZIP-based content-gateway downloads +37/-0

Cover ZIP-based content-gateway downloads

• Adds an OpenShift strategy test that serves a ZIP archive through ConsoleCLIDownload metadata and verifies the extracted binary.

pkg/strategy/openshift/openshift_test.go

testutil.goAdd ZIP archive construction for strategy tests +20/-0

Add ZIP archive construction for strategy tests

• Introduces a reusable helper for building in-memory ZIP fixtures from named file contents.

pkg/strategy/testutil/testutil.go

cgw_test.goTest cross-platform binary name normalization +68/-0

Test cross-platform binary name normalization

• Adds regression coverage for Windows '.exe' preservation, non-Windows naming, and direct Windows matches that should not require symlinks.

pkg/support/cgw_test.go

testSupport_test.goValidate ZIP extraction and traversal protection +84/-0

Validate ZIP extraction and traversal protection

• Tests extracted contents, nested files, executable permissions, and rejection of malicious parent-directory entries.

pkg/support/testSupport_test.go

Other (1) +3 / -3
e2e.ymlUse the SecureSign v1 sample in E2E installation +3/-3

Use the SecureSign v1 sample in E2E installation

• Replaces all obsolete 'rhtas_v1alpha1_securesign.yaml' references with the graduated 'rhtas_v1_securesign.yaml' path for placeholder substitution, webhook validation, and resource creation.

.github/workflows/e2e.yml

@kdacosta0
kdacosta0 force-pushed the fix/update-sample-path-v1alpha1-to-v1 branch from 01777ff to 3804138 Compare August 26, 2026 07:04
@qodo-for-securesign

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can start a comment with 'qodo' or '@qodo' to chat about any finding

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

The secure-sign-operator repo renamed its sample CRs from
rhtas_v1alpha1_*.yaml to rhtas_v1_*.yaml as part of the CRD API
graduation from v1alpha1 to v1. Update the three references in the
"Install SecureSign" step to point at the new rhtas_v1_securesign.yaml
path so the e2e workflow can find the sample file again.

Also skip the Rekor Search UI tests: the current operator build does
not populate status.rekorSearchUIUrl, so SIGSTORE_REKOR_UI_URL is
never set and the suite fails at BeforeAll with "Missing configuration
for SIGSTORE_REKOR_UI_URL". Exclude that package from the test run
until Rekor Search UI support lands.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kdacosta0
kdacosta0 merged commit 9af4585 into main Aug 26, 2026
6 checks passed
@kdacosta0
kdacosta0 deleted the fix/update-sample-path-v1alpha1-to-v1 branch August 26, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants