Skip to content

Improper handling of trailing forward slash in registry.path for DWOC #1588

@btjd

Description

@btjd

Description

When specifying the registry path in the DWOC manifest, if a '/' is present at the end of the path, pushing a backup to the specified registry fails, as it adds an additional '/' to the path between the username and the target repository. This manifests in an error that says:
Please make sure the provided reference is in the form of /[:tag|@digest]

How To Reproduce

Steps to reproduce the behavior:

  1. Create a DWCO resource and specify the registry path with an ending '/', such as "quay.io//"
  2. Create a DW resource
  3. Force a backup by stopping the DW resource
  4. Inspect the logs of the backup pod, you should see the error: Please make sure the provided reference is in the form of /[:tag|@digest]

Expected behavior

The registry path should be handled correctly whether it is specified with, or without an ending '/'. If present, remove it, otherwise, leave it as is.

Additional context

N/A

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions