Skip to content

fix: address code review comments #3942

Merged
andaaron merged 3 commits intoproject-zot:mainfrom
andaaron:fix10
Apr 7, 2026
Merged

fix: address code review comments #3942
andaaron merged 3 commits intoproject-zot:mainfrom
andaaron:fix10

Conversation

@andaaron
Copy link
Copy Markdown
Contributor

@andaaron andaaron commented Apr 6, 2026

From #3885 (review)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses follow-up review feedback from the multi-tag digest push work by improving error observability and making controller port selection safer and less racy in tests.

Changes:

  • Add an error log when snapshotting prior tag state from MetaDB fails during multi-tag digest pushes.
  • Make Controller.chosenPort atomic and update reads/writes accordingly.
  • Reduce test flakiness by replacing fixed sleeps with StartAndWait / port-wait logic and modernizing a small constants test assertion.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
pkg/meta/hooks.go Adds explicit error logging when prior tag state snapshotting fails for multi-tag digest pushes.
pkg/api/controller.go Stores the chosen port in atomic.Int32 to avoid races between Run() and concurrent GetPort() readers.
pkg/api/controller_test.go Replaces some Sleep() calls with readiness waits; adds helper to wait for kernel-chosen port population; updates auto-port log assertion flow.
pkg/api/constants/consts_test.go Switches to testify/assert for a clearer equality assertion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

❌ Patch coverage is 90.32258% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.53%. Comparing base (78c6e91) to head (8d075cd).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/api/controller.go 57.14% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3942   +/-   ##
=======================================
  Coverage   91.53%   91.53%           
=======================================
  Files         195      195           
  Lines       27911    27922   +11     
=======================================
+ Hits        25547    25558   +11     
  Misses       1530     1530           
  Partials      834      834           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

rchincha
rchincha previously approved these changes Apr 7, 2026
…le poll loop

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@andaaron andaaron merged commit c6289ec into project-zot:main Apr 7, 2026
48 of 49 checks passed
@andaaron andaaron deleted the fix10 branch April 7, 2026 21: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.

3 participants