Skip to content

Prepare for bringing back go-yaml v2 to Helmfile v0.x#596

Closed
mumoshu wants to merge 2 commits into
mainfrom
prepare-yaml-v2-mode
Closed

Prepare for bringing back go-yaml v2 to Helmfile v0.x#596
mumoshu wants to merge 2 commits into
mainfrom
prepare-yaml-v2-mode

Conversation

@mumoshu

@mumoshu mumoshu commented Dec 22, 2022

Copy link
Copy Markdown
Contributor

This is a preparation or an initial step towards bringing back go-yaml v2 for Helmfile v0.x to retain pre-v0.147.0 behavior while keeping the go-yaml v3 behavior for the upcoming Helmfile v1.x.

Merging this pull request doesn't immediately make Helmfile use go-yaml v2. Merging this doesn't break anything.

Ref #435

@mumoshu mumoshu changed the title Prepare for bringing back go-yaml v2 for Helmfile v0.x Prepare for bringing back go-yaml v2 to Helmfile v0.x Dec 22, 2022
@mumoshu mumoshu force-pushed the prepare-yaml-v2-mode branch 2 times, most recently from 70576f0 to 950e442 Compare December 22, 2022 21:47
@mumoshu mumoshu force-pushed the prepare-yaml-v2-mode branch from 950e442 to e07342b Compare December 23, 2022 01:32
@yxxhero

yxxhero commented Dec 23, 2022

Copy link
Copy Markdown
Member

@mumoshu

func (hf *SubHelmfileSpec) UnmarshalYAML(value *yaml.Node) error 

we should handle the UnmarshalYAML.

@mumoshu

mumoshu commented Dec 23, 2022

Copy link
Copy Markdown
Contributor Author

@yxxhero I realized this approach is going to be a dead-end... go-yaml v3 changed their Unmarhsaller interface and we can't implement the UnmarshalYAML function that supports v2 and b3 at the same time. (Related: #587)

If the motivation behind migrating to go-yaml v3 was to keep building on something that is well maintained, can we instead migrate to https://github.com/goccy/go-yaml? It's Unmarshaller interface is compatible with go-yaml v2 and is well maintained.

@yxxhero

yxxhero commented Dec 23, 2022

Copy link
Copy Markdown
Member

@mumoshu it's valuable to try.

@yxxhero

yxxhero commented Dec 23, 2022

Copy link
Copy Markdown
Member

@mumoshu In my opinion. yaml v2 and yaml v3 is different project.

@mumoshu

mumoshu commented Dec 25, 2022

Copy link
Copy Markdown
Contributor Author

@yxxhero Thanks for your feedback! I'm closing this in favor of #604

@mumoshu mumoshu closed this Dec 25, 2022
@mumoshu mumoshu deleted the prepare-yaml-v2-mode branch December 25, 2022 22:09
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants