Skip to content

Conversation

@zaneb
Copy link
Member

@zaneb zaneb commented Oct 28, 2025

Record Claude's experience in running the unit tests and discovering the project structure to CLAUDE.md so that in future it will not have to rediscover any of it from first principles.

Provides quick reference for running unit and subsystem tests including:
- System requirements (Go, Docker/Podman, nmstate-devel, gotestsum)
- Quick start commands for different test scenarios
- Prerequisites check emphasizing gotestsum requirement
- Running specific tests by package or test name
- Environment variables reference
- Troubleshooting common issues

Make targets (unit-test, run-unit-test, ci-unit-test, subsystem-test)
all require gotestsum. Tests will run for a long time before failing if
gotestsum is not installed. Document this prominently to prevent users
from wasting time.

Assisted-by: Claude Code
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 28, 2025
@openshift-ci-robot
Copy link

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

In response to this:

Record Claude's experience in running the unit tests in CLAUDE.md so that in future it will not have to rediscover it from first principles.

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 added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 28, 2025
@openshift-ci openshift-ci bot requested review from omertuc and rccrdpccl October 28, 2025 10:56
@openshift-ci
Copy link

openshift-ci bot commented Oct 28, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zaneb
Once this PR has been reviewed and has the lgtm label, please assign eliorerz for approval. For more information see the Code Review Process.

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

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

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 23.09%. Comparing base (3266b6d) to head (1beedf7).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #8209       +/-   ##
===========================================
- Coverage   43.22%   23.09%   -20.13%     
===========================================
  Files         404      275      -129     
  Lines       69935    42838    -27097     
===========================================
- Hits        30226     9893    -20333     
+ Misses      37003    32060     -4943     
+ Partials     2706      885     -1821     

see 130 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai
Copy link

coderabbitai bot commented Oct 28, 2025

Walkthrough

Introduces a new CLAUDE.md testing and development guide and refactors database setup/teardown across many test suites by moving per-test DB initialization/termination into suite-level hooks (BeforeSuite/DeferCleanup/AfterSuite), consolidating lifecycle management.

Changes

Cohort / File(s) Summary
Documentation
CLAUDE.md
Add new comprehensive testing & development guide for the repository (architecture, commands, testing workflows, troubleshooting, CI/coverage, deployment patterns).
Suite-level DB lifecycle refactor
internal/bminventory/inventory_test.go, internal/controller/controllers/controllers_suite_test.go, internal/events/event_test.go, internal/host/hostcommands/instruction_manager_test.go, internal/host/hostutil/host_utils_test.go, internal/infraenv/infraenv_suite_test.go, internal/migrations/migrations_suite_test.go, internal/operators/handler/handler_suite_test.go, internal/releasesources/release_sources_test.go, internal/versions/kube_api_versions_test.go, pkg/auth/auth_suite_test.go, internal/cluster/cluster_suite_test.go, internal/host/hosts_suite_test.go
Replace inline per-test common.InitializeDBTest() / deferred common.TerminateDBTest() calls with suite-level hooks (BeforeSuite + DeferCleanup/AfterSuite) to initialize and terminate the test DB once per suite. No functional test logic changes.
Suite refactor + test data change
internal/manifests/manifests_test.go
Move DB init/teardown to suite hooks and modify test YAML patch content to include value: HighlyAvailable.
Lifecycle scope adjustment (mixed hooks)
internal/usage/manager_test.go
Add suite-level DB initialization with DeferCleanup for termination, and change per-test lifecycle from prior suite-level hooks to BeforeEach/AfterEach for PrepareTestDB/DeleteTestDB, altering timing of per-test DB preparation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify consistent and correct use of BeforeSuite + DeferCleanup/AfterSuite across all modified suites to avoid premature/late termination.
  • Pay special attention to internal/usage/manager_test.go due to the change from suite-level to per-test BeforeEach/AfterEach semantics.
  • Confirm internal/manifests/manifests_test.go YAML patch change (value: HighlyAvailable) matches expected assertions.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description provided is a single sentence that explains the purpose of the change but does not follow the required template structure. The description template specifies multiple required sections including issue type selection (with checkboxes for New Feature, Enhancement, Bug fix, Tests, Documentation, CI/CD), environment impact selection, testing information, and a comprehensive checklist. The submitted description omits all of these structured elements and only provides narrative explanation without completing the template sections. The PR description should be updated to follow the repository's template structure. Please complete the required sections: select the appropriate issue type (Documentation appears most relevant), specify environment impact, provide testing information, and complete all checklist items. Even if some non-critical sections are not applicable, filling out the template structure ensures consistency and provides reviewers with necessary context about the change scope and testing approach.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "Add project documentation to CLAUDE.md" accurately reflects the primary change described in the PR objectives: recording Claude's experience running unit tests by adding comprehensive documentation to CLAUDE.md. While the changeset includes significant test refactoring across multiple files (moving database initialization to suite-level hooks), these changes appear to be supporting updates that enable the documentation effort rather than the primary focus. The title is clear, specific, and captures the main change a teammate would understand from the PR history.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (6)
