Skip to content

fix: switch E2E CI from cli_server to cgw strategy - #93

Merged
petrpinkas merged 1 commit into
mainfrom
fix-e2e-cli-strategy
Jul 28, 2026
Merged

fix: switch E2E CI from cli_server to cgw strategy#93
petrpinkas merged 1 commit into
mainfrom
fix-e2e-cli-strategy

Conversation

@sampras343

Copy link
Copy Markdown
Member

Summary

Switch the E2E workflow from CLI_STRATEGY=cli_server to CLI_STRATEGY=cgw with the Developer Portal URL. The cli-server is being removed from the operator (securesign/secure-sign-operator#2143).

Changes

  • Add CLI_CGW_VERSION: "1.4.2" env var at the workflow top level
  • Replace CLI_STRATEGY: cli_server / CLI_SERVER_URL with CLI_STRATEGY: cgw / CGW_URL using the version env var
  • Remove cli-server.local from /etc/hosts

Depends on

The cli-server is being removed from the operator. Switch the E2E
workflow to use the cgw strategy with the Developer Portal URL for
CLI binary downloads. The version is controlled by the CLI_CGW_VERSION
env var at the top of the workflow. Also remove cli-server.local
from /etc/hosts.

Signed-off-by: Sachin Sampras M <sampras343@gmail.com>
@qodo-for-securesign

Copy link
Copy Markdown

PR Summary by Qodo

Switch E2E CLI downloads to the content gateway

🐞 Bug fix ⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Switch E2E CLI downloads from retiring cli-server to the content gateway.
• Centralize the tested CLI version in workflow-level configuration.
• Remove the obsolete cli-server hostname mapping.
Diagram

graph TD
  A["E2E Workflow"] -->|runs| B["E2E Tests"] -->|selects| C["CGW Strategy"] -->|downloads versioned CLIs| D["Developer Portal"]
Loading
High-Level Assessment

The direct switch to the existing CGW strategy is the appropriate approach because cli-server is being removed from the operator. Keeping the CLI version as a workflow-level variable preserves explicit, centralized version control, while retaining cli-server or introducing custom download logic would depend on deprecated infrastructure or duplicate existing strategy behavior.

Files changed (1) +4 / -3

Other (1) +4 / -3
e2e.ymlRoute E2E CLI downloads through the content gateway +4/-3

Route E2E CLI downloads through the content gateway

• Adds a workflow-level CLI version and configures E2E tests to use the CGW strategy with a versioned Developer Portal URL. Removes the obsolete cli-server.local hosts entry because the workflow no longer contacts the operator-hosted CLI server.

.github/workflows/e2e.yml

@qodo-for-securesign

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Content gateway path malformed 🐞 Bug ≡ Correctness
Description
The new CGW_URL omits the required /cgw path segment, causing the strategy to construct CLI
download URLs under the wrong endpoint. CLI prerequisite setup will fail, preventing the E2E tests
from running.
Code

.github/workflows/e2e.yml[128]

+          CGW_URL: "https://developers.redhat.com/content-gateway/file/RHTAS/${{ env.CLI_CGW_VERSION }}"
Relevance

⭐⭐⭐ High

PR #67 documents the exact required /cgw path; omission deterministically breaks downloads.

PR-#67

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The documented CGW configuration includes /content-gateway/file/cgw/RHTAS/ (README.md lines
36–44). The strategy directly appends the archive filename to this base and returns an error when
downloading and resolving it fails (pkg/strategy/cgw/cgw.go lines 28–55); E2E setup requires these
CLI downloads to succeed before tests proceed (test/cosign/cosign_sign_verify_test.go lines
57–64).

README.md[36-44]
pkg/strategy/cgw/cgw.go[28-55]
test/cosign/cosign_sign_verify_test.go[57-64]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The E2E workflow configures a Content Gateway base URL that omits the documented `/cgw` path segment. Update it to `https://developers.redhat.com/content-gateway/file/cgw/RHTAS/${{ env.CLI_CGW_VERSION }}` so the strategy constructs valid CLI archive URLs.

## Issue Context
The `cgw` strategy appends each platform-specific archive filename directly to `CGW_URL`. The repository documentation defines the base path as `/content-gateway/file/cgw/RHTAS/<version>`.

## Fix Focus Areas
- .github/workflows/e2e.yml[128-128]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

Comment thread .github/workflows/e2e.yml
CLI_STRATEGY: cli_server
CLI_SERVER_URL: "http://cli-server.local"
CLI_STRATEGY: cgw
CGW_URL: "https://developers.redhat.com/content-gateway/file/RHTAS/${{ env.CLI_CGW_VERSION }}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Content gateway path malformed 🐞 Bug ≡ Correctness

The new CGW_URL omits the required /cgw path segment, causing the strategy to construct CLI
download URLs under the wrong endpoint. CLI prerequisite setup will fail, preventing the E2E tests
from running.
Agent Prompt
## Issue description
The E2E workflow configures a Content Gateway base URL that omits the documented `/cgw` path segment. Update it to `https://developers.redhat.com/content-gateway/file/cgw/RHTAS/${{ env.CLI_CGW_VERSION }}` so the strategy constructs valid CLI archive URLs.

## Issue Context
The `cgw` strategy appends each platform-specific archive filename directly to `CGW_URL`. The repository documentation defines the base path as `/content-gateway/file/cgw/RHTAS/<version>`.

## Fix Focus Areas
- .github/workflows/e2e.yml[128-128]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@petrpinkas
petrpinkas merged commit 6d11307 into main Jul 28, 2026
6 checks passed
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