Skip to content

Commit b725b96

Browse files
committed
fix: remove signatures as they aren't generated in the code
Signed-off-by: Paul Bastide <[email protected]>
1 parent 4b14bd5 commit b725b96

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

internal/pkg/archive/archive.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,9 @@ func (o *MirrorArchive) addImagesDiff(ctx context.Context, collectedImages []v2a
144144
return nil, fmt.Errorf("unable to find blobs corresponding to %s: %w", img.Destination, err)
145145
}
146146

147-
// Handle signature errors - only return error if it's a fatal signature error
148-
if sigHandleErr := handleSignatureErrors(img, err); sigHandleErr != nil {
147+
if err := handleSignatureErrors(img, err); err != nil {
149148
var archiveErr *ArchiveError
150-
if errors.As(sigHandleErr, &archiveErr) && archiveErr.ReleaseErr != nil {
151-
// For release images, signature errors should not be fatal
152-
// Log the error but continue processing
153-
o.logger.Warn("signature error for release image %s: %v", img.Destination, archiveErr.ReleaseErr)
154-
} else if errors.As(sigHandleErr, &archiveErr) {
155-
// For other image types, return the error
149+
if errors.As(err, &archiveErr) && archiveErr.ReleaseErr != nil {
156150
return nil, archiveErr
157151
}
158152
}

internal/pkg/cli/release_integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func (suite *TestEnvironmentRelease) runMirror2Disk(t *testing.T) {
169169
err := os.MkdirAll(resultFolder, 0755)
170170
assert.NoError(t, err, "should not fail creating a temp folder for results")
171171

172-
ocmirror.SetArgs([]string{"-c", suite.tempFolder + "/isc.yaml", "--v2", "-p", "56001", "--src-tls-verify=false", "--dest-tls-verify=false", "file://" + resultFolder})
172+
ocmirror.SetArgs([]string{"-c", suite.tempFolder + "/isc.yaml", "--v2", "-p", "56001", "--src-tls-verify=false", "--dest-tls-verify=false", "--remove-signatures", "file://" + resultFolder})
173173
err = ocmirror.Execute()
174174
assert.NoError(t, err, "should not fail executing oc-mirror")
175175

0 commit comments

Comments
 (0)