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

fix: missing Oci-Subject header pushing index with subject #1586

Closed
wants to merge 1 commit into from

Conversation

jdolitsky
Copy link
Contributor

Also, run OCI conformance tests from HEAD (vs. 1.0.0)

What type of PR is this?

Which issue does this PR fix:

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rchincha
Copy link
Contributor

rchincha commented Jul 5, 2023

@jdolitsky some sanity checks in CI

"fix: missing OCI-Subject header ..."

Also pls sign your commit.

Run gsactions/commit-message-checker@v2
Checking commit messages against "^((build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(.+\))?(!)?(: (.*\s*)*))"...
- failed: "Fix missing Oci-Subject header when pushing index with subject

Also, run OCI conformance tests from HEAD (vs. 1.0.0)

Signed-off-by: Josh Dolitsky <[email protected]>"
Error: Error: Your first line has to the Conventional Commits specification.

@rchincha rchincha requested a review from laurentiuNiculae July 5, 2023 19:20
@jdolitsky jdolitsky changed the title Fix missing Oci-Subject header when pushing index with subject fix: missing Oci-Subject header pushing index with subject Jul 5, 2023
@jdolitsky
Copy link
Contributor Author

related: opencontainers/distribution-spec#436

@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Merging #1586 (9c105ee) into main (41b05c6) will decrease coverage by 0.03%.
The diff coverage is 59.09%.

@@            Coverage Diff             @@
##             main    #1586      +/-   ##
==========================================
- Coverage   91.29%   91.26%   -0.03%     
==========================================
  Files         117      117              
  Lines       24293    24315      +22     
==========================================
+ Hits        22179    22192      +13     
- Misses       1576     1582       +6     
- Partials      538      541       +3     
Impacted Files Coverage Δ
pkg/storage/s3/s3.go 82.33% <45.45%> (-0.35%) ⬇️
pkg/storage/local/local.go 81.76% <72.72%> (-0.07%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@andaaron andaaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge this as-is or wait on opencontainers/distribution-spec#436 to be merged first and change the branch?

@jdolitsky
Copy link
Contributor Author

Unfortunately opencontainers/distribution-spec#436 will not pass CI/CD until there is a new zot release available (zot container image). My vote would be to get this change into an RC, then we update the OCI PR to point to new image cc @sudo-bmitch

@jdolitsky
Copy link
Contributor Author

I can also drop the changes here related to conformance and you all can add them back later. Just wanted a way to test this change

Also, run OCI conformance tests from HEAD (vs. 1.0.0)

Signed-off-by: Josh Dolitsky <[email protected]>
@jdolitsky
Copy link
Contributor Author

I can also drop the changes here related to conformance and you all can add them back later. Just wanted a way to test this change

I did this in #1589 just in case


err := json.Unmarshal(body, &index)
if err != nil {
return "", "", err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this line cannot be covered by tests because the blob is already unmarshalled/validated at line 374.


err := json.Unmarshal(body, &index)
if err != nil {
return "", "", err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this line cannot be covered by tests because the blob is already unmarshalled/validated at line 463

}

if index.Subject != nil {
subjectDigest = index.Subject.Digest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm working on a test to cover this.

@jdolitsky
Copy link
Contributor Author

@andaaron - feel free to push over my changes here

@andaaron
Copy link
Contributor

andaaron commented Jul 6, 2023

I updated https://github.com/project-zot/zot/pull/1589/files. This PR would conflict with #1559 on enabling the conformance code.

@jdolitsky
Copy link
Contributor Author

@andaaron - feel free to close this PR in favor of #1589

@andaaron
Copy link
Contributor

andaaron commented Jul 6, 2023

Closed in favor of #1589

@andaaron andaaron closed this Jul 6, 2023
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.

3 participants