Skip to content

CLID-614: Test for Operator incremental mirroring - #1413

Open
nidangavali wants to merge 1 commit into
openshift:mainfrom
nidangavali:CLID-614
Open

CLID-614: Test for Operator incremental mirroring#1413
nidangavali wants to merge 1 commit into
openshift:mainfrom
nidangavali:CLID-614

Conversation

@nidangavali

@nidangavali nidangavali commented May 20, 2026

Copy link
Copy Markdown
Contributor

Description

Add an integration test for operator incremental mirroring (mirrorToDisk). The test verifies that oc-mirror produces archives containing only new content on subsequent runs when the ImageSetConfig changes.

The test runs mirrorToDisk twice against the same workspace with different ISCs:

  • Step 1: mirrors operator foo pinned at version 0.2.0
  • Step 2: expands foo to version range 0.2.0–0.3.1 and adds a new package bar (stable channel)

It then validates that the second archive contains only the incremental data,new blobs from the expanded version range and the newly added package with no overlap from the first archive.

Github / Jira issue: CLID-614

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code Improvements (Refactoring, Performance, CI upgrades, etc)
  • Internal repo assets (diagrams / docs on github repo)
  • This change requires a documentation update on openshift docs

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Expected Outcome

  • Step 1 produces a tar archive containing blobs for foo at version 0.2.0
  • Step 2 produces a tar archive containing only new blobs (additional foo versions and bar package)
  • No blob from the initial archive appears in the incremental archive
  • The initial archive does not contain any bar entries
  • The incremental archive contains the expected repositories from the updated ISC

Summary by CodeRabbit

Summary by CodeRabbit

  • Tests
    • Added new integration-test helper utilities to summarize tar archives and validate their contents (including blob and repository-level checks).
    • Added new ImageSetConfiguration fixtures for operator incremental mirroring step-based scenarios.
    • Introduced a new incremental mirroring integration test that runs mirror-to-disk twice and verifies blob non-overlap and expected archive contents.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 20, 2026
@openshift-ci-robot

openshift-ci-robot commented May 20, 2026

Copy link
Copy Markdown

@nidangavali: This pull request references CLID-614 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Github / Jira issue:

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code Improvements (Refactoring, Performance, CI upgrades, etc)
  • Internal repo assets (diagrams / docs on github repo)
  • This change requires a documentation update on openshift docs

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Expected Outcome

Please describe the outcome expected from the tests.

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 adolfo-ab and aguidirh May 20, 2026 11:12
@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a CLID-614 integration test for config-driven operator incremental mirroring. Two ImageSetConfiguration fixtures define initial and updated operator selections. Tar helpers inspect archives, and the test verifies archive contents and non-overlapping blob paths across two MirrorToDisk runs.

Changes

Operator incremental mirroring

Layer / File(s) Summary
Configuration and tar assertion helpers
tests/integration/testdata/imagesetconfigs/operators/*, tests/integration/helpers_test.go
Adds initial and updated operator fixtures plus helpers for tar summaries, normalized blob-path collection, and path-exclusion assertions.
Two-step incremental mirroring validation
tests/integration/incremental_mirroring_test.go
Runs MirrorToDisk twice in one workspace, preserves the initial archive, and checks blob-path disjointness and expected repository contents.

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

Sequence Diagram(s)

sequenceDiagram
  participant GinkgoTest
  participant MirrorToDisk
  participant InitialTar
  participant IncrementalTar
  GinkgoTest->>MirrorToDisk: Run with initial operator configuration
  MirrorToDisk-->>InitialTar: Produce mirror archive
  GinkgoTest->>MirrorToDisk: Run with updated operator configuration
  MirrorToDisk-->>IncrementalTar: Produce incremental archive
  GinkgoTest->>InitialTar: Inspect entries and collect blob paths
  GinkgoTest->>IncrementalTar: Assert repositories and new blob paths
Loading

Suggested reviewers: adolfo-ab

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ipv6 And Disconnected Network Test Compatibility ⚠️ Warning No IPv4-only code found, but the new operator incremental test sources a public quay.io catalog and needs external connectivity. Use an internal/mirrored catalog or mark the test [Skipped:Disconnected] if public registry access is required.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding an integration test for operator incremental mirroring.
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%.
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 Changed Ginkgo titles are static strings; no dynamic identifiers, dates, or generated values appear in the new test names.
Test Structure And Quality ✅ Passed The new Ginkgo tests use BeforeEach/AfterEach, the long-running case has SpecTimeout, and the scenarios stay focused on one incremental-mirroring behavior.
Microshift Test Compatibility ✅ Passed The new Ginkgo tests only invoke oc-mirror and inspect tar/filesystem output; they don't reference unsupported OpenShift APIs, namespaces, or MicroShift-unsafe features.
Single Node Openshift (Sno) Test Compatibility ✅ Passed New incremental-mirroring tests only inspect tar contents; no node-count, topology, scheduling, or HA assumptions were found.
Topology-Aware Scheduling Compatibility ✅ Passed PR only adds integration tests and testdata; no deployment manifests, operator code, or controllers were changed, and no scheduling constraints appear.
Ote Binary Stdout Contract ✅ Passed New test helpers only log via GinkgoWriter; no stdout writes were added in main/TestMain/BeforeSuite/init paths of the changed files.
No-Weak-Crypto ✅ Passed Touched files only add tar/YAML test helpers; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons appear.
Container-Privileges ✅ Passed No touched file adds privileged/host* fields or securityContext; the new YAMLs are ImageSetConfig fixtures, not container manifests.
No-Sensitive-Data-In-Logs ✅ Passed New logs only print tar paths, counts, and public repo prefixes; no passwords, tokens, PII, or internal hostnames were added.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

🔧 Checkov (3.3.8)
tests/integration/testdata/imagesetconfigs/operators/isc-operator-incremental-initial.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

tests/integration/testdata/imagesetconfigs/operators/isc-operator-incremental-update.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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.

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

🤖 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 `@tests/integration/incremental_test.go`:
- Around line 36-38: The test currently hardcodes "mirror_000001.tar" (assigned
to initialTar) which can break if sequence naming changes; replace the hardcoded
lookup by discovering produced mirror tar files in workDir with a glob like
"mirror_*.tar", assert the glob returns at least one match, sort the matches (by
filename or modtime) to pick the intended archive (first/earliest for initial,
next for subsequent), assign that path to initialTar (and the later tar variable
used around logTarSummary), and then call logTarSummary with the discovered
path; update any other hardcoded uses of "mirror_00000X.tar" similarly.
- Around line 68-70: The current assertion using
Expect(incrementalBlobs).NotTo(ConsistOf(initialBlobs)) only proves the sets
differ; change the test to assert the incremental tar contains none of the
previously mirrored blobs by verifying there is no intersection between
incrementalBlobs and initialBlobs. Replace the ConsistOf-based assertion with
one that checks incrementalBlobs does not contain any element from initialBlobs
(e.g., assert the intersection length is zero or use a Gomega matcher that
ensures no elements from initialBlobs appear in incrementalBlobs) referencing
the incrementalBlobs and initialBlobs variables and the Expect call.
🪄 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: d60a918f-b59b-49dd-aa3e-496c58791e63

📥 Commits

Reviewing files that changed from the base of the PR and between edb3e8c and 94a346b.

📒 Files selected for processing (4)
  • tests/integration/helpers_test.go
  • tests/integration/incremental_test.go
  • tests/integration/testdata/imagesetconfigs/operators/isc-operator-incremental-initial.yaml
  • tests/integration/testdata/imagesetconfigs/operators/isc-operator-incremental-update.yaml

Comment thread tests/integration/incremental_test.go Outdated
Comment thread tests/integration/incremental_test.go Outdated
@nidangavali

Copy link
Copy Markdown
Contributor Author

/retest

@aguidirh aguidirh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR, I just added few comments to it.

Please add a PR description following the template on .github directory and if possible also a commit message with context about the changes for future reference.

Comment thread tests/integration/incremental_test.go Outdated
Comment thread tests/integration/incremental_test.go Outdated
Comment thread tests/integration/incremental_test.go Outdated
Comment thread tests/integration/incremental_test.go 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: 2

🤖 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 `@tests/integration/incremental_mirroring_test.go`:
- Around line 147-150: The deferred cleanup call to os.RemoveAll(preserveDir)
does not capture or handle its error return value. Modify the defer statement to
use a closure that captures the error returned by os.RemoveAll and logs or
handles it appropriately, ensuring that any cleanup failures are not silently
ignored per the coding guidelines that require never ignoring error returns.
- Line 122: The test "should produce a second tar with only incremental blob
content" is a long-running integration test that lacks a timeout and needs to
pass SpecContext to its mirroring operations. Add a SpecTimeout parameter to the
It() function call to prevent test suite hangs, and update all MirrorToDisk
operation calls within this test (and the related calls at lines 134-135 and
155-156) to accept and use the SpecContext parameter instead of the outer ctx
variable to ensure proper test context handling within Ginkgo.
🪄 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: 5907f313-9121-42bd-a4c1-62b6c40967ac

📥 Commits

Reviewing files that changed from the base of the PR and between a84bd83 and 75c6e8e.

📒 Files selected for processing (4)
  • tests/integration/helpers_test.go
  • tests/integration/incremental_mirroring_test.go
  • tests/integration/testdata/imagesetconfigs/operators/isc-operator-incremental-initial.yaml
  • tests/integration/testdata/imagesetconfigs/operators/isc-operator-incremental-update.yaml
✅ Files skipped from review due to trivial changes (1)
  • tests/integration/testdata/imagesetconfigs/operators/isc-operator-incremental-initial.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/integration/testdata/imagesetconfigs/operators/isc-operator-incremental-update.yaml
  • tests/integration/helpers_test.go

iscInitial := filepath.Join("operators", "isc-operator-incremental-initial.yaml")
iscUpdate := filepath.Join("operators", "isc-operator-incremental-update.yaml")

It("should produce a second tar with only incremental blob content", func() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify this spec currently lacks SpecTimeout and uses non-spec context in MirrorToDisk calls.
rg -nP --type=go -C2 'It\("should produce a second tar with only incremental blob content",\s*func\(' tests/integration/incremental_mirroring_test.go
rg -nP --type=go -C2 'runner\.MirrorToDisk\(' tests/integration/incremental_mirroring_test.go

Repository: openshift/oc-mirror

Length of output: 1647


Add timeout to long-running incremental mirroring test and pass SpecContext to mirroring calls.

Line 122 defines a long-running integration test with two MirrorToDisk operations but no SpecTimeout, creating risk of suite hangs. Additionally, the test should pass Ginkgo's SpecContext to the mirroring operations instead of the outer ctx.

Suggested fix
-		It("should produce a second tar with only incremental blob content", func() {
+		It("should produce a second tar with only incremental blob content", SpecTimeout(10*time.Minute), func(specCtx SpecContext) {
@@
-			result, err := runner.MirrorToDisk(ctx, iscInitialPath, workDir, "--remove-signatures=true")
+			result, err := runner.MirrorToDisk(specCtx, iscInitialPath, workDir, "--remove-signatures=true")
@@
-			result, err = runner.MirrorToDisk(ctx, iscUpdatePath, workDir, "--remove-signatures=true")
+			result, err = runner.MirrorToDisk(specCtx, iscUpdatePath, workDir, "--remove-signatures=true")

Also applies to lines 134–135, 155–156.

🤖 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 `@tests/integration/incremental_mirroring_test.go` at line 122, The test
"should produce a second tar with only incremental blob content" is a
long-running integration test that lacks a timeout and needs to pass SpecContext
to its mirroring operations. Add a SpecTimeout parameter to the It() function
call to prevent test suite hangs, and update all MirrorToDisk operation calls
within this test (and the related calls at lines 134-135 and 155-156) to accept
and use the SpecContext parameter instead of the outer ctx variable to ensure
proper test context handling within Ginkgo.

Source: Coding guidelines

Comment thread tests/integration/incremental_mirroring_test.go

@adolfo-ab adolfo-ab left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 23, 2026
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 7, 2026
@nidangavali

Copy link
Copy Markdown
Contributor Author

/verified by @nidangavali

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 7, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@nidangavali: This PR has been marked as verified by @nidangavali.

Details

In response to this:

/verified by @nidangavali

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-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD bc220b6 and 2 for PR HEAD 2f5faab in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD d31e7f4 and 1 for PR HEAD 2f5faab in total

@nidangavali

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 4cbc362 and 0 for PR HEAD 2f5faab in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/hold

Revision 2f5faab was retested 3 times: holding

@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 13, 2026
@nidangavali

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@nidangavali

Copy link
Copy Markdown
Contributor Author

/retest

Comment thread tests/integration/helpers_test.go Outdated
}

// logOcMirrorResult writes the oc-mirror command result to GinkgoWriter for diagnostics.
func logOcMirrorResult(label string, result *ocmirror.Result) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The tests are failing with the error below:

# github.com/openshift/oc-mirror/tests/integration_test [github.com/openshift/oc-mirror/tests/integration.test]
./helpers_test.go:959:6: logOcMirrorResult redeclared in this block
	./helpers_test.go:905:6: other declaration of logOcMirrorResult

It means that logOcMirrorResult is already declared so it fails because it is not possible to have the same func with the same name in the same pkg.

The same func was introduced on PR #1411 row 781. Since this is already in main, you need to rebase the current PR and solve the conflicts.

@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adolfo-ab, nidangavali

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-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Jul 23, 2026
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 23, 2026
@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown

New changes are detected. LGTM label has been removed.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/integration/helpers_test.go (1)

912-915: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Redact or remove untrusted diagnostic values from CI logs.

Raw command output, repository names, and tags can expose credentials, internal hostnames, or customer identifiers in retained test logs. Keep aggregate counts/exit status, and redact or gate detailed diagnostics behind an explicit sanitized opt-in.

  • tests/integration/helpers_test.go#L912-L915: do not print raw result.Stdout/result.Stderr.
  • tests/integration/helpers_test.go#L927-L933: redact or omit repository/tag values.
  • tests/integration/helpers_test.go#L981-L982: redact or omit archive-derived repository names.

As per coding guidelines, **/*.{go,js,ts,python,py,java,cpp,c,rb,sh}: “Flag logging that may expose passwords, tokens, API keys, PII, session IDs, internal hostnames, or customer data.”

🤖 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 `@tests/integration/helpers_test.go` around lines 912 - 915, Redact or remove
untrusted diagnostic values from the logging paths in
tests/integration/helpers_test.go:912-915,
tests/integration/helpers_test.go:927-933, and
tests/integration/helpers_test.go:981-982. Update the helper around
result.Stdout/result.Stderr to retain only aggregate counts or exit status, and
redact or omit repository, tag, and archive-derived repository values; detailed
diagnostics may remain only behind an explicit sanitized opt-in.

Source: Coding guidelines

🤖 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.

Outside diff comments:
In `@tests/integration/helpers_test.go`:
- Around line 912-915: Redact or remove untrusted diagnostic values from the
logging paths in tests/integration/helpers_test.go:912-915,
tests/integration/helpers_test.go:927-933, and
tests/integration/helpers_test.go:981-982. Update the helper around
result.Stdout/result.Stderr to retain only aggregate counts or exit status, and
redact or omit repository, tag, and archive-derived repository values; detailed
diagnostics may remain only behind an explicit sanitized opt-in.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5b566157-96ba-45e8-adb6-bb7c7a590618

📥 Commits

Reviewing files that changed from the base of the PR and between 2f5faab and 4d4160b.

📒 Files selected for processing (4)
  • tests/integration/helpers_test.go
  • tests/integration/incremental_mirroring_test.go
  • tests/integration/testdata/imagesetconfigs/operators/isc-operator-incremental-initial.yaml
  • tests/integration/testdata/imagesetconfigs/operators/isc-operator-incremental-update.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/integration/testdata/imagesetconfigs/operators/isc-operator-incremental-initial.yaml
  • tests/integration/testdata/imagesetconfigs/operators/isc-operator-incremental-update.yaml

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown

@nidangavali: 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.

@openshift-ci-robot

openshift-ci-robot commented Jul 23, 2026

Copy link
Copy Markdown

@nidangavali: This pull request references CLID-614 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Description

Add an integration test for operator incremental mirroring (mirrorToDisk). The test verifies that oc-mirror produces archives containing only new content on subsequent runs when the ImageSetConfig changes.

The test runs mirrorToDisk twice against the same workspace with different ISCs:

  • Step 1: mirrors operator foo pinned at version 0.2.0
  • Step 2: expands foo to version range 0.2.0–0.3.1 and adds a new package bar (stable channel)

It then validates that the second archive contains only the incremental data,new blobs from the expanded version range and the newly added package with no overlap from the first archive.

Github / Jira issue: CLID-614

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code Improvements (Refactoring, Performance, CI upgrades, etc)
  • Internal repo assets (diagrams / docs on github repo)
  • This change requires a documentation update on openshift docs

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Expected Outcome

  • Step 1 produces a tar archive containing blobs for foo at version 0.2.0
  • Step 2 produces a tar archive containing only new blobs (additional foo versions and bar package)
  • No blob from the initial archive appears in the incremental archive
  • The initial archive does not contain any bar entries
  • The incremental archive contains the expected repositories from the updated ISC

Summary by CodeRabbit

Summary by CodeRabbit

  • Tests
  • Added new integration-test helper utilities to summarize tar archives and validate their contents (including blob and repository-level checks).
  • Added new ImageSetConfiguration fixtures for operator incremental mirroring step-based scenarios.
  • Introduced a new incremental mirroring integration test that runs mirror-to-disk twice and verifies blob non-overlap and expected archive contents.

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.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants