-
Notifications
You must be signed in to change notification settings - Fork 29
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
chore(yaml): add go-yaml types package #1225
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll reapprove when conflicts are solved
test failed on schema validator 🤔 i confirmed it works fine on
so, the generated schema differs. i confirmed locally: 3c3
< "$id": "https://github.com/go-vela/server/compiler/types/yaml/build",
---
> "$id": "https://github.com/go-vela/server/compiler/types/yaml/yaml/build",
798,801c798,799
< "patternProperties": {
< ".*": {
< "$ref": "#/$defs/Stage"
< }
---
> "items": {
> "$ref": "#/$defs/Stage"
803,804c801
< "additionalProperties": false,
< "type": "object"
---
> "type": "array" probably due to missing struct methods like server/compiler/types/yaml/buildkite/stage.go Line 135 in 4590305
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
just wanted to point out that none of the json schema methods moved with yaml/buildkite except for
server/compiler/types/yaml/buildkite/stage.go
Line 135 in 0f94592
func (StageSlice) JSONSchemaExtend(schema *jsonschema.Schema) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
I am breaking up #1220 into more digestible PRs.
This PR simply adds the new
go-yaml
v3 library types package:compiler/types/yaml/yaml
. All unmarshaled buildkite YAML gets converted to that type since they are identical post-parsing.In other words, there is no functional change in this PR. But it sets the stage much better for future changes to make those PRs easier to understand.