Skip to content

Conversation

@dcolina
Copy link
Member

@dcolina dcolina commented Dec 12, 2025

Summary

Fixes the repository extraction logic that was incorrectly removing too much from mirror registry paths.

Problem

The previous logic performed two extractions:

  1. mirror.gcr.io/dotcms/dotcmsdotcms/dotcms (remove registry)
  2. dotcms/dotcmsdotcms (remove one more level)

This caused validation failures because dotcms does not match the allowed repository dotcms/dotcms.

Solution

Changed to a single extraction that removes only the registry domain prefix, preserving the org/repo structure.

Test Results

  • mirror.gcr.io/dotcms/dotcmsdotcms/dotcms
  • docker.io/dotcms/dotcmsdotcms/dotcms
  • dotcms/dotcmsdotcms/dotcms

Impact

This fix enables proper validation of images from mirror registries like mirror.gcr.io.

Related

The previous logic was performing two extractions which resulted in
removing too much from the repository path. For mirror.gcr.io/dotcms/dotcms,
it was extracting 'dotcms' instead of 'dotcms/dotcms'.

Changed to single extraction that removes only the registry domain prefix,
preserving the org/repo structure.

Before: mirror.gcr.io/dotcms/dotcms → dotcms (❌ incorrect)
After: mirror.gcr.io/dotcms/dotcms → dotcms/dotcms (✅ correct)
@dcolina dcolina requested review from a team as code owners December 12, 2025 15:50
@dcolina dcolina merged commit eda022f into main Dec 12, 2025
3 checks passed
@dcolina dcolina deleted the fix/repository-extraction-mirror-registry branch December 12, 2025 15:50
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.

1 participant