Skip to content

[objectstorage-controller] Update to v0.2.2, drop upstreamed patches - #2261

Merged
Kirill Ilin (sircthulhu) merged 2 commits into
mainfrom
chore/objectstorage-drop-patches
Mar 26, 2026
Merged

Kirill Ilin (sircthulhu) merged 2 commits into
mainfrom
chore/objectstorage-drop-patches

Conversation

@lexfrei

@lexfrei Aleksei Sviridkin (lexfrei) commented Mar 23, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

Update COSI controller/sidecar from commit c2f6e65 to upstream
release v0.2.2 and remove two patches that have been merged:

Both were contributed by kvaps and included in the v0.2.2 release
(2025-12-08).

Also removes git from Dockerfile dependencies as it was only
needed for applying patches.

Note: make image needs to be run to rebuild the container image
and update values.yaml with the new tag/digest.

Release note

[objectstorage-controller] Update to v0.2.2, drop upstreamed patches

Summary by CodeRabbit

  • Refactor
    • Updated object storage controller build configuration to streamline upstream component retrieval and image build process.
    • Modified resource deletion handling so deletion flows are centralized and consistently enforced across create/update events.
    • Changed bucket naming scheme—buckets will no longer include the bucket class name in their identifier and follow the simplified naming pattern.

Update COSI controller/sidecar from commit c2f6e65 to v0.2.2
(f75d475) and remove two patches that have been merged upstream:

- 89-reconciliation.diff: fix reconciliation logic for existing
  and deleted objects (PR #89)
- 90-bucket-name.diff: prefix bucket names with bucket- using
  UID only (PR #90)

Both patches were contributed by kvaps and included in the
upstream v0.2.2 release (2025-12-08).

Also remove git from Dockerfile dependencies as it was only
needed for applying patches.

Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
@coderabbitai

coderabbitai Bot commented Mar 23, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: acc0adf8-0194-43cc-b786-98a41dc47d7a

📥 Commits

Reviewing files that changed from the base of the PR and between 50d6c29 and f1482c5.

📒 Files selected for processing (1)
  • packages/system/objectstorage-controller/images/objectstorage/Dockerfile
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/system/objectstorage-controller/images/objectstorage/Dockerfile

📝 Walkthrough

Walkthrough

The Dockerfile build was simplified (removed git and patch application; COMMIT_REF set to v0.2.2). Two local patches that altered reconciliation and bucket-name derivation were removed, reverting deletion-handling and bucket naming logic to prior behavior.

Changes

Cohort / File(s) Summary
Dockerfile build configuration
packages/system/objectstorage-controller/images/objectstorage/Dockerfile
Updated COMMIT_REF to v0.2.2, removed git from installed packages, and eliminated COPY patches /patches and git apply steps that applied local patch files.
Removed reconciliation & naming patches
packages/system/objectstorage-controller/images/objectstorage/patches/89-reconciliation.diff, packages/system/objectstorage-controller/images/objectstorage/patches/90-bucket-name.diff
Deleted patches that introduced early-deletion guards and centralized deletion handling across BucketClaim/Bucket/BucketAccess listeners and a patch that changed bucket name derivation (class-name+UID → UID-based). Tests referencing those behaviors were also removed in the patch set.

Sequence Diagram(s)

sequenceDiagram
    rect rgba(200,200,255,0.5)
    participant K8s as Kubernetes API
    participant Controller as ObjectStorage Controller
    participant Sidecar as ObjectStorage Sidecar
    participant Driver as Storage Driver
    end

    K8s->>Controller: Add/Update BucketClaim/BucketAccess (may have DeletionTimestamp)
    alt Deleted flows were removed (patches deleted)
        Controller->>Controller: handle add/update without early deletion guard
        Controller->>Driver: create/modify bucket or access
    else Prior patched flow (removed)
        Controller->>Controller: detect DeletionTimestamp -> deletion handler
        Controller->>Driver: delete bucket (ignore NotFound)
        Controller->>K8s: remove finalizer / update status
    end

    K8s->>Sidecar: Add/Update Bucket (may have DeletionTimestamp)
    alt Deleted flows were removed (patches deleted)
        Sidecar->>Sidecar: handle add/update without centralized deletion path
        Sidecar->>Driver: create/modify bucket resources
    else Prior patched flow (removed)
        Sidecar->>Sidecar: detect DeletionTimestamp -> handleDeletion
        Sidecar->>Driver: delete bucketAccess / bucket
        Sidecar->>K8s: remove finalizer / update bucket
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I chewed the patches, nibble by nibble,
COMMIT set, the build made simpler and nimble,
No more diffs to fuss or pry,
Buckets name themselves and drivers sigh,
Hoppity hop—onward we ship and sprout!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: updating COSI objectstorage-controller to v0.2.2 and removing upstreamed patches (89-reconciliation.diff and 90-bucket-name.diff).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/objectstorage-drop-patches

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.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the COSI controller and sidecar to the latest v0.2.2 release, which includes several fixes and improvements. By updating to this release, the PR removes the need for two custom patches that have been merged upstream, simplifying the codebase and reducing maintenance overhead. The Dockerfile has also been updated to reflect the removal of the patching process.

Highlights

  • COSI Controller Update: The COSI controller and sidecar have been updated to version v0.2.2, incorporating upstreamed patches.
  • Patch Removal: Two patches, 89-reconciliation.diff and 90-bucket-name.diff, have been removed as they are now included in the upstream release.
  • Dockerfile Modification: The Dockerfile has been updated to remove the git dependency, which was previously required for applying patches.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment Gemini (@gemini-code-assist) Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@lexfrei
Aleksei Sviridkin (lexfrei) marked this pull request as ready for review March 23, 2026 12:58
@dosubot dosubot Bot added the size/L This PR changes 100-499 lines, ignoring generated files label Mar 23, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the objectstorage-controller to version v0.2.2 and removes two patches that have been upstreamed. The changes are logical and correct. I've added one suggestion to the Dockerfile to improve maintainability by using a version tag instead of a commit hash.

FROM alpine AS source
ARG COMMIT_REF=c2f6e651eb58880627ccddafe0d84fb36e03a780
RUN apk add --no-cache curl tar git
ARG COMMIT_REF=f75d47509dae3e4ed0fd18ce0a60474b78e8d29b

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.

medium

For better readability and maintainability, it's preferable to use the version tag instead of the commit hash. This makes it clearer which version of the software is being used. The download URL on line 8 will work correctly with a tag.

ARG COMMIT_REF=v0.2.2

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion — applied in 50d6c29.

Replace commit hash with v0.2.2 tag for better readability.
GitHub archive URLs work with tags identically.

Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Mar 26, 2026
@sircthulhu
Kirill Ilin (sircthulhu) merged commit c29d501 into main Mar 26, 2026
9 checks passed
@sircthulhu
Kirill Ilin (sircthulhu) deleted the chore/objectstorage-drop-patches branch March 26, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size/L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants