Skip to content

Remove the deprecated image field#1498

Merged
lukasfrank merged 2 commits into
ironcore-dev:mainfrom
opensovereigncloud:osc/feat/remove-deprecated-image-field
Jul 13, 2026
Merged

Remove the deprecated image field#1498
lukasfrank merged 2 commits into
ironcore-dev:mainfrom
opensovereigncloud:osc/feat/remove-deprecated-image-field

Conversation

@Rohit-0505

@Rohit-0505 Rohit-0505 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Proposed Changes

  • Remove the deprecated image and imagePullSecretRef field from volumeSpec and machineSpec

/ref #1495

Summary by CodeRabbit

Summary by CodeRabbit

  • Breaking Changes

    • Removed legacy bootstrap image / imagePullSecretRef fields from Machine and Volume specs (including client builders and published schemas).
    • OS image selection and volume bootstrapping now rely on dataSource.osImage.image (and snapshot restores on dataSource).
  • Documentation

    • Updated docs and samples to remove the legacy fields and use dataSource.osImage.image.
  • Tests / UI

    • Updated tests and tables to stop asserting/rendering removed legacy image values.
  • New Features

    • Added a sample for restoring a Volume from a snapshot.

@Rohit-0505 Rohit-0505 self-assigned this Jul 2, 2026
@Rohit-0505 Rohit-0505 requested a review from a team July 2, 2026 10:52
@github-actions github-actions Bot added size/L documentation Improvements or additions to documentation labels Jul 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

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

Walkthrough

Deprecated compute and storage image fields were removed, related generated/client/validation code was updated, and machine and volume flows now use structured dataSource.osImage inputs instead of top-level image fields.

Changes

Deprecated API fields and generated plumbing

