Skip to content

NO-ISSUE: Restore e2e-caas-netris-full-install as on-demand only - #169

Open
eliorerz wants to merge 2 commits into
osac-project:mainfrom
eliorerz:netris-caas-ondemand
Open

NO-ISSUE: Restore e2e-caas-netris-full-install as on-demand only#169
eliorerz wants to merge 2 commits into
osac-project:mainfrom
eliorerz:netris-caas-ondemand

Conversation

@eliorerz

@eliorerz eliorerz commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

PR #110 (OSAC-2801) added e2e-caas-netris-full-install.yml (provisions an ephemeral EC2 c5n.metal box, runs a full Netris Spectrum-X simulated lab + OCP SNO + OSAC install, then the CaaS suite), auto-triggered on every PR. It started failing on every PR -- including totally unrelated ones -- with gh: Resource not accessible by personal access token (HTTP 403) when registering the ephemeral EC2 instance as a JIT GitHub Actions runner. That's a separate, still-open token/permissions problem, not addressed by this PR. #166 reverted the whole workflow rather than leave every PR red.

This restores the original file (git show 4416ff26:.github/workflows/e2e-caas-netris-full-install.yml) verbatim, with exactly one substantive change: the changes job's should-run output now also requires github.run_attempt != '1' on pull_request events, so the suite is skipped (not run) on a PR's automatic first check run. schedule/workflow_dispatch/merge_group triggers are untouched -- those always run for real. Also adds a log step (pull_request + attempt 1 only) explaining how to actually trigger it.

Why this works with zero shared-code changes: github.run_attempt is 1 for a workflow's original run and 2+ for each gh run rerun. osac-test-infra's existing shared slash-command-handler.yml (untouched) already finds an existing PR-triggered run for a given workflow at the PR's current head SHA and reruns it on /test <workflow> -- that's exactly attempt 2+. Keeping on: pull_request means there's always a run for the handler to find and rerun; no new trigger mechanism, and zero effect on e2e-bmaas/e2e-vmaas/e2e-caas-full-install's own /test commands (their own workflows and the shared handler are both unmodified).

Test plan

  • YAML parses, yamllint --strict, actionlint, full pre-commit run all pass
  • This PR's own check list shows E2E CaaS Netris Full Install completing quickly as skipped on the initial push (not running, not red) -- proves the JIT-runner-403 path is no longer hit automatically
  • Comment /test e2e-caas-netris-full-install on this PR and confirm the existing slash-command handler finds and reruns the same check (not a new one), and that attempt 2 actually starts the real job (reaches EC2 provisioning) -- expected to still hit the separate JIT-runner-403 issue at that point, which is out of scope here; this only proves it's on-demand now, not that the suite passes end-to-end

Summary by CodeRabbit

  • Tests
    • Added automated end-to-end coverage for the full-install suite.
    • Tests now run on pull requests, merge queues, scheduled daily runs, and on demand.
    • Added safeguards to report and fail the workflow when test execution is unsuccessful or cancelled.
    • Coverage includes validation of key application components during complete installation scenarios.

@openshift-ci-robot

openshift-ci-robot commented Aug 5, 2026

Copy link
Copy Markdown

@eliorerz: This pull request explicitly references no jira issue.

Details

In response to this:

Summary

PR #110 (OSAC-2801) added e2e-caas-netris-full-install.yml (provisions an ephemeral EC2 c5n.metal box, runs a full Netris Spectrum-X simulated lab + OCP SNO + OSAC install, then the CaaS suite), auto-triggered on every PR. It started failing on every PR -- including totally unrelated ones -- with gh: Resource not accessible by personal access token (HTTP 403) when registering the ephemeral EC2 instance as a JIT GitHub Actions runner. That's a separate, still-open token/permissions problem, not addressed by this PR. #166 reverted the whole workflow rather than leave every PR red.

This restores the original file (git show 4416ff26:.github/workflows/e2e-caas-netris-full-install.yml) verbatim, with exactly one substantive change: the changes job's should-run output now also requires github.run_attempt != '1' on pull_request events, so the suite is skipped (not run) on a PR's automatic first check run. schedule/workflow_dispatch/merge_group triggers are untouched -- those always run for real. Also adds a log step (pull_request + attempt 1 only) explaining how to actually trigger it.

