Skip to content

Commit

Permalink
Merge pull request #397 from another-rex:fix-diff-ids
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 716023815
  • Loading branch information
copybara-github committed Jan 16, 2025
2 parents 3103516 + a52960d commit 6d1c6b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion artifact/image/layerscanning/image/layer.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func convertV1Layer(v1Layer v1.Layer, command string, isEmpty bool) (*Layer, err
}

return &Layer{
diffID: digest.FromString(diffID.String()),
diffID: digest.Digest(diffID.String()),
buildCommand: command,
isEmpty: isEmpty,
uncompressed: uncompressed,
Expand Down
3 changes: 1 addition & 2 deletions artifact/image/layerscanning/image/layer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ func TestConvertV1Layer(t *testing.T) {
command: "ADD file",
isEmpty: false,
wantLayer: &Layer{
// The diffID is the encoded string: digest.FromString("abc123").
diffID: "sha256:27f2fb5c8ba6b6d955cbc3cd78e89a898cac60a0442260129235683f4cc74e90",
diffID: "sha256:abc123",
buildCommand: "ADD file",
isEmpty: false,
uncompressed: reader,
Expand Down

0 comments on commit 6d1c6b6

Please sign in to comment.