Layer / File(s) Summary
API contracts and generated code
api/compute/v1alpha1/*, api/storage/v1alpha1/*, internal/apis/compute/*, internal/apis/storage/*, iri/apis/volume/v1alpha1/api.proto
Deprecated image fields were removed from MachineSpec and VolumeSpec, along with related deepcopy, conversion, secret-name, and proto schema handling.
Client-go and OpenAPI surfaces
client-go/applyconfigurations/*, client-go/openapi/*
Apply-configuration setters and fields for the removed properties were deleted, and the generated OpenAPI schema and violation report were updated accordingly.
Validation and tests
internal/apis/compute/validation/*, internal/apis/storage/validation/*
Validation no longer checks or rejects the removed image fields, and the machine validation test now targets ignition-ref name validation instead.

Runtime wiring and outputs

Layer / File(s) Summary
Broker and poollet wiring
broker/*, poollet/*, internal/controllers/compute/machineclass_controller_test.go
Machine and volume creation paths stop setting the removed fields, volume creation now derives structured data sources, and the poollet test assertions no longer expect an empty Image value.
Table output, samples, and docs
internal/registry/*, irictl-volume/*, config/samples/*, docs/usage/compute/machine.md
Table converters stop emitting image columns, sample manifests switch to dataSource.osImage.image, and the compute machine docs remove the deprecated image field.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related issues

Suggested labels: area/iaas

Suggested reviewers: afritzler, lukasfrank

Sequence Diagram(s)

sequenceDiagram
  participant Volumepoollet
  participant Volumebroker
  participant StorageAPI
  Volumepoollet->>Volumebroker: prepareIRIVolume / CreateVolume
  Volumebroker->>Volumebroker: derive osImageDataSource or volumeSnapshotRef
  Volumebroker->>StorageAPI: create VolumeSpec with DataSource only
  StorageAPI-->>Volumebroker: created Volume
  Volumebroker-->>Volumepoollet: iri.VolumeSpec without Image
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is on-topic but does not match the template: it has only one Proposed Changes bullet and no Fixes # line. Expand Proposed Changes to the required bullet list and replace the /ref line with a Fixes # reference.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title matches the main change: removing the deprecated image field.
✨ 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.

Caution

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

⚠️ Outside diff range comments (1)
config/samples/e2e/network-policy/README.md (1)

20-45: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update the step text to match the nested OS image path.

The sample now uses dataSource.osImage.image, but the instructions still mention image as if it were top-level. That will mislead users following the README.

Suggested wording change
-4. Create the below `patch-machine.yaml` in `network-policy` folder with the desired `machineClassRef`, `machinePoolRef`, `volumeClassRef`, `volumePoolRef`, `image` etc. as per your environment
+4. Create the below `patch-machine.yaml` in `network-policy` folder with the desired `machineClassRef`, `machinePoolRef`, `volumeClassRef`, `volumePoolRef`, and `dataSource.osImage.image` values as per your environment
🤖 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 `@config/samples/e2e/network-policy/README.md` around lines 20 - 45, Update the
README step text for the Machine sample so it references the nested OS image
field used in the snippet, not a top-level image key. In the patch-machine.yaml
instructions around the Machine example, adjust the wording to point users to
dataSource.osImage.image along with the existing machineClassRef,
machinePoolRef, volumeClassRef, and volumePoolRef fields so the guidance matches
the actual spec structure.
🧹 Nitpick comments (1)
config/samples/e2e/machine-with-non-ephemeral-resources/README.md (1)

48-53: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add a language hint to the fenced code block.

markdownlint flags the fenced block opened here for missing a language annotation.

📝 Proposed fix
-```
+```yaml
 patches:
 - path: patch-machine.yaml
 - path: patch-volume.yaml
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @config/samples/e2e/machine-with-non-ephemeral-resources/README.md around
lines 48 - 53, The fenced code block in the README markdown is missing a
language hint, which triggers markdownlint. Update the block under the
kustomization.yaml example to use a YAML fence so the snippet is clearly
annotated, keeping the existing patch list content unchanged.


</details>

<!-- cr-comment:v1:028360bbc85b24f3dfd8cbcf -->

_Source: Linters/SAST tools_

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

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 @config/samples/e2e/network-policy/README.md:

  • Around line 20-45: Update the README step text for the Machine sample so it
    references the nested OS image field used in the snippet, not a top-level image
    key. In the patch-machine.yaml instructions around the Machine example, adjust
    the wording to point users to dataSource.osImage.image along with the existing
    machineClassRef, machinePoolRef, volumeClassRef, and volumePoolRef fields so the
    guidance matches the actual spec structure.

Nitpick comments:
In @config/samples/e2e/machine-with-non-ephemeral-resources/README.md:

  • Around line 48-53: The fenced code block in the README markdown is missing a
    language hint, which triggers markdownlint. Update the block under the
    kustomization.yaml example to use a YAML fence so the snippet is clearly
    annotated, keeping the existing patch list content unchanged.

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: Organization UI

**Review profile**: CHILL

**Plan**: Pro

**Run ID**: `ccf67b7d-ff48-4f72-bef8-3e8637a3a99a`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between fd1f73f12ae5b856efaaca60350190ef8e28aff3 and ae3aa64ec1dec4fac8dc1d8e0f7a5070259ef65a.

</details>

<details>
<summary>⛔ Files ignored due to path filters (4)</summary>

* `gen/swagger.json` is excluded by `!**/gen/**`
* `gen/v3/apis__compute.ironcore.dev__v1alpha1_openapi.json` is excluded by `!**/gen/**`
* `gen/v3/apis__storage.ironcore.dev__v1alpha1_openapi.json` is excluded by `!**/gen/**`
* `iri/apis/volume/v1alpha1/api.pb.go` is excluded by `!**/*.pb.go`

</details>

<details>
<summary>📒 Files selected for processing (49)</summary>

* `api/compute/v1alpha1/machine_types.go`
* `api/compute/v1alpha1/util.go`
* `api/compute/v1alpha1/zz_generated.deepcopy.go`
* `api/storage/v1alpha1/volume_types.go`
* `api/storage/v1alpha1/zz_generated.deepcopy.go`
* `broker/machinebroker/server/machine_create.go`
* `broker/volumebroker/server/volume.go`
* `broker/volumebroker/server/volume_create.go`
* `broker/volumebroker/server/volume_create_test.go`
* `client-go/applyconfigurations/compute/v1alpha1/machinespec.go`
* `client-go/applyconfigurations/storage/v1alpha1/volumespec.go`
* `client-go/openapi/api_violations.report`
* `client-go/openapi/zz_generated.openapi.go`
* `config/samples/compute_v1alpha1_machine.yaml`
* `config/samples/e2e/bases/loadbalancer-public/machine1.yaml`
* `config/samples/e2e/bases/loadbalancer-public/machine2.yaml`
* `config/samples/e2e/bases/machine-with-ephemeral-resources/machine.yaml`
* `config/samples/e2e/bases/machine-with-nonephemeral-resources/volume.yaml`
* `config/samples/e2e/bases/network-peering/machine1.yaml`
* `config/samples/e2e/bases/network-peering/machine2.yaml`
* `config/samples/e2e/bases/network-policy/machine1.yaml`
* `config/samples/e2e/bases/network-policy/machine2.yaml`
* `config/samples/e2e/loadbalancer-public/README.md`
* `config/samples/e2e/machine-with-ephemeral-resources/README.md`
* `config/samples/e2e/machine-with-non-ephemeral-resources/README.md`
* `config/samples/e2e/network-peering/README.md`
* `config/samples/e2e/network-policy/README.md`
* `config/samples/storage_v1alpha1_volume.yaml`
* `config/samples/storage_v1alpha1_volume_restore_from_snapshot.yaml`
* `docs/usage/compute/machine.md`
* `internal/apis/compute/machine_types.go`
* `internal/apis/compute/util.go`
* `internal/apis/compute/v1alpha1/zz_generated.conversion.go`
* `internal/apis/compute/validation/machine.go`
* `internal/apis/compute/validation/machine_test.go`
* `internal/apis/compute/zz_generated.deepcopy.go`
* `internal/apis/storage/v1alpha1/zz_generated.conversion.go`
* `internal/apis/storage/validation/volume.go`
* `internal/apis/storage/validation/volume_test.go`
* `internal/apis/storage/volume_types.go`
* `internal/apis/storage/zz_generated.deepcopy.go`
* `internal/controllers/compute/machineclass_controller_test.go`
* `internal/registry/compute/machine/storage/tableconvertor.go`
* `internal/registry/storage/volume/storage/tableconvertor.go`
* `iri/apis/volume/v1alpha1/api.proto`
* `irictl-volume/tableconverters/volume.go`
* `poollet/machinepoollet/controllers/machine_controller.go`
* `poollet/volumepoollet/controllers/volume_controller.go`
* `poollet/volumepoollet/controllers/volume_controller_test.go`

</details>

<details>
<summary>💤 Files with no reviewable changes (31)</summary>

* poollet/machinepoollet/controllers/machine_controller.go
* broker/volumebroker/server/volume.go
* api/compute/v1alpha1/util.go
* internal/apis/storage/zz_generated.deepcopy.go
* broker/volumebroker/server/volume_create_test.go
* internal/apis/compute/util.go
* internal/controllers/compute/machineclass_controller_test.go
* config/samples/compute_v1alpha1_machine.yaml
* poollet/volumepoollet/controllers/volume_controller_test.go
* irictl-volume/tableconverters/volume.go
* internal/apis/compute/validation/machine_test.go
* broker/machinebroker/server/machine_create.go
* client-go/applyconfigurations/storage/v1alpha1/volumespec.go
* client-go/openapi/zz_generated.openapi.go
* client-go/openapi/api_violations.report
* internal/apis/storage/validation/volume.go
* api/compute/v1alpha1/machine_types.go
* api/storage/v1alpha1/zz_generated.deepcopy.go
* internal/registry/compute/machine/storage/tableconvertor.go
* poollet/volumepoollet/controllers/volume_controller.go
* iri/apis/volume/v1alpha1/api.proto
* api/compute/v1alpha1/zz_generated.deepcopy.go
* internal/registry/storage/volume/storage/tableconvertor.go
* internal/apis/compute/v1alpha1/zz_generated.conversion.go
* internal/apis/compute/machine_types.go
* client-go/applyconfigurations/compute/v1alpha1/machinespec.go
* internal/apis/storage/volume_types.go
* internal/apis/compute/zz_generated.deepcopy.go
* internal/apis/compute/validation/machine.go
* internal/apis/storage/v1alpha1/zz_generated.conversion.go
* api/storage/v1alpha1/volume_types.go

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@opensovereigncloud-user opensovereigncloud-user force-pushed the osc/feat/remove-deprecated-image-field branch from ae3aa64 to 61e01d3 Compare July 2, 2026 11:06
@opensovereigncloud-user opensovereigncloud-user force-pushed the osc/feat/remove-deprecated-image-field branch from 61e01d3 to b38f37c Compare July 6, 2026 05:00

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

🤖 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 `@config/samples/e2e/machine-with-non-ephemeral-resources/README.md`:
- Around line 48-54: The fenced example in the README is missing a YAML language
tag, which breaks markdownlint and syntax highlighting. Update the fenced block
under the kustomization example to use the existing README snippet around the
`patches` content, and keep the rest of the example 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4ec4c9c3-226b-4877-bea1-47717b575837

📥 Commits

Reviewing files that changed from the base of the PR and between 61e01d3 and b38f37c.

⛔ Files ignored due to path filters (4)
  • gen/swagger.json is excluded by !**/gen/**
  • gen/v3/apis__compute.ironcore.dev__v1alpha1_openapi.json is excluded by !**/gen/**
  • gen/v3/apis__storage.ironcore.dev__v1alpha1_openapi.json is excluded by !**/gen/**
  • iri/apis/volume/v1alpha1/api.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (49)
  • api/compute/v1alpha1/machine_types.go
  • api/compute/v1alpha1/util.go
  • api/compute/v1alpha1/zz_generated.deepcopy.go
  • api/storage/v1alpha1/volume_types.go
  • api/storage/v1alpha1/zz_generated.deepcopy.go
  • broker/machinebroker/server/machine_create.go
  • broker/volumebroker/server/volume.go
  • broker/volumebroker/server/volume_create.go
  • broker/volumebroker/server/volume_create_test.go
  • client-go/applyconfigurations/compute/v1alpha1/machinespec.go
  • client-go/applyconfigurations/storage/v1alpha1/volumespec.go
  • client-go/openapi/api_violations.report
  • client-go/openapi/zz_generated.openapi.go
  • config/samples/compute_v1alpha1_machine.yaml
  • config/samples/e2e/bases/loadbalancer-public/machine1.yaml
  • config/samples/e2e/bases/loadbalancer-public/machine2.yaml
  • config/samples/e2e/bases/machine-with-ephemeral-resources/machine.yaml
  • config/samples/e2e/bases/machine-with-nonephemeral-resources/volume.yaml
  • config/samples/e2e/bases/network-peering/machine1.yaml
  • config/samples/e2e/bases/network-peering/machine2.yaml
  • config/samples/e2e/bases/network-policy/machine1.yaml
  • config/samples/e2e/bases/network-policy/machine2.yaml
  • config/samples/e2e/loadbalancer-public/README.md
  • config/samples/e2e/machine-with-ephemeral-resources/README.md
  • config/samples/e2e/machine-with-non-ephemeral-resources/README.md
  • config/samples/e2e/network-peering/README.md
  • config/samples/e2e/network-policy/README.md
  • config/samples/storage_v1alpha1_volume.yaml
  • config/samples/storage_v1alpha1_volume_restore_from_snapshot.yaml
  • docs/usage/compute/machine.md
  • internal/apis/compute/machine_types.go
  • internal/apis/compute/util.go
  • internal/apis/compute/v1alpha1/zz_generated.conversion.go
  • internal/apis/compute/validation/machine.go
  • internal/apis/compute/validation/machine_test.go
  • internal/apis/compute/zz_generated.deepcopy.go
  • internal/apis/storage/v1alpha1/zz_generated.conversion.go
  • internal/apis/storage/validation/volume.go
  • internal/apis/storage/validation/volume_test.go
  • internal/apis/storage/volume_types.go
  • internal/apis/storage/zz_generated.deepcopy.go
  • internal/controllers/compute/machineclass_controller_test.go
  • internal/registry/compute/machine/storage/tableconvertor.go
  • internal/registry/storage/volume/storage/tableconvertor.go
  • iri/apis/volume/v1alpha1/api.proto
  • irictl-volume/tableconverters/volume.go
  • poollet/machinepoollet/controllers/machine_controller.go
  • poollet/volumepoollet/controllers/volume_controller.go
  • poollet/volumepoollet/controllers/volume_controller_test.go
💤 Files with no reviewable changes (30)
  • broker/machinebroker/server/machine_create.go
  • client-go/openapi/api_violations.report
  • broker/volumebroker/server/volume_create_test.go
  • api/compute/v1alpha1/util.go
  • internal/apis/compute/machine_types.go
  • client-go/openapi/zz_generated.openapi.go
  • internal/controllers/compute/machineclass_controller_test.go
  • irictl-volume/tableconverters/volume.go
  • broker/volumebroker/server/volume.go
  • config/samples/compute_v1alpha1_machine.yaml
  • client-go/applyconfigurations/storage/v1alpha1/volumespec.go
  • internal/apis/compute/zz_generated.deepcopy.go
  • internal/apis/compute/util.go
  • internal/apis/compute/v1alpha1/zz_generated.conversion.go
  • poollet/volumepoollet/controllers/volume_controller.go
  • internal/apis/storage/v1alpha1/zz_generated.conversion.go
  • internal/apis/storage/zz_generated.deepcopy.go
  • api/storage/v1alpha1/zz_generated.deepcopy.go
  • api/compute/v1alpha1/zz_generated.deepcopy.go
  • internal/apis/storage/validation/volume.go
  • api/storage/v1alpha1/volume_types.go
  • poollet/volumepoollet/controllers/volume_controller_test.go
  • internal/registry/compute/machine/storage/tableconvertor.go
  • internal/apis/storage/volume_types.go
  • api/compute/v1alpha1/machine_types.go
  • internal/registry/storage/volume/storage/tableconvertor.go
  • client-go/applyconfigurations/compute/v1alpha1/machinespec.go
  • internal/apis/compute/validation/machine.go
  • internal/apis/compute/validation/machine_test.go
  • iri/apis/volume/v1alpha1/api.proto
✅ Files skipped from review due to trivial changes (7)
  • config/samples/e2e/bases/machine-with-ephemeral-resources/machine.yaml
  • internal/apis/storage/validation/volume_test.go
  • config/samples/storage_v1alpha1_volume.yaml
  • config/samples/e2e/network-peering/README.md
  • config/samples/e2e/loadbalancer-public/README.md
  • docs/usage/compute/machine.md
  • config/samples/e2e/network-policy/README.md
🚧 Files skipped from review as they are similar to previous changes (11)
  • config/samples/storage_v1alpha1_volume_restore_from_snapshot.yaml
  • config/samples/e2e/bases/machine-with-nonephemeral-resources/volume.yaml
  • config/samples/e2e/bases/network-peering/machine2.yaml
  • config/samples/e2e/bases/network-policy/machine1.yaml
  • config/samples/e2e/bases/network-peering/machine1.yaml
  • config/samples/e2e/bases/loadbalancer-public/machine1.yaml
  • config/samples/e2e/machine-with-ephemeral-resources/README.md
  • config/samples/e2e/bases/loadbalancer-public/machine2.yaml
  • config/samples/e2e/bases/network-policy/machine2.yaml
  • poollet/machinepoollet/controllers/machine_controller.go
  • broker/volumebroker/server/volume_create.go

Comment thread config/samples/e2e/machine-with-non-ephemeral-resources/README.md
@friegger friegger linked an issue Jul 6, 2026 that may be closed by this pull request
7 tasks
@opensovereigncloud-user opensovereigncloud-user force-pushed the osc/feat/remove-deprecated-image-field branch from b38f37c to 4a7ea64 Compare July 7, 2026 11:27
Comment thread internal/registry/storage/volume/storage/tableconvertor.go
Comment thread internal/registry/compute/machine/storage/tableconvertor.go
Comment thread iri/apis/volume/v1alpha1/api.proto

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

🤖 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 `@internal/registry/storage/volume/storage/tableconvertor.go`:
- Around line 59-63: The table conversion in volume storage can panic when
accessing the `volume.Spec.DataSource.OSImage` chain without nil checks. Update
the logic in `StorageTableConvertor` to guard `DataSource` and `OSImage` before
reading `Image`, similar to the nil-safe pattern used in the compute table
converter; if either is nil, append "<none>" instead of dereferencing the chain.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: aa8bc293-ecdd-48d6-8306-5a9d1c0b671c

📥 Commits

Reviewing files that changed from the base of the PR and between 4a7ea64 and 59de802.

⛔ Files ignored due to path filters (1)
  • iri/apis/volume/v1alpha1/api.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (3)
  • internal/registry/compute/machine/storage/tableconvertor.go
  • internal/registry/storage/volume/storage/tableconvertor.go
  • iri/apis/volume/v1alpha1/api.proto

@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

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

🤖 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 `@internal/registry/storage/volume/storage/tableconvertor.go`:
- Around line 59-63: The table conversion in volume storage can panic when
accessing the `volume.Spec.DataSource.OSImage` chain without nil checks. Update
the logic in `StorageTableConvertor` to guard `DataSource` and `OSImage` before
reading `Image`, similar to the nil-safe pattern used in the compute table
converter; if either is nil, append "<none>" instead of dereferencing the chain.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: aa8bc293-ecdd-48d6-8306-5a9d1c0b671c

📥 Commits

Reviewing files that changed from the base of the PR and between 4a7ea64 and 59de802.

⛔ Files ignored due to path filters (1)
  • iri/apis/volume/v1alpha1/api.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (3)
  • internal/registry/compute/machine/storage/tableconvertor.go
  • internal/registry/storage/volume/storage/tableconvertor.go
  • iri/apis/volume/v1alpha1/api.proto
🛑 Comments failed to post (1)
internal/registry/storage/volume/storage/tableconvertor.go (1)

59-63: 🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win

Potential nil pointer dereference on DataSource.OSImage chain.

volume.Spec.DataSource.OSImage.Image will panic if DataSource or OSImage is nil. Unlike the compute table converter which guards with volume.LocalDisk != nil, this path has no nil checks. A volume without an OS image data source would crash the table conversion.

🛡️ Proposed fix with nil guards
-		if image := volume.Spec.DataSource.OSImage.Image; image != "" {
+		var image string
+		if volume.Spec.DataSource != nil && volume.Spec.DataSource.OSImage != nil {
+			image = volume.Spec.DataSource.OSImage.Image
+		}
+		if image != "" {
 			cells = append(cells, image)
 		} else {
 			cells = append(cells, "<none>")
 		}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

		var image string
		if volume.Spec.DataSource != nil && volume.Spec.DataSource.OSImage != nil {
			image = volume.Spec.DataSource.OSImage.Image
		}
		if image != "" {
			cells = append(cells, image)
		} else {
			cells = append(cells, "<none>")
		}
🤖 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 `@internal/registry/storage/volume/storage/tableconvertor.go` around lines 59 -
63, The table conversion in volume storage can panic when accessing the
`volume.Spec.DataSource.OSImage` chain without nil checks. Update the logic in
`StorageTableConvertor` to guard `DataSource` and `OSImage` before reading
`Image`, similar to the nil-safe pattern used in the compute table converter; if
either is nil, append "<none>" instead of dereferencing the chain.

@opensovereigncloud-user opensovereigncloud-user force-pushed the osc/feat/remove-deprecated-image-field branch 2 times, most recently from 6295b18 to ea70f86 Compare July 8, 2026 06:31
@Rohit-0505 Rohit-0505 requested a review from lukasfrank July 8, 2026 06:37
@opensovereigncloud-user opensovereigncloud-user force-pushed the osc/feat/remove-deprecated-image-field branch from ea70f86 to b5e3493 Compare July 9, 2026 07:37

@lukasfrank lukasfrank left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please put a validation in place for osImage like it was with image

Comment thread internal/registry/storage/volume/storage/tableconvertor.go Outdated
@opensovereigncloud-user opensovereigncloud-user force-pushed the osc/feat/remove-deprecated-image-field branch from b5e3493 to 55e6dee Compare July 9, 2026 13:11
@@ -67,6 +67,9 @@ func validateVolumeSpec(spec *storage.VolumeSpec, fldPath *field.Path) field.Err

if spec.DataSource.OSImage != nil {
allErrs = append(allErrs, field.Forbidden(fldPath.Child("osImage"), "must not specify if volume class is empty"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Small thing in the validation: the inner if OSImage.Image != "" just duplicates the osImage forbidden error and reports it against spec.image, which no longer exists. Please drop it and use fldPath.Child("dataSource").Child("osImage") for the path.

@opensovereigncloud-user opensovereigncloud-user force-pushed the osc/feat/remove-deprecated-image-field branch from 55e6dee to 45a06d5 Compare July 13, 2026 09:54
Rohit-0505 and others added 2 commits July 13, 2026 16:48
Signed-off-by: Rohit Kumar <rohit.1si09ee045@gmail.com>
Signed-off-by: Rohit Kumar <rohit.1si09ee045@gmail.com>
@opensovereigncloud-user opensovereigncloud-user force-pushed the osc/feat/remove-deprecated-image-field branch from 45a06d5 to 6ed6ace Compare July 13, 2026 11:24
@lukasfrank lukasfrank merged commit fe0bdc5 into ironcore-dev:main Jul 13, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking documentation Improvements or additions to documentation size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the deprecated Image field

2 participants