Skip to content

CLID-643: Build relevant additional documentation on oc-mirror#1462

Open
dorzel wants to merge 1 commit into
openshift:mainfrom
dorzel:CLID-643
Open

CLID-643: Build relevant additional documentation on oc-mirror#1462
dorzel wants to merge 1 commit into
openshift:mainfrom
dorzel:CLID-643

Conversation

@dorzel

@dorzel dorzel commented Jul 2, 2026

Copy link
Copy Markdown
Member

Description

Adds additional docs in docs/features. Removes old NOTES.md. Updates TROUBLESHOOTING.md.

Github / Jira issue: https://redhat.atlassian.net/browse/CLID-643

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?

Expected Outcome

Summary by CodeRabbit

  • Documentation
    • Added new guides covering mirroring workflows, filtering, dry runs, archive management, and generated cluster resources.
    • Expanded troubleshooting with clearer log collection, content discovery, registry access, cache recovery, and common error guidance.
    • Removed outdated engineering notes from the notes file.

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

openshift-ci-robot commented Jul 2, 2026

Copy link
Copy Markdown

@dorzel: This pull request references CLID-643 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 story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Description

Adds additional docs in docs/features. Removes old NOTES.md. Updates TROUBLESHOOTING.md.

Github / Jira issue: https://redhat.atlassian.net/browse/CLID-643

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?

Expected Outcome

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 r4f4 July 2, 2026 21:40
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Walkthrough

This PR removes stale engineering notes from NOTES.md, substantially rewrites TROUBLESHOOTING.md with expanded diagnostic sections, and adds five new documentation pages under docs/features/ covering mirroring workflows, archive management, cluster resources, dry-run, and filtering.

Changes

Documentation updates

Layer / File(s) Summary
Notes cleanup
NOTES.md
Removes all prior POC engineering notes content.
Troubleshooting guide rewrite
TROUBLESHOOTING.md
Rewrites logging, content discovery, dry-run, registry access, cache issues, operator installation, registry parsing, and common errors sections.
Mirroring workflows guide
docs/features/mirroring-workflows.md
Adds new page describing m2d/d2m/m2m workflows, prerequisites, flags, incremental mirroring, working-dir layout, and workflow selection logic.
Archive management guide
docs/features/archive-management.md
Adds new page describing archive segmentation, caching, incremental mirroring, publishing, cleanup, and recovery.
Cluster resources guide
docs/features/cluster-resources.md
Adds new page describing generated manifest types, output locations, and apply instructions.
Dry-run guide
docs/features/dry-run.md
Adds new page describing the --dry-run flag behavior and output artifacts.
Filtering guide
docs/features/filtering.md
Adds new page describing platform, operator, additional image, Helm chart, and blocked image filtering.

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

Suggested labels: documentation

Suggested reviewers: none identified

Poem

A rabbit hopped through docs anew,
Deleted notes, then wrote a few,
Workflows, archives, filters clear,
Troubleshooting tips brought near,
Mirrors mapped for all to view! 🐇📚

🚥 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 accurately reflects the main change: adding and updating oc-mirror documentation for CLID-643.
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 PR only changes docs/notes files; no test/spec files or Ginkgo titles appear in the diff, so the check is not applicable.
Test Structure And Quality ✅ Passed PR only changes docs/notes; no Ginkgo test code or test setup patterns were modified.
Microshift Test Compatibility ✅ Passed PR changes are docs-only (Markdown/NOTES); no Ginkgo e2e tests or MicroShift-relevant APIs/features were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only markdown docs changed; no Ginkgo e2e tests or SNO-sensitive test code were added.
Topology-Aware Scheduling Compatibility ✅ Passed The commit only changes docs and deletes NOTES.md; no deployment manifests, controllers, or operator code were modified, so no topology-aware scheduling risk is introduced.
Ote Binary Stdout Contract ✅ Passed Only markdown/docs changed; no main/init/TestMain/suite code or stdout logging paths were modified.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR only changes docs/notes; no Ginkgo e2e tests or networking code were added.
No-Weak-Crypto ✅ Passed Changed files contain no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB or custom-crypto code; searches found no weak-crypto or constant-time comparison usage in the PR docs.
Container-Privileges ✅ Passed PR is docs-only; no manifest files or privilege flags appear in the diff.
No-Sensitive-Data-In-Logs ✅ Passed The changed docs mention log levels, log file paths, and credential locations, but they don’t print or require secrets, tokens, PII, or internal customer data.
✨ 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.

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

🤖 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 `@docs/features/archive-management.md`:
- Around line 46-53: Update the archive-management docs to describe the resolved
cache directory instead of claiming a fixed ~/.oc-mirror default: explain that
--cache-dir falls back to $HOME when unset and OC_MIRROR_CACHE overrides it, and
revise the rm -rf and tar xf restore examples to use that resolved path. Also
update the restore snippet in the relevant section to be tagged as bash.

In `@docs/features/cluster-resources.md`:
- Around line 13-15: The directory listing fence in the cluster resources docs
is unlabeled, which triggers markdownlint. Update the fenced block under the
output-path section to include a language label such as text so the markdown
renderer and linter treat it as a proper code fence. Locate the fenced listing
by its <workspace>/working-dir/cluster-resources/ content and adjust only the
fence declaration.

In `@docs/features/dry-run.md`:
- Line 45: The status sentence in the dry-run docs is using the wrong workflow
wording by saying “disk to a disconnected registry” even though this section is
about mirror-to-disk dry runs. Update the text in the dry-run documentation to
describe the mirror-to-disk workflow consistently, keeping the reference to the
missing.txt check and the confirmation message aligned with that flow.
- Around line 28-33: Both literal-output code fences in the dry-run
documentation are missing a language identifier, so update each plain output
fence to use a text fence. Fix the fenced blocks in the dry-run example sections
by adding a markdown language tag such as text to the output snippets so
markdownlint accepts them. Keep the visible content unchanged and ensure both
affected fences are updated consistently.

In `@docs/features/mirroring-workflows.md`:
- Around line 113-119: The directory tree in the mirroring workflows doc is an
unlabeled fenced block, which triggers markdownlint. Update the code fence
around the working-dir listing to include a text language tag (or equivalent) so
the tree block is explicitly labeled while keeping the content unchanged.
🪄 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: ed238ec0-14e6-4bd2-a391-82b774f92e9c

📥 Commits

Reviewing files that changed from the base of the PR and between c3552e2 and 719ef86.

📒 Files selected for processing (7)
  • NOTES.md
  • TROUBLESHOOTING.md
  • docs/features/archive-management.md
  • docs/features/cluster-resources.md
  • docs/features/dry-run.md
  • docs/features/filtering.md
  • docs/features/mirroring-workflows.md
💤 Files with no reviewable changes (1)
  • NOTES.md

Comment on lines +46 to +53
oc-mirror maintains a local cache for image data. The default cache location is `~/.oc-mirror`, and it can be configured with:

- The `--cache-dir` flag: `oc-mirror -c ./isc.yaml --cache-dir /custom/cache file:///home/user/output`
- The `OC_MIRROR_CACHE` environment variable

These two options are mutually exclusive.

The cache stores downloaded image layers and manifests between runs. In mirror-to-disk workflows, the archive contains only the blobs that are new since the last run, while the cache retains the complete set of previously downloaded data.

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 | 🟠 Major | ⚡ Quick win

Use the actual cache directory here.

--cache-dir falls back to $HOME when unset, with OC_MIRROR_CACHE as the env override; it does not default to ~/.oc-mirror. Please update the prose and the rm -rf / tar xf examples to reference the resolved cache path, or these instructions will point users at the wrong directory. Also tag the restore snippet as bash.

Also applies to: 115-128

🤖 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 `@docs/features/archive-management.md` around lines 46 - 53, Update the
archive-management docs to describe the resolved cache directory instead of
claiming a fixed ~/.oc-mirror default: explain that --cache-dir falls back to
$HOME when unset and OC_MIRROR_CACHE overrides it, and revise the rm -rf and tar
xf restore examples to use that resolved path. Also update the restore snippet
in the relevant section to be tagged as bash.

Comment on lines +13 to +15
```
<workspace>/working-dir/cluster-resources/
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Label the output-path fence.

The directory listing needs a fence language (for example, text) so markdownlint stops flagging it.

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 13-13: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 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 `@docs/features/cluster-resources.md` around lines 13 - 15, The directory
listing fence in the cluster resources docs is unlabeled, which triggers
markdownlint. Update the fenced block under the output-path section to include a
language label such as text so the markdown renderer and linter treat it as a
proper code fence. Locate the fenced listing by its
<workspace>/working-dir/cluster-resources/ content and adjust only the fence
declaration.

Source: Linters/SAST tools

Comment thread docs/features/dry-run.md
Comment on lines +28 to +33
Lists every image that would be mirrored, in `source=destination` format:

```
quay.io/openshift-release-dev/ocp-release@sha256:abc123...=registry.example.com/openshift-release-dev/ocp-release@sha256:abc123...
registry.redhat.io/redhat/redhat-operator-index:v4.18=registry.example.com/redhat/redhat-operator-index:v4.18
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Tag both literal-output fences.

These blocks are plain output, so add a fence language such as text to satisfy markdownlint.

Also applies to: 41-43

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 30-30: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 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 `@docs/features/dry-run.md` around lines 28 - 33, Both literal-output code
fences in the dry-run documentation are missing a language identifier, so update
each plain output fence to use a text fence. Fix the fenced blocks in the
dry-run example sections by adding a markdown language tag such as text to the
output snippets so markdownlint accepts them. Keep the visible content unchanged
and ensure both affected fences are updated consistently.

Source: Linters/SAST tools

Comment thread docs/features/dry-run.md
quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:def456...=docker://localhost:55000/openshift-release-dev/ocp-v4.0-art-dev@sha256:def456...
```

If all required images are already in the cache, `missing.txt` is not created and a message confirms that mirroring from disk to a disconnected registry can proceed.

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

Fix the workflow wording.

This sentence says “disk to a disconnected registry,” but this section is describing mirror-to-disk dry runs. Reword it so the status message matches the workflow.

🤖 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 `@docs/features/dry-run.md` at line 45, The status sentence in the dry-run docs
is using the wrong workflow wording by saying “disk to a disconnected registry”
even though this section is about mirror-to-disk dry runs. Update the text in
the dry-run documentation to describe the mirror-to-disk workflow consistently,
keeping the reference to the missing.txt check and the confirmation message
aligned with that flow.

Comment on lines +113 to +119
```
working-dir/
cluster-resources/ # Generated IDMS, ITMS, CatalogSource, etc.
logs/ # Detailed operation logs
dry-run/ # Dry-run output (when --dry-run is used)
delete/ # Delete operation artifacts
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Label the tree block.

The directory listing needs a fence language (for example, text) to clear markdownlint.

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 113-113: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 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 `@docs/features/mirroring-workflows.md` around lines 113 - 119, The directory
tree in the mirroring workflows doc is an unlabeled fenced block, which triggers
markdownlint. Update the code fence around the working-dir listing to include a
text language tag (or equivalent) so the tree block is explicitly labeled while
keeping the content unchanged.

Source: Linters/SAST tools

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown

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

@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 Jul 6, 2026
@openshift-ci

openshift-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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

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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants