Skip to content

Conversation

@kmendell
Copy link
Member

@kmendell kmendell commented Oct 5, 2025

Summary by CodeRabbit

  • Breaking Changes

    • Removed API endpoints for image version listing and comparison (previously GET /versions and POST /compare).
    • Updated image update summary response: TagUpdates field is no longer returned.
  • Refactor

    • Streamlined image update logic to focus on digest-based processing for improved consistency and reliability.
  • Chores

    • Added comprehensive unit tests for image reference parsing and normalization to ensure consistent behavior across registries and formats.

@kmendell kmendell requested a review from a team as a code owner October 5, 2025 05:59
@kmendell
Copy link
Member Author

kmendell commented Oct 5, 2025

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 5, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 5, 2025

📝 Walkthrough

Walkthrough

Removed version listing and comparison endpoints and related DTOs. Refactored image update service to a digest-centric flow, dropped version scope logic, and adopted a Docker reference parser. Adjusted GetUpdateSummary output. Added unit tests for parsing, normalization, and digest handling.

Changes

Cohort / File(s) Summary
API Handlers
backend/internal/api/image_update_handler.go
Removed routes and handlers for GET /versions and POST /compare; dropped strconv import; retained GetUpdateSummary handler unchanged.
DTOs
backend/internal/dto/image_update_dto.go
Removed TagUpdates from ImageUpdateSummaryResponse; deleted ImageVersionsResponse, VersionComparisonResponse, and CompareVersionRequest structs.
Services
backend/internal/services/image_update_service.go
Deleted VersionInfo type, UpdateScope* constants, getUpdateScope, GetAvailableVersions, CompareVersions; modified GetUpdateSummary to omit TagUpdates; adopted external Docker reference parsing; updated internal signatures to a digest-focused flow.
Tests
backend/internal/services/image_update_service_test.go
Added tests for parseImageReference, normalization, digest extraction helpers, and compatibility with docker/distribution/reference parsing.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 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 primary change of removing tag-based update logic in favor of digest-only processing and clearly reflects the main purpose of the diff in a concise sentence.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/image-digest-ref

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
Contributor

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e7bee4 and 7c413ab.

📒 Files selected for processing (4)
  • backend/internal/api/image_update_handler.go (0 hunks)
  • backend/internal/dto/image_update_dto.go (0 hunks)
  • backend/internal/services/image_update_service.go (7 hunks)
  • backend/internal/services/image_update_service_test.go (1 hunks)
💤 Files with no reviewable changes (2)
  • backend/internal/api/image_update_handler.go
  • backend/internal/dto/image_update_dto.go
⏰ 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). (3)
  • GitHub Check: build
  • GitHub Check: test
  • GitHub Check: Analyze (go)

@kmendell kmendell merged commit 8f76e1c into main Oct 5, 2025
8 checks passed
@kmendell kmendell deleted the fix/image-digest-ref branch October 5, 2025 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants