Skip to content

fix yaml archives for conformance#1206

Open
theganyo wants to merge 11 commits intoapigee:mainfrom
theganyo:theganyo/issue1203
Open

fix yaml archives for conformance#1206
theganyo wants to merge 11 commits intoapigee:mainfrom
theganyo:theganyo/issue1203

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

}

// 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