Why this works with zero shared-code changes: github.run_attempt is 1 for a workflow's original run and 2+ for each gh run rerun. osac-test-infra's existing shared slash-command-handler.yml (untouched) already finds an existing PR-triggered run for a given workflow at the PR's current head SHA and reruns it on /test <workflow> -- that's exactly attempt 2+. Keeping on: pull_request means there's always a run for the handler to find and rerun; no new trigger mechanism, and zero effect on e2e-bmaas/e2e-vmaas/e2e-caas-full-install's own /test commands (their own workflows and the shared handler are both unmodified).

Test plan

  • YAML parses, yamllint --strict, actionlint, full pre-commit run all pass
  • This PR's own check list shows E2E CaaS Netris Full Install completing quickly as skipped on the initial push (not running, not red) -- proves the JIT-runner-403 path is no longer hit automatically
  • Comment /test e2e-caas-netris-full-install on this PR and confirm the existing slash-command handler finds and reruns the same check (not a new one), and that attempt 2 actually starts the real job (reaches EC2 provisioning) -- expected to still hit the separate JIT-runner-403 issue at that point, which is out of scope here; this only proves it's on-demand now, not that the suite passes end-to-end

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
openshift-ci Bot requested review from amito and ybettan August 5, 2026 21:33
@openshift-ci

openshift-ci Bot commented Aug 5, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eliorerz

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

The pull request process is described 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 Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c183dba8-5bb1-4ea0-a4c8-f7b2dc62e10f

📥 Commits

Reviewing files that changed from the base of the PR and between c24631e and 7f058e7.

📒 Files selected for processing (1)
  • .github/workflows/e2e-caas-netris-full-install.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/e2e-caas-netris-full-install.yml

Walkthrough

Added a GitHub Actions workflow for the CaaS Netris full-install E2E suite. It defines triggers, change-based gating, reusable E2E execution with component image builds, and final failure reporting.

Changes

CaaS Netris full-install E2E

Layer / File(s) Summary
Workflow triggers and change gating
.github/workflows/e2e-caas-netris-full-install.yml
The workflow supports pull requests, merge groups, scheduled runs, and manual dispatch. The changes job filters paths and skips the first automatic pull request attempt.
Reusable E2E execution
.github/workflows/e2e-caas-netris-full-install.yml
The workflow invokes the reusable E2E job with repository context, fork pull-request metadata, a test-infrastructure ref, and four component image build definitions.
E2E status reporting
.github/workflows/e2e-caas-netris-full-install.yml
The e2e job always runs, prints upstream results, and fails when the gating or reusable workflow job fails or is cancelled.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: ok-to-test

Suggested reviewers: amito, ybettan

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ai-Attribution ⚠️ Warning The PR context mentions CodeRabbit, but both PR commits lack Assisted-by or Generated-by trailers; the referenced Claude-authored source commit uses forbidden Co-Authored-By. Add an Assisted-by or Generated-by trailer naming the AI tool to each AI-assisted PR commit. Do not use Co-Authored-By for AI tools.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: restoring the Netris full-install E2E workflow as on-demand only.
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.
No-Hardcoded-Secrets ✅ Passed The PR adds only a GitHub Actions workflow; scans found no hardcoded API keys, tokens, passwords, private keys, embedded URL credentials, or base64-like secret literals.
No-Weak-Crypto ✅ Passed The PR changes only the workflow; searches found no MD5, SHA1, DES, RC4, Blowfish, ECB, crypto implementation, or secret comparison.
No-Injection-Vectors ✅ Passed The PR only adds a GitHub Actions workflow; its run blocks use fixed echo text, and no SQL concat, shell=True, eval/exec, pickle.loads, unsafe yaml.load, os.system, or dangerouslySetInnerHTML appears.
Container-Privileges ✅ Passed The commit touches only a GitHub Actions workflow; it declares no privileged, hostPID/Network/IPC, SYS_ADMIN, root, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed The workflow logs only fixed guidance and upstream job statuses; it does not echo secrets, tokens, credentials, hostnames, or customer data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@eliorerz

eliorerz commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-caas-netris-full-install

@openshift-ci

openshift-ci Bot commented Aug 5, 2026

Copy link
Copy Markdown

@eliorerz: No presubmit jobs available for osac-project/osac@main

Details

In response to this:

