Skip to content

[ROSAENG-1371] chore: migrate e2e build infrastructure to boilerplate#247

Merged
openshift-merge-bot[bot] merged 6 commits into
openshift:masterfrom
TheUndeadKing:ROSAENG-1371
Jul 3, 2026
Merged

[ROSAENG-1371] chore: migrate e2e build infrastructure to boilerplate#247
openshift-merge-bot[bot] merged 6 commits into
openshift:masterfrom
TheUndeadKing:ROSAENG-1371

Conversation

@TheUndeadKing

@TheUndeadKing TheUndeadKing commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

cleanup

What this PR does / why we need it?

Background:
After enabling boilerplate conventions in commit f448559, the project now automatically includes boilerplate/openshift/golang-osd-e2e/project.mk and standard.mk via boilerplate/generated-includes.mk.
However, the repository still contained local copies of these files that were either duplicating or overriding the boilerplate-provided functionality.

Changes:

  • Removed test/e2e/project.mk - duplicate of boilerplate's version with custom variable names (E2E_SUITE_IMAGE_* vs standard E2E_IMAGE_*)
  • Removed test/e2e/e2e-image-job.yaml - custom job definition, no longer referenced by CI/CD
  • Removed test/e2e/e2e-template.yml - stale boilerplate-generated copy (the live version is in boilerplate/openshift/golang-osd-e2e/)
  • Removed include test/e2e/project.mk from Makefile - redundant since boilerplate already provides this
  • Updated test/e2e/E2E.md documentation to reference the boilerplate template path

What now uses boilerplate:

  • make e2e-binary-build - builds e2e.test binary
  • make e2e-image-build-push - builds and pushes e2e container image
  • Standard variable names: E2E_IMAGE_REGISTRY, E2E_IMAGE_REPOSITORY, E2E_IMAGE_NAME, E2E_IMAGE_TAG
  • OpenShift Template: boilerplate/openshift/golang-osd-e2e/e2e-template.yml

Which Jira/Github issue(s) this PR fixes?

Fixes # ROSAENG-1371

Special notes for your reviewer:

Pre-checks (if applicable):

  • Tested latest changes against a cluster
  • Ran make generate command locally to validate code changes
  • Included documentation changes with PR

Summary by CodeRabbit

  • Documentation

    • Expanded “Running in Cluster” instructions for E2E image testing, switching to template-driven deployment using oc process and oc apply, including creation of required credential secrets and injection of environment variables into the generated manifest.
  • Chores

    • Removed the legacy E2E image job manifest.
    • Dropped the obsolete E2E Makefile include and removed the associated E2E image build/push and suite build targets.
    • Minor E2E template formatting cleanup (removed a trailing empty line).

@TheUndeadKing

Copy link
Copy Markdown
Contributor Author

/hold

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 1, 2026
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Walkthrough

The PR removes the e2e Makefile include and deletes the old e2e make fragment. It also updates the cluster-run instructions to create required secrets, render the shared template with oc process, and apply the resulting manifest.

Changes

E2E build and deployment cleanup

Layer / File(s) Summary
Make rules removal
Makefile, test/e2e/project.mk
The Makefile no longer includes test/e2e/project.mk, and the e2e make fragment’s variables and targets are removed.
Cluster image test flow
test/e2e/E2E.md, test/e2e/e2e-template.yml
The E2E cluster instructions now create OCM and AWS credential secrets, render test/e2e/e2e-template.yml with oc process, inject secret-backed env vars with jq, and apply the manifest; the template file only loses a trailing blank line.

Estimated code review effort: 2 (Simple) | ~10 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 summarizes the main change: migrating e2e build infrastructure to boilerplate.
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 PASS: The only changed file is docs (test/e2e/E2E.md); no Ginkgo It/Describe/Context/When titles were added or modified, and no dynamic names appear.
Test Structure And Quality ✅ Passed No Ginkgo test code is changed here; the PR only removes boilerplate make/template files and updates docs, so this check is not applicable.
Microshift Test Compatibility ✅ Passed Only documentation changed in this diff; no new Ginkgo tests or OpenShift API usage were added, so the MicroShift check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; this PR only removes stale e2e manifests/Makefile include and tweaks unit tests/docs, so no SNO multi-node assumptions to flag.
Topology-Aware Scheduling Compatibility ✅ Passed Changed files are docs/deletions plus a whitespace-only template edit; no nodeSelector, affinity, topologySpread, or replica logic was added.
Ote Binary Stdout Contract ✅ Passed Full PR diff has no stdout writes in process-level code; changes are docs/boilerplate cleanup, not the OTE entrypoint.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR only deletes boilerplate copies/docs; no new Ginkgo It/Describe/Context/When blocks were added, so no new IPv4 or external-connectivity assumptions were introduced.
No-Weak-Crypto ✅ Passed Touched files are docs/cleanup only; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons found.
Container-Privileges ✅ Passed Touched files add no privileged settings; the e2e template keeps runAsNonRoot:true, allowPrivilegeEscalation:false, and drop ALL, and searches found no host*/privileged/SYS_ADMIN.
No-Sensitive-Data-In-Logs ✅ Passed No new logging was added in the touched files; the PR only removes files and updates docs/template wiring without printing secret values.
✨ 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.

@openshift-ci openshift-ci Bot requested review from bmeng and charlesgong July 1, 2026 05:38
@openshift-ci

openshift-ci Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: TheUndeadKing

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 1, 2026
@TheUndeadKing TheUndeadKing changed the title [ROSAENG-1371] chore: migrate e2e build infrastructure to boilerplate [ROSAENG-1371] [Hold] chore: migrate e2e build infrastructure to boilerplate Jul 1, 2026
@codecov-commenter

codecov-commenter commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.67%. Comparing base (341f099) to head (d3dabcd).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #247   +/-   ##
=======================================
  Coverage   55.67%   55.67%           
=======================================
  Files          23       23           
  Lines        1895     1895           
=======================================
  Hits         1055     1055           
  Misses        785      785           
  Partials       55       55           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TheUndeadKing TheUndeadKing changed the title [ROSAENG-1371] [Hold] chore: migrate e2e build infrastructure to boilerplate [ROSAENG-1371] chore: migrate e2e build infrastructure to boilerplate Jul 3, 2026
@TheUndeadKing

Copy link
Copy Markdown
Contributor Author

/unhold

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 3, 2026
@TheUndeadKing

Copy link
Copy Markdown
Contributor Author

/hold

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 3, 2026
@TheUndeadKing

Copy link
Copy Markdown
Contributor Author

/unhold

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 3, 2026
@TheUndeadKing

Copy link
Copy Markdown
Contributor Author

/label tide/merge-method-squash

@openshift-ci openshift-ci Bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Jul 3, 2026
Comment thread test/e2e/project.mk
Comment thread test/e2e/E2E.md Outdated

@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 `@test/e2e/E2E.md`:
- Around line 234-252: The secret creation steps in the E2E docs currently use
one-time `oc create secret generic`, so refreshing `$(ocm token)` later does not
update the in-cluster secret. Update the secret management instructions around
the OCM credentials flow to use an idempotent `oc apply` or `oc replace` pattern
for the relevant secret, or revise the token-refresh note to explicitly tell
users to recreate the secret before rerunning the job; make sure the guidance is
consistent with the `osde2e-ocm-credentials` and `osde2e-aws-credentials` setup.
🪄 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: Enterprise

Run ID: 9d6a9eba-92a4-4b3e-aadd-3ff7a8ce8e8f

📥 Commits

Reviewing files that changed from the base of the PR and between a50f050 and d3dabcd.

📒 Files selected for processing (1)
  • test/e2e/E2E.md

Comment thread test/e2e/E2E.md
Comment on lines +234 to +252
1. **Create required secrets in your target namespace** (e.g., `ocm-agent-e2e`):

1. **Set environment variables**:
```bash
export TEST_IMAGE="quay.io/your-org/ocm-agent-e2e"
export IMAGE_TAG="latest"
export OCM_E2E_TOKEN=$(ocm token)
export AWS_ACCESS_KEY_ID="your-access-key"
export AWS_SECRET_ACCESS_KEY="your-secret-key"
export REGION="us-east-1"
export CLUSTER_ID="your-cluster-id"
export OSD_ENV="stage"
# Create OCM credentials secret
oc create secret generic osde2e-ocm-credentials \
-n ocm-agent-e2e \
--from-literal=config.ocm.token=$(ocm token) \
--from-literal=config.cluster.id=${CLUSTER_ID} \
--from-literal=config.cluster.skipProvision=true \
--as backplane-cluster-admin

# Create AWS credentials secret
oc create secret generic osde2e-aws-credentials \
-n ocm-agent-e2e \
--from-literal=config.aws.accessKeyId=${AWS_ACCESS_KEY_ID} \
--from-literal=config.aws.secretAccessKey=${AWS_SECRET_ACCESS_KEY} \
--from-literal=config.cloudProvider.region=${AWS_REGION} \
--from-literal=config.cluster.id=${CLUSTER_ID} \
--as backplane-cluster-admin

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make the token-refresh path update the secret, not just the local shell.

The note at Line 282 suggests rerunning $(ocm token), but these oc create secret generic steps only create the secret once. After expiry, this flow still leaves the old token in-cluster, so the job keeps failing. Please switch the secret step to an idempotent oc apply/oc replace flow, or update the note to tell users to recreate the secret before reapplying the job.

Suggested fix
- oc create secret generic osde2e-ocm-credentials \
-   -n ocm-agent-e2e \
-   --from-literal=config.ocm.token=$(ocm token) \
-   --from-literal=config.cluster.id=${CLUSTER_ID} \
-   --from-literal=config.cluster.skipProvision=true \
-   --as backplane-cluster-admin
+ oc create secret generic osde2e-ocm-credentials \
+   -n ocm-agent-e2e \
+   --from-literal=config.ocm.token=$(ocm token) \
+   --from-literal=config.cluster.id=${CLUSTER_ID} \
+   --from-literal=config.cluster.skipProvision=true \
+   --dry-run=client -o yaml \
+ | oc apply --as backplane-cluster-admin -n ocm-agent-e2e -f -

Also applies to: 278-283

🤖 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 `@test/e2e/E2E.md` around lines 234 - 252, The secret creation steps in the E2E
docs currently use one-time `oc create secret generic`, so refreshing `$(ocm
token)` later does not update the in-cluster secret. Update the secret
management instructions around the OCM credentials flow to use an idempotent `oc
apply` or `oc replace` pattern for the relevant secret, or revise the
token-refresh note to explicitly tell users to recreate the secret before
rerunning the job; make sure the guidance is consistent with the
`osde2e-ocm-credentials` and `osde2e-aws-credentials` setup.

@openshift-ci

openshift-ci Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

@TheUndeadKing: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@tkong-redhat

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 3, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit f50872a into openshift:master Jul 3, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants