You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract port-forward and metrics helpers before catalogd steps move, export the common assertion helpers used by component packages, and make recording-hook registration explicit in platform and legacy entry points. Document incremental step ownership. These common prerequisites let the four component extractions build and land independently.
Serial — merge wave 2. Depends on #3138. This draft targets main because the preparation branches exist only in the fork, so its current overall diff includes that prerequisite. After shared-state is squash-merged, rebase only this branch’s own commit onto refreshed main. The four component extractions can land in parallel after this PR merges.
The focused change is ce52d8ed: 8 changed files relative to 348df94c74ddc6c6e3d431667934376a919289d1. Feature contents and tag policy are preserved.
Local validation uses Go 1.26.5 and GOFLAGS=-buildvcs=false:
This branch's component, upgrade, and legacy entry points compile; helper tests pass.
All 16 subsets of the four component extractions were checked through actual Git merge trees, compilation, exact step-definition matching, and helper tests.
All 27 E2E/upgrade feature files remain byte-identical to main.
The combined result passes make verify, make lint (zero issues), and umask 022; make test-unit (55 passing packages, race detection and coverage).
Full live standard, experimental, and upgrade E2E runs were not repeated for this restructuring.
Reviewer Checklist
API Go Documentation (no API type changes)
Tests: Unit Tests (and E2E Tests, if appropriate)
Comprehensive Commit Messages
Links to related GitHub Issue(s)
Summary by CodeRabbit
Documentation
Updated end-to-end testing guidance for shared and component-specific steps, suite execution, scenario isolation, and polling.
Clarified how scenario identifiers and resource names remain distinct across features.
Tests
Expanded support for component-specific lifecycle hooks and shared test helpers.
Improved metrics access through reusable port-forwarding support.
Extract port-forward and metrics helpers before moving catalogd steps.
Make recording hooks explicit in platform and legacy suites, and document
the incremental ownership boundary. Keep cross-component object lookups
shared so component branches can build and land independently.
Refs: OPRUN-4784
Signed-off-by: Fabricio Aguiar <fabricio.aguiar@gmail.com>
rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
Adds helpers for port forwarding and metrics-service lookup. Existing step code adopts these helpers. Several package-private helpers are exported with unchanged behavior.
Suite hook registration and documentation test/internal/e2e/steps/hooks.go, test/e2e/features_test.go, test/e2e/platform/suite_test.go, test/e2e/README.md
RegisterHooks accepts optional callbacks and invokes them after shared hooks; suite callers pass RegisterAsciiCastHooks. The README describes component step ownership, shared helpers, suite execution, and feature-scoped scenario naming.
operator-framework/operator-controller#3118: Established the shared E2E runner, internal step package, and component-suite layout that this change prepares for independent step extraction.
operator-framework/operator-controller#3135: Split features into component suites and registered shared steps and hooks; this change updates the hook-registration interface and suite callers.
Suggested reviewers:pedjak, perdasilva
Merge Risk: Low · up to 3e806
The change is mergeable with a small documentation correction: readers following the hook-registration guidance in the existing suite would use an undefined package name.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly identifies the preparation of shared helpers for independent E2E step extractions, which matches the main change.
Description check
The description summarizes the changes and motivation, includes validation details, and contains the required Reviewer Checklist. It also links the related issue. The checklist items are present but r…
Docstring Coverage
Docstring coverage is 85.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentati…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description summarizes the changes and motivation, includes validation details, and contains the required Reviewer Checklist. It also links the related issue. The checklist items are present but remain unchecked.
Full details: Docstring Coverage
Explanation
Docstring coverage is 85.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 20 functions across 7 files. (1 skipped: 1 unsupported.)
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
golangci-lint (2.15.0)
level=error msg="[linters_context] typechecking error: build constraints exclude all Go files in /test/e2e"
The reason will be displayed to describe this comment to others. Learn more.
Additional comments: 2
test/internal/e2e/steps/portforward.go: 1
40-45: Trivial · Maintainability & Code Quality · Low value
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Cleanup is not idempotent and Wait can block.
cleanup calls p.Kill() and pfCmd.Wait() on every invocation. ScenarioCleanup and resetCatalogPortForward can both call the stored CatalogCleanup. The second Wait returns an error, which the code ignores, so the behavior is safe. The code does not guard against this explicitly. Wrap the body in sync.Once if you want a clear contract for the exported helper.
test/internal/e2e/steps/hooks.go: 1
115-121: Trivial · Maintainability & Code Quality
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Suites that call RegisterHooks(sc) with no hook no longer register ASCII-cast hooks.
Before this change, RegisterHooks registered RegisterAsciiCastHooks unconditionally. Now only the platform suite and features_test.go pass it. The catalogd, object-controller, and operator-controller suites lose it. The supplied search found @demo only in test/e2e/platform/features/demos.feature, so recording stays wired for the demo path. If any @demo feature moves to another suite later, it will run without recording and no error will appear.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Enterprise
Run ID: 3d0cfdc6-8ae0-4254-8461-2c18c0265823
Commits
Reviewing files that changed from the base of the PR and between 8091f36 and 3e80685.
Files selected for processing: 8
test/e2e/README.md
test/e2e/features_test.go
test/e2e/platform/suite_test.go
test/internal/e2e/steps/demo_steps.go
test/internal/e2e/steps/hooks.go
test/internal/e2e/steps/portforward.go
test/internal/e2e/steps/steps.go
test/internal/e2e/steps/tls_steps.go
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
approvedIndicates a PR has been approved by an approver from all required OWNERS files.lgtmIndicates that a PR is ready to be merged.
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Extract port-forward and metrics helpers before catalogd steps move, export the common assertion helpers used by component packages, and make recording-hook registration explicit in platform and legacy entry points. Document incremental step ownership. These common prerequisites let the four component extractions build and land independently.
Serial — merge wave 2. Depends on #3138. This draft targets
mainbecause the preparation branches exist only in the fork, so its current overall diff includes that prerequisite. After shared-state is squash-merged, rebase only this branch’s own commit onto refreshedmain. The four component extractions can land in parallel after this PR merges.The focused change is ce52d8ed: 8 changed files relative to
348df94c74ddc6c6e3d431667934376a919289d1. Feature contents and tag policy are preserved.Jira: https://redhat.atlassian.net/browse/OPRUN-4784
Design:
docs/designs/e2e-per-component.mdValidation
Local validation uses Go 1.26.5 and
GOFLAGS=-buildvcs=false:main.make verify,make lint(zero issues), andumask 022; make test-unit(55 passing packages, race detection and coverage).Reviewer Checklist
Summary by CodeRabbit