/test e2e-caas-netris-full-install

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Triggered: E2E CaaS Netris Full Install

@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: 1

🤖 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 @.github/workflows/e2e-caas-netris-full-install.yml:
- Around line 66-75: Update the workflow’s reusable-workflow invocation to pass
fork-pr-author-association, fork-pr-author, and pr-number from the pull request
event, then add or use the reusable workflow’s authorization guard to reject
unauthorized fork PRs before provision executes. Keep repository and ref
selection unchanged for authorized runs.
🪄 Autofix

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: osac-project/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d0a51b8d-051b-43ca-983b-d77e1584b74d

📥 Commits

Reviewing files that changed from the base of the PR and between 199ddbe and 7b049ab.

📒 Files selected for processing (1)
  • .github/workflows/e2e-caas-netris-full-install.yml

Comment on lines +66 to +75
osac-repo: ${{ github.event.pull_request.head.repo.clone_url || format('https://github.com/{0}.git', github.repository) }}
osac-branch: ${{ github.event.pull_request.head.ref || github.ref_name }}
test-infra-repository: osac-project/osac-test-infra
components: >-
[
{"repo":"${{ github.event.pull_request.head.repo.full_name || github.repository }}","ref":"${{ github.event.pull_request.head.ref || github.ref_name }}","containerfile":"fulfillment-service/Containerfile","imageKey":"service.images.service"},
{"repo":"${{ github.event.pull_request.head.repo.full_name || github.repository }}","ref":"${{ github.event.pull_request.head.ref || github.ref_name }}","containerfile":"osac-operator/Containerfile","imageKey":"operator.image.repository"},
{"repo":"${{ github.event.pull_request.head.repo.full_name || github.repository }}","ref":"${{ github.event.pull_request.head.ref || github.ref_name }}","containerfile":"osac-aap/execution-environment/execution-environment.yaml","imageKey":"aap.bootstrap.image","buildType":"ansible-builder"},
{"repo":"${{ github.event.pull_request.head.repo.full_name || github.repository }}","ref":"${{ github.event.pull_request.head.ref || github.ref_name }}","containerfile":"osac-aap/execution-environment/execution-environment.yaml","imageKey":"aap.configAsCode.eeImage","buildType":"ansible-builder"}
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

workflow="$(mktemp)"
gh api 'repos/osac-project/osac-test-infra/contents/.github/workflows/e2e-caas-netris-full-install.yml?ref=main' \
  --jq '.content' | tr -d '\n' | base64 --decode > "$workflow"

rg -n -C 5 'workflow_call|fork-pr-author-association|fork-pr-author|pr-number|author_association|authorization' "$workflow"
rm -f "$workflow"

Repository: osac-project/osac

Length of output: 603


🏁 Script executed:

#!/bin/bash
set -euo pipefail

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

gh api 'repos/osac-project/osac-test-infra/contents/.github/workflows/e2e-caas-netris-full-install.yml?ref=main' \
  --jq '.content' | tr -d '\n' | base64 --decode > "$tmp/workflow.yml"

printf '%s\n' '--- workflow_call inputs ---'
sed -n '14,150p' "$tmp/workflow.yml"

printf '%s\n' '--- authorization and runner-provisioning references ---'
rg -n -C 8 'fork-pr|author_association|pr-number|pull_request|workflow_dispatch|ec2|runner|provision|uses:' "$tmp/workflow.yml" || true

Repository: osac-project/osac

Length of output: 19166


🏁 Script executed:

#!/bin/bash
set -euo pipefail

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

for path in \
  '.github/workflows/ec2-runner-provision.yml' \
  '.github/workflows/ec2-runner-teardown.yml'
do
  out="$tmp/$(basename "$path")"
  gh api "repos/osac-project/osac-test-infra/contents/${path}?ref=main" \
    --jq '.content' | tr -d '\n' | base64 --decode > "$out"
  printf '\n--- %s ---\n' "$path"
  rg -n -C 10 'workflow_call|fork-pr|author_association|pr-number|pull_request|aws|secrets|github.token|runner|ec2|provision' "$out" || true
done

Repository: osac-project/osac

Length of output: 12228


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file='.github/workflows/e2e-caas-netris-full-install.yml'

printf '%s\n' '--- caller trigger and jobs ---'
sed -n '1,115p' "$file"

printf '%s\n' '--- references to the netris workflow ---'
rg -n -C 6 'e2e-caas-netris-full-install|pull_request|workflow_call|uses:' .github/workflows

Repository: osac-project/osac

Length of output: 50374


Authorization Bypass (CWE-862): Missing Authorization

Reachability: External · Exploitability: Moderate

Block unauthorized fork PRs before provision.

This workflow can run on an explicit PR rerun and passes fork-controlled repository and ref values to the reusable workflow. Neither reusable workflow defines fork authorization inputs or checks before provisioning EC2 and obtaining runner credentials. Pass fork-pr-author-association, fork-pr-author, and pr-number, then reject unauthorized fork PRs before provision starts.

🤖 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 @.github/workflows/e2e-caas-netris-full-install.yml around lines 66 - 75,
Update the workflow’s reusable-workflow invocation to pass
fork-pr-author-association, fork-pr-author, and pr-number from the pull request
event, then add or use the reusable workflow’s authorization guard to reject
unauthorized fork PRs before provision executes. Keep repository and ref
selection unchanged for authorized runs.

PR osac-project#110 (OSAC-2801) added this suite auto-triggered on every PR. It
started failing on every PR (including unrelated ones) with 'gh:
Resource not accessible by personal access token (HTTP 403)' when
registering the ephemeral EC2 instance as a JIT GitHub Actions runner
-- a separate, still-open token/permissions problem, not addressed
here. PR osac-project#166 reverted it entirely rather than leave every PR red.

Restores the original file (git show 4416ff2) with one substantive
change: the changes job's should-run output now also requires
github.run_attempt != '1' on pull_request events, so the suite is
skipped (not run) on a PR's automatic first check run. schedule/
workflow_dispatch/merge_group are untouched -- always real runs.

github.run_attempt is 1 for a workflow's original run and 2+ for each
rerun. osac-test-infra's existing shared slash-command-handler.yml
(unchanged) already finds an existing PR-triggered run for a given
workflow at the PR's head SHA and reruns it on /test <workflow> --
that's exactly attempt 2+. Keeping on: pull_request means there's
always a run to find and rerun. No new mechanism, no shared-code
changes, no effect on e2e-bmaas/e2e-vmaas/e2e-caas-full-install's own
/test commands.
@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.

@eliorerz

eliorerz commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-caas-netris-full-install

@openshift-ci

openshift-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown

@eliorerz: No presubmit jobs available for osac-project/osac@main

Details

In response to this:

/test e2e-caas-netris-full-install

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Triggered: E2E CaaS Netris Full Install

…nstall

Mirrors e2e-caas-full-install.yml's own caller: passes
fork-pr-author-association/-author/pr-number so the reusable workflow
can gate fork PR execution behind the same authorize-fork-pr check
every sibling e2e suite already uses.

Depends on osac-test-infra#324 (adds the corresponding inputs and gate
to the reusable workflow) merging first -- this workflow is on-demand
only (gated on github.run_attempt != '1'), so there's no risk to
automatic CI in the meantime; it would only affect someone running
/test e2e-caas-netris-full-install before that companion PR lands.
@eliorerz

eliorerz commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in 7f058e7 — this workflow had zero fork-PR authorization (unlike every other e2e suite here), confirmed by checking the reusable workflow in osac-test-infra directly: no fork-pr-author-association/-author/pr-number inputs, no authorize-fork-pr call at all.

Real fix needed a companion change since the reusable workflow itself had nothing to hook into: opened osac-test-infra#324 to add the same inputs + the same Authorize fork PR gate (mirroring e2e-bmaas/vmaas/caas-full-install exactly, same position -- right after setup, before any Vault secret fetch). This PR's commit passes those inputs from the caller side.

Ordering note: this depends on osac-test-infra#324 merging first. No risk to automatic CI in the meantime since this workflow only runs on-demand (github.run_attempt != '1' gate) -- it would only matter if someone ran /test e2e-caas-netris-full-install before #324 lands, in which case it'd fail clearly on an invalid-input error rather than silently skipping the auth check.

@eliorerz

eliorerz commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-caas-netris-full-install

@openshift-ci

openshift-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown

@eliorerz: No presubmit jobs available for osac-project/osac@main

Details

In response to this:

/test e2e-caas-netris-full-install

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants