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 yaml archives for conformance #1206

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

theganyo
Copy link
Member

@theganyo theganyo commented Jun 26, 2023

Fixes #1203

  • Use Artifact id for conformance workers instead of stylesheet id
  • Simplify artifact patching behavior
  • Remove unnecessary structure test

@theganyo theganyo requested a review from timburks June 26, 2023 23:03
@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Merging #1206 (06653c8) into main (76ddac3) will decrease coverage by 0.06%.
The diff coverage is 68.18%.

@@            Coverage Diff             @@
##             main    #1206      +/-   ##
==========================================
- Coverage   71.96%   71.91%   -0.06%     
==========================================
  Files         146      146              
  Lines       12241    12208      -33     
==========================================
- Hits         8809     8779      -30     
+ Misses       2749     2747       -2     
+ Partials      683      682       -1     
Files Coverage Δ
...md/registry/cmd/compute/conformance/conformance.go 60.71% <40.00%> (-1.32%) ⬇️
cmd/registry/patch/artifact.go 64.88% <76.47%> (-4.35%) ⬇️

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

@@ -196,27 +169,6 @@ func applyArtifactPatch(ctx context.Context, client connection.RegistryClient, c
return nil
}

// populateIdAndKind inserts the "id" and "kind" fields in the supplied json bytes.
func populateIdAndKind(bytes []byte, kind, id string) ([]byte, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this will break API hub, which currently reads proto-serialized artifacts and expects them to contain "kind" and "id" fields. Since these fields are redundant in Registry YAML, I don't think we should be including them in YAML-serialized artifacts and I expect that API hub will adapt to that when it starts reading those YAML-serialized artifacts.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's unfortunate. So I need to add this back for protos?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, this PR isn't critical until we go all in on yaml...perhaps we should hold it until we correct API Hub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Inbox
Development

Successfully merging this pull request may close these issues.

Registry tool: ensure yaml archive storage works across all tests
2 participants