Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjustment to breaking docker manifest change #8430

Merged
merged 6 commits into from
Jun 19, 2024
Merged

Conversation

scbedd
Copy link
Member

@scbedd scbedd commented Jun 12, 2024

Follow-up to #8325

We added a test case, but it turns out there is another value that also indicates a manifest. header: application/vnd.oci.image.index.v1 indicates a body containing multiple manifests. All of this needs to be stored exactly as what comes, so pretty json printing is right out.

Continuing to dig via investigation using go sdk/containers/azcontainerregistry/client_test.go::TestClient_UploadManifest (which is where this new case showed up)

The "discovered" issue was that during matching of a request, we actually normalize the JSON if it's a json content type. That obviously breaks the manifest matching, as the digest only works if the request or response body bytes are exactly the same. This PR extends the "treat this as nontext" to this normalization logic as well.

@scbedd scbedd self-assigned this Jun 12, 2024
@scbedd scbedd marked this pull request as ready for review June 18, 2024 20:38
@scbedd scbedd requested review from mikeharder and benbp as code owners June 18, 2024 20:38
@scbedd
Copy link
Member Author

scbedd commented Jun 19, 2024

/check-enforcer override

I don't know how I cancelled that job but I did.

@scbedd scbedd merged commit bd02d74 into main Jun 19, 2024
17 of 20 checks passed
@scbedd scbedd deleted the feature/add-manifest-v1 branch June 19, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants