Skip to content

🌱 OPRUN-4784: Move catalogd E2E steps and restoration into its suite - #3148

Merged
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
fao89:OPRUN-4784-pr3-catalogd-steps
Nov 11, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
fao89:OPRUN-4784-pr3-catalogd-steps

Conversation

@fao89

@fao89 fao89 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Description

Move catalogd HA, proxy, and TLS steps into test/internal/e2e/catalogd/steps, together with scenario-local proxy state and deployment restoration. Register the extracted steps and cleanup hooks in the catalogd and legacy suites.

Shared prerequisites are merged in #3138 and #3145. This PR contains only this component's extraction, rebased onto main at 18949e4d. The four component extractions can be reviewed concurrently and merged in any order. Overlapping suite imports and registrations may require ordinary conflict resolution when later siblings merge.

The branch changes 8 files. E2E/upgrade feature contents and tags are preserved.

Jira: https://redhat.atlassian.net/browse/OPRUN-4784
Design: docs/designs/e2e-per-component.md

Validation

Go 1.26.5:

  • All component, upgrade, and legacy entry points compile, and every scenario step matches exactly one definition.
  • Shared helper and recorder tests pass with race detection.
  • make lint passes with zero issues.
  • All 16 component subsets pass compilation, exact step matching, and helper tests after resolving shared registrations.
  • All 27 E2E/upgrade feature files match current main byte for byte.
  • The combined result passes make verify without tracked drift and make test-unit with race detection and coverage.
  • Full live standard, experimental, and upgrade E2E scenarios were not rerun for this rebase.

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

  • Tests
    • Catalog-specific TLS, proxy, and leader-election scenarios are now included in both end-to-end test entry points.
    • Scenario cleanup now restores changed deployment settings and stops any recording proxy, including when a scenario fails.
    • Catalog scenarios use the shared end-to-end test utilities.

Move HA, proxy, and TLS assertions with catalog-specific state and
restoration hooks. Consume shared preparation without depending on
platform, operator-controller, or object-controller step extractions.

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
@netlify

netlify Bot commented Nov 11, 2026

Copy link
Copy Markdown

👷 Deploy request for olmv1 pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit e26876b

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Catalogd-specific E2E steps and hooks are registered in both catalogd suite entry points. TLS, proxy, and leader-election steps now use shared E2E helpers and catalog-owned scenario state. Cleanup for recording proxies and deployment changes moves from shared scenario cleanup to catalogd hooks.

Changes: Catalogd E2E steps

Layer / File(s) Summary
Scenario state and cleanup
test/internal/e2e/catalogd/steps/hooks.go, test/internal/e2e/steps/hooks.go
Catalog-specific hooks initialize scenario state and restore deployment arguments and environment settings after each scenario. They stop a recording proxy when present. Shared cleanup retains catalog port-forward cleanup but no longer handles these resources.
TLS steps use shared E2E helpers
test/internal/e2e/catalogd/steps/tls_steps.go
TLS steps use shared helpers for metrics port forwarding, readiness polling, Kubernetes commands, and OLM namespace access. TLS configuration still saves deployment arguments for restoration.
Proxy steps use shared E2E helpers
test/internal/e2e/catalogd/steps/proxy_steps.go
Proxy steps use shared Kubernetes, polling, logging, and namespace helpers. The operator-controller deployment mapping changes to operator-controller-controller-manager.
Leader-election steps and feature-gate updates
test/internal/e2e/catalogd/steps/ha_steps.go, test/internal/e2e/steps/hooks.go
Leader-election steps use shared helpers and query the catalogd-operator-lock lease name directly. Feature-gate references use featuregate.Feature("CatalogdHA").
Catalogd suite registration
test/e2e/catalogd/suite_test.go, test/e2e/features_test.go, test/internal/e2e/catalogd/steps/hooks.go, test/internal/e2e/steps/steps.go
Both suite entry points register catalogd steps and hooks. Catalogd-specific steps are removed from shared registration and registered by catalogd hooks.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Possibly related PRs

Merge Risk: Minimal · up to e2687

This change reorganizes test-only E2E steps and cleanup hooks. No production behavior is affected and no actionable merge-blocking risk is identified. Full live E2E scenarios were not rerun after the rebase, which is normal CI-level validation.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: moving catalogd E2E steps and restoration into the catalogd suite.
Description check Passed The description includes the required summary, motivation, validation details, and reviewer checklist. It also links the related Jira issue and design document.
Docstring Coverage Passed Docstring coverage is 80.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 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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 80.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 15 functions across 7 files.

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"

Recent 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: f5856d8c-6027-44bf-9477-b43385d49948
Commits

Reviewing files that changed from the base of the PR and between 18949e4 and e26876b.

Files selected for processing: 8

  • test/e2e/catalogd/suite_test.go
  • test/e2e/features_test.go
  • test/internal/e2e/catalogd/steps/ha_steps.go
  • test/internal/e2e/catalogd/steps/hooks.go
  • test/internal/e2e/catalogd/steps/proxy_steps.go
  • test/internal/e2e/catalogd/steps/tls_steps.go
  • test/internal/e2e/steps/hooks.go
  • test/internal/e2e/steps/steps.go
Files with no reviewable changes: 1

  • test/internal/e2e/steps/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.

@openshift-ci

openshift-ci Bot commented Nov 11, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: perdasilva

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 lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 11, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit eb14798 into operator-framework:main Nov 11, 2026
31 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants