Skip to content

Conversation

@ellisvalentiner
Copy link
Contributor

When NewRepository fails to parse an image reference, log the actual reference string that failed validation. This makes it possible to identify which image reference is causing the "invalid reference format" error.

Previously, users would see:
Could not get tags from registry: invalid reference format

Now users will see:
Failed to create repository for image 'invalid@reference': invalid reference format

This provides the necessary context to debug configuration issues with malformed image references.

Fixes #1303

@codecov-commenter
Copy link

codecov-commenter commented Oct 27, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 70.34%. Comparing base (58d2b7e) to head (fae480c).

Files with missing lines Patch % Lines
registry-scanner/pkg/registry/registry.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1304      +/-   ##
==========================================
- Coverage   70.35%   70.34%   -0.02%     
==========================================
  Files          50       50              
  Lines        4460     4461       +1     
==========================================
  Hits         3138     3138              
- Misses       1129     1130       +1     
  Partials      193      193              

☔ 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.

…proj-labs#1303)

When NewRepository fails to parse an image reference, log the actual
reference string that failed validation. This makes it possible to
identify which image reference is causing the "invalid reference format"
error.

Previously, users would see:
  Could not get tags from registry: invalid reference format

Now users will see:
  Failed to create repository for image 'invalid@reference': invalid reference format

This provides the necessary context to debug configuration issues with
malformed image references.

Fixes argoproj-labs#1303

Signed-off-by: Ellis Valentiner <[email protected]>
@chengfang chengfang merged commit 70406ed into argoproj-labs:master Oct 28, 2025
10 checks passed
@chengfang
Copy link
Collaborator

Thanks for the fix. Can you also apply the same to master-annotation-based branch?

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.

Improve error message for invalid reference format

3 participants