CLAUDE.md (5)

62-72: Use proper markdown heading instead of bold emphasis for "1. Check for container runtime".

Lines 62 is flagged by markdownlint for using emphasis (**...**) instead of a heading. Consider changing to a proper markdown heading (### 1. Check for container runtime) to improve document structure and pass linting.

-**1. Check for container runtime (Docker or Podman)**
+### 1. Check for container runtime (Docker or Podman)

78-92: Use proper markdown heading instead of bold emphasis for "2. Check for gotestsum".

Line 78 is flagged by markdownlint for using emphasis instead of a heading. Consider changing to a proper markdown heading (### 2. Check for gotestsum) for consistency and to pass linting.

-**2. Check for gotestsum**
+### 2. Check for gotestsum

154-156: Specify language identifier for code block.

Line 154 has a fenced code block without a language identifier. Add bash or an appropriate language tag.

 **Error:**
-```
+```bash
 fatal error: nmstate.h: No such file or directory
-```
+```

174-176: Specify language identifier for error output code block.

Line 174 has a fenced code block without a language identifier. For error messages, use text or bash.

 **Error:**
-```
+```text
 Cannot connect to the Docker daemon at unix:///var/run/docker.sock
-```
+```

348-351: Specify language identifier for error output code block.

Line 348 has a fenced code block without a language identifier. For error/diagnostic output, use text or bash.

 **Symptoms:** Tests fail in BeforeSuite with error message:
-```
+```text
 failed to connect to `host=127.0.0.1 user=postgres database=`:
 dial tcp 127.0.0.1:5433: connect: connection refused
-```
+```
internal/bminventory/inventory_test.go (1)

373-375: Optional (Ginkgo v2): Use DeferCleanup to register teardown with the suite.

If on Ginkgo v2, you can register cleanup right where you init:

var _ = BeforeSuite(func() {
    common.InitializeDBTest()
    DeferCleanup(common.TerminateDBTest)
})

This keeps lifecycle coupled and avoids a separate AfterSuite block. Use only if not running in parallel or combined with synchronized hooks.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between d3f5ae7 and 6a7fce0.

📒 Files selected for processing (14)
  • CLAUDE.md (1 hunks)
  • internal/bminventory/inventory_test.go (1 hunks)
  • internal/controller/controllers/controllers_suite_test.go (2 hunks)
  • internal/events/event_test.go (1 hunks)
  • internal/host/hostcommands/instruction_manager_test.go (1 hunks)
  • internal/host/hostutil/host_utils_test.go (1 hunks)
  • internal/infraenv/infraenv_suite_test.go (1 hunks)
  • internal/manifests/manifests_test.go (1 hunks)
  • internal/migrations/migrations_suite_test.go (1 hunks)
  • internal/operators/handler/handler_suite_test.go (1 hunks)
  • internal/releasesources/release_sources_test.go (1 hunks)
  • internal/usage/manager_test.go (3 hunks)
  • internal/versions/kube_api_versions_test.go (1 hunks)
  • pkg/auth/auth_suite_test.go (1 hunks)
🧰 Additional context used
🪛 LanguageTool
CLAUDE.md

[grammar] ~438-~438: Use a hyphen to join words.
Context: ...assisted-test-infra) - Downstream: QE maintained tests ## Additional Resource...

(QB_NEW_EN_HYPHEN)

🪛 markdownlint-cli2 (0.18.1)
CLAUDE.md

62-62: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


78-78: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


154-154: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


174-174: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


348-348: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Red Hat Konflux / assisted-service-saas-main-on-pull-request
  • GitHub Check: Red Hat Konflux / assisted-service-rhel9-acm-ds-main-on-pull-request
🔇 Additional comments (15)
CLAUDE.md (1)

1-420: Comprehensive testing guide—well-organized and valuable.

The document is well-structured with clear sections, helpful examples, and practical troubleshooting. It effectively documents Claude's experience and provides a solid foundation for future test runs. The inclusion of unsandboxed execution notes for Claude Code, container runtime requirements, gotestsum dependencies, and database lifecycle management aligns well with the repository's shift to BeforeSuite/AfterSuite test hooks.

Minor markdown linting issues (noted in separate comments) can be fixed, but the content quality and comprehensiveness are strong.

internal/host/hostcommands/instruction_manager_test.go (1)

594-601: LGTM! Excellent refactoring of test infrastructure.

The addition of suite-level database lifecycle hooks is well-implemented. This correctly separates global DB initialization (once per suite) from per-test DB creation (in BeforeEach), maintaining test isolation while improving efficiency.

internal/operators/handler/handler_suite_test.go (1)

15-22: LGTM! Consistent with suite-level DB lifecycle pattern.

The suite hooks are correctly implemented and align with the broader refactoring across test files.

internal/events/event_test.go (1)

2015-2022: LGTM! Suite-level DB hooks properly added.

The implementation correctly establishes suite-wide database lifecycle management.

internal/host/hostutil/host_utils_test.go (1)

640-647: LGTM! Suite-level initialization correctly added.

The DB lifecycle hooks are properly implemented, matching the pattern established across the codebase.

internal/controller/controllers/controllers_suite_test.go (1)

48-63: LGTM! Suite hooks properly integrated with existing setup.

The DB initialization is correctly added to the existing BeforeSuite hook, and the new AfterSuite ensures proper cleanup. Good integration with the pre-existing logger configuration.

internal/migrations/migrations_suite_test.go (1)

21-27: LGTM! Suite-level DB lifecycle correctly established.

The hooks are properly implemented for migration tests.

internal/manifests/manifests_test.go (1)

36-42: LGTM! Suite initialization properly added.

The DB lifecycle hooks are correctly implemented.

pkg/auth/auth_suite_test.go (1)

15-22: LGTM! Suite-level DB hooks correctly added.

This completes the consistent refactoring of database lifecycle management across all test suites. The standardized approach will improve test reliability and maintainability.

internal/releasesources/release_sources_test.go (1)

21-27: LGTM! Clean suite-level DB lifecycle management.

The addition of BeforeSuite/AfterSuite hooks consolidates database initialization at the suite level while maintaining per-test isolation through the existing BeforeEach/AfterEach hooks. This refactoring improves test organization and reduces redundant setup overhead.

internal/versions/kube_api_versions_test.go (1)

31-37: LGTM! Consistent suite-level setup.

The BeforeSuite/AfterSuite hooks follow the same pattern as other test suites in this PR, centralizing database lifecycle management at the suite level.

internal/usage/manager_test.go (2)

23-29: LGTM! Suite-level DB initialization added.

The BeforeSuite/AfterSuite hooks properly initialize and terminate the test database at the suite level, consistent with the refactoring pattern across other test files in this PR.


40-54: LGTM! Per-test isolation maintained.

The BeforeEach/AfterEach hooks continue to create and clean up isolated database instances for each test, ensuring test independence while benefiting from the suite-level DB infrastructure setup.

internal/infraenv/infraenv_suite_test.go (1)

16-22: LGTM! Suite-level DB setup complete.

The BeforeSuite/AfterSuite hooks properly establish database lifecycle management for the infraenv test suite, completing the consistent refactoring pattern across all test suites in this PR.

internal/bminventory/inventory_test.go (1)

373-379: Consider parallelism only if CI/tests enable it—currently disabled.

The repo uses Ginkgo v1.16.5 and does not enable parallel test execution. The Makefile invokes tests without -p, --nodes, or --parallel flags, so BeforeSuite/AfterSuite run once as-is. The suggested refactor to SynchronizedBeforeSuite/AfterSuite is optional and only necessary if you plan to enable parallel test execution (e.g., via future CI changes or developer ginkgo -p invocation). If parallelism is not a planned feature, the current hooks are safe.

zaneb added 3 commits October 29, 2025 17:39
Refactor 13 test suites to call InitializeDBTest() in Ginkgo BeforeSuite
hooks instead of directly in Test functions. This follows the standard
Ginkgo pattern and ensures proper error handling during suite setup.

Benefits:
- Ginkgo reports BeforeSuite failures with clear, actionable messages
- Tests fail fast (~5s) when database is unavailable instead of timing
  out after 30s
- Consistent pattern across all test suites

Implementation:
- Most files: Move from Test function to BeforeSuite hook with
  DeferCleanup for teardown
- internal/controller/controllers: Merged DB init with existing logger
  setup in a single BeforeSuite
- internal/usage: Changed nested BeforeSuite to BeforeEach (per-test
  setup belongs in BeforeEach, not BeforeSuite)

Assisted-by: Claude Code
Add detailed sections on:
- Project overview and architecture
- Core components and package organization
- Common development commands (building, code generation, linting)
- Testing system requirements and dependencies
- Running unit tests with make targets
- Test categories and environment variables
- Troubleshooting common issues
- Advanced testing workflows

Provide prerequisite checks and expected behavior when dependencies
are unavailable.

Assisted-by: Claude Code
The SKIP_UT_DB environment variable has a misleading name - it does not
skip database-dependent tests. Instead, it tells the test framework to
skip auto-creating a database and assume one is already running at
localhost:5433.

This commit updates CLAUDE.md to:
- Explain the actual behavior of SKIP_UT_DB
- Document the database creation fallback chain (K8s -> testcontainer)
- Clarify that make unit-test uses SKIP_UT_DB after starting a container
- Add guidance for environments without Docker/Podman
- Document that many packages can be tested individually without database
- Remove misleading claims that SKIP_UT_DB skips database tests

Assisted-by: Claude Code
@zaneb zaneb changed the title NO-JIRA: Add instructions for running unit tests to CLAUDE.md NO-JIRA: Add project documentation to CLAUDE.md Oct 29, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
CLAUDE.md (2)

98-565: Comprehensive testing documentation with minor formatting suggestions.

The testing section is thorough and particularly valuable in clarifying the confusing SKIP_UT_DB behavior. The troubleshooting guidance is practical and covers common issues well.

Consider these minor markdown formatting improvements:

1. Lines 146 & 166: Use proper headings instead of emphasis

-**1. Check for container runtime (Docker or Podman)**
+#### 1. Check for container runtime (Docker or Podman)

-**2. Check for gotestsum**
+#### 2. Check for gotestsum

2. Lines 421, 441, 455: Add language specifiers to code blocks

For error messages and console output, use text or console:

-```
+```text
 fatal error: nmstate.h: No such file or directory
 ```

-```
+```text
 Cannot connect to the Docker daemon at unix:///var/run/docker.sock
 ```

-```
+```text
 failed to connect to `host=127.0.0.1 user=postgres database=`:
 dial tcp 127.0.0.1:5433: connect: connection refused
 ```

567-643: LGTM! Helpful deployment and patterns guidance.

The deployment scenarios and key patterns sections provide valuable context for understanding the codebase structure and conventions.

Consider adding a hyphen on line 369 for clarity:

-   - Downstream: QE maintained tests
+   - Downstream: QE-maintained tests
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 6a7fce0 and 1beedf7.

📒 Files selected for processing (16)
  • CLAUDE.md (1 hunks)
  • internal/bminventory/inventory_test.go (1 hunks)
  • internal/cluster/cluster_suite_test.go (1 hunks)
  • internal/controller/controllers/controllers_suite_test.go (1 hunks)
  • internal/events/event_test.go (1 hunks)
  • internal/host/hostcommands/instruction_manager_test.go (1 hunks)
  • internal/host/hosts_suite_test.go (1 hunks)
  • internal/host/hostutil/host_utils_test.go (1 hunks)
  • internal/infraenv/infraenv_suite_test.go (1 hunks)
  • internal/manifests/manifests_test.go (1 hunks)
  • internal/migrations/migrations_suite_test.go (1 hunks)
  • internal/operators/handler/handler_suite_test.go (1 hunks)
  • internal/releasesources/release_sources_test.go (1 hunks)
  • internal/usage/manager_test.go (3 hunks)
  • internal/versions/kube_api_versions_test.go (1 hunks)
  • pkg/auth/auth_suite_test.go (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • internal/versions/kube_api_versions_test.go
  • internal/releasesources/release_sources_test.go
  • internal/events/event_test.go
  • internal/manifests/manifests_test.go
🧰 Additional context used
🪛 LanguageTool
CLAUDE.md

[style] ~220-~220: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...se Management (For Development) If you want to run tests repeatedly without restarting...

(REP_WANT_TO_VB)


[grammar] ~369-~369: Use a hyphen to join words.
Context: ...assisted-test-infra) - Downstream: QE maintained tests ### Environment Variab...

(QB_NEW_EN_HYPHEN)

🪛 markdownlint-cli2 (0.18.1)
CLAUDE.md

146-146: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


166-166: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


421-421: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


441-441: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


455-455: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (14)
internal/operators/handler/handler_suite_test.go (1)

16-19: LGTM! Suite-level DB lifecycle management.

This refactor consolidates database initialization and cleanup at the suite level, improving test organization and maintainability.

internal/host/hostcommands/instruction_manager_test.go (1)

595-598: LGTM! Consistent suite-level DB setup.

The addition of suite-level database lifecycle management aligns with the broader test refactor across the codebase.

internal/controller/controllers/controllers_suite_test.go (1)

49-50: LGTM! DB lifecycle integrated into existing suite setup.

The database initialization and cleanup are appropriately added to the existing BeforeSuite, ensuring proper sequencing with the logger configuration.

internal/host/hosts_suite_test.go (1)

29-29: LGTM! Cleanup migration to DeferCleanup.

Replacing AfterSuite-based termination with DeferCleanup aligns with Ginkgo v2 best practices and ensures proper cleanup ordering.

internal/migrations/migrations_suite_test.go (1)

21-24: LGTM! Suite-level DB lifecycle management.

This change consolidates database initialization and termination at the suite level, consistent with the broader refactor across test suites.

internal/cluster/cluster_suite_test.go (1)

29-29: LGTM! Cleanup migration to DeferCleanup.

This completes the migration from AfterSuite to DeferCleanup, following Ginkgo v2 best practices.

internal/host/hostutil/host_utils_test.go (1)

641-644: LGTM! Suite-level DB setup added.

The addition of suite-level database lifecycle management is consistent with the test infrastructure improvements across the codebase.

pkg/auth/auth_suite_test.go (1)

16-19: LGTM! Suite-level DB lifecycle management.

This final addition completes the consistent refactor of database lifecycle management across all test suites in the PR.

internal/usage/manager_test.go (2)

23-26: LGTM! Suite-level DB initialization.

The refactor moves database initialization to BeforeSuite with proper cleanup via DeferCleanup. This is more efficient than per-test initialization and consistent with the pattern adopted across the codebase in this PR.


37-51: LGTM! Per-test DB lifecycle retained.

The BeforeEach/AfterEach hooks correctly maintain per-test database preparation and cleanup via PrepareTestDB/DeleteTestDB, complementing the suite-level initialization.

internal/infraenv/infraenv_suite_test.go (1)

16-19: LGTM! Suite-level DB initialization.

The BeforeSuite hook properly initializes the database for the entire test suite and registers cleanup via DeferCleanup. This is consistent with the pattern applied across the codebase in this PR.

CLAUDE.md (2)

1-52: LGTM! Clear project overview and architecture.

The introduction effectively explains the dual-mode nature of the service (REST API and Kube-API) and provides a well-organized overview of core components and package organization.


644-672: LGTM! Good references and resources.

The closing sections provide helpful pointers to additional documentation and important project files.

internal/bminventory/inventory_test.go (1)

373-376: Need to verify the actual helper function implementations and check the go.mod to understand the intended Ginkgo version:Based on my web search and script verification, I have found a critical issue: DeferCleanup is a Ginkgo v2 function, but the file imports Ginkgo v1 (. "github.com/onsi/ginkgo"). This is a compile-time error. The original review comment is fundamentally incorrect for this codebase and must be rejected.

Review comment is incorrect and must be ignored.

The code snippet uses DeferCleanup(common.TerminateDBTest), which is a Ginkgo v2 function. However, the test file imports github.com/onsi/ginkgo (v1), not github.com/onsi/ginkgo/v2. V1 is no longer supported, and DeferCleanup does not exist in v1—this code will not compile as written.

Either:

  1. The file needs to be migrated to Ginkgo v2 imports (. "github.com/onsi/ginkgo/v2"), or
  2. This code change is incomplete/incorrect and should not be merged.

The original review comment's suggestions about synchronized hooks and parallel semantics only apply if Ginkgo v2 is adopted. Without confirming the actual Ginkgo version in the codebase, no other guidance is valid.

Likely an incorrect or invalid review comment.

@zaneb
Copy link
Member Author

zaneb commented Oct 29, 2025

/retest-required

@openshift-ci
Copy link

openshift-ci bot commented Oct 30, 2025

@zaneb: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/edge-subsystem-aws 1beedf7 link true /test edge-subsystem-aws
ci/prow/edge-subsystem-kubeapi-aws 1beedf7 link true /test edge-subsystem-kubeapi-aws
ci/prow/edge-unit-test 1beedf7 link true /test edge-unit-test
ci/prow/edge-lint 1beedf7 link true /test edge-lint

Full PR test history. Your PR dashboard.

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.

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

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants