helmfile/pkg/app
Yusuke Kuoka 6664f01596
Use goccy/go-yaml for v1 / Prep bringing back go-yaml v2 for v0.x (#604)
This is a successor to #596. We need a smooth migration path from `gopkg.in/yaml.v2`, and this pull request moves it forward with `goccy/go-yaml` instead of `gopkg.in/yaml.v3`. Merging this unblocks users stuck in Helmfile v0.146.x or earlier due to #435, so that they can upgrade to 0.147.x or greater without updating their helmfile configs.

We previously tried to upgrade to `yaml.v3` (https://github.com/helmfile/helmfile/issues/394) in Helmfile v0.x, presuming it won't break anything. Apparently, it broke use-cases where you want to layer release's `values` field over three or more release templates and releases (#435).

We then tried to bring back `yaml.v2` for Helmfile v0.x and keep `yaml.v3` for the upcoming Helmfile v1. However, it failed due to incompatibility in the Unmarshaller interface between `yaml.v2` and `yaml.v3` (https://github.com/helmfile/helmfile/pull/596).

`goccy/go-yaml` is, from my observation, a well-maintained alternative to `yaml.v2`. One of its premises is that it enables us to swap the implementation from `gopkg.in/yaml.v2` to `goccy/go-yaml` just by replacing the import directive. It seems to use the same `Unmarshaller` interface as yaml.v2 too.

Once this PR gets merged, I'd like to follow-up with adding a new build-time variable and an envvar to set the proper default for the yaml parser Helmfile uses and the ability to switch the parser at runtime. All in all, the next Helmfile release, v0.150.0 will get reverted to use `gopkg.in/yaml.v2` by default which resolves #435.

New users who started using Helmfile since any of v0.148.0, v0.148.1, and v0.149.0 might be already relying on the new behavior, They might need to specify a new envvar to enable `goccy/go-yaml`.

Signed-off-by: yxxhero <aiopsclub@163.com>
Signed-off-by: yxxhero <aiopsclub@163.com>
Co-authored-by: yxxhero <aiopsclub@163.com>
2022-12-27 10:14:35 +09:00
..
testdata Fix preapply hooks are not called on no diff when run apply subcommand (#522) 2022-12-10 12:07:26 +09:00
version feat: optimize version output (#412) 2022-10-08 14:26:15 +09:00
app.go fix(#507): support assign --post-renderer within helmfile flags and helmdefault or release config 2022-12-13 13:12:07 +08:00
app_apply_hooks_test.go Use log capturing helper in TestApply_hooks 2022-11-13 08:20:13 +00:00
app_apply_nokubectx_test.go Use log capturing helper in TestApply_hooks 2022-11-13 08:20:13 +00:00
app_apply_test.go Use the new log capturing helper in all tests 2022-11-13 08:53:53 +00:00
app_diff_test.go Use the new log capturing helper in all tests 2022-11-13 08:53:53 +00:00
app_lint_test.go Use the new log capturing helper in all tests 2022-11-13 08:53:53 +00:00
app_list_test.go Use goccy/go-yaml for v1 / Prep bringing back go-yaml v2 for v0.x (#604) 2022-12-27 10:14:35 +09:00
app_sync_test.go Use the new log capturing helper in all tests 2022-11-13 08:53:53 +00:00
app_template_test.go Use goccy/go-yaml for v1 / Prep bringing back go-yaml v2 for v0.x (#604) 2022-12-27 10:14:35 +09:00
app_test.go Use goccy/go-yaml for v1 / Prep bringing back go-yaml v2 for v0.x (#604) 2022-12-27 10:14:35 +09:00
ask.go feat: helmfile as a go library (#639) 2019-06-04 09:12:00 +09:00
config.go fix(#507): support assign --post-renderer within helmfile flags and helmdefault or release config 2022-12-13 13:12:07 +08:00
constants.go Introduce DISABLE_INSECURE_FEATURES to disable insecure command executions (#1) 2022-06-05 15:15:06 +09:00
constants_test.go fix lint error 2022-08-13 07:40:32 +08:00
context.go Rename module to github.com/helmfile/helmfile 2022-05-18 10:05:07 -04:00
desired_state_file_loader.go Re: Strict helmfile.yaml file ext when rendered as template (#599) 2022-12-23 08:28:49 +08:00
destroy_nokubectx_test.go Use the new log capturing helper in all tests 2022-11-13 08:53:53 +00:00
destroy_test.go Use the new log capturing helper in all tests 2022-11-13 08:53:53 +00:00
diff_nokubectx_test.go Use the new log capturing helper in all tests 2022-11-13 08:53:53 +00:00
diff_test.go Use the new log capturing helper in all tests 2022-11-13 08:53:53 +00:00
errors.go feat: Opt-out dep-builds and repo-updates (#463) 2019-02-04 12:07:25 +09:00
errors_test.go add unittest for error.go in pkg/app 2022-04-28 09:01:02 +08:00
formatters.go Correct enabled property in helmfile list (#1921) 2022-01-10 17:24:07 +09:00
formatters_test.go add Go lint 2022-07-16 20:21:11 +08:00
init.go bump helm to v3.10.3 (#579) 2022-12-15 09:00:22 +08:00
init_test.go optimize lint logic (#586) 2022-12-18 08:39:45 +08:00
load_opts.go Use goccy/go-yaml for v1 / Prep bringing back go-yaml v2 for v0.x (#604) 2022-12-27 10:14:35 +09:00
load_opts_test.go add Go lint 2022-07-16 20:21:11 +08:00
mocks_test.go Avoid --skip-refresh on local charts (#541) 2022-12-13 13:12:07 +08:00
run.go fix: helmfile template fails when selector matches a chart fetched with go-getter 2022-11-13 15:10:57 +08:00
snapshot_test.go Use log capturing helper in TestApply_hooks 2022-11-13 08:20:13 +00:00
two_pass_renderer.go Introduce Helmfile's own filesystem abstraction to correctly unit test some components (#307) 2022-08-24 12:58:43 +09:00
two_pass_renderer_test.go Use goccy/go-yaml for v1 / Prep bringing back go-yaml v2 for v0.x (#604) 2022-12-27 10:14:35 +09:00
validate_config.go add Go lint 2022-07-16 20:21:11 +08:00
validate_config_test.go add unittest for ValidateConfig 2022-04-27 07:38:22 +08:00