blackbox_exporter icon indicating copy to clipboard operation
blackbox_exporter copied to clipboard

Use yaml.v3 to drop yaml.v2 direct dependency

Open mikelolasagasti opened this issue 1 year ago • 3 comments

Use yaml.v3 to drop yaml.v2 direct dependency.

see https://github.com/go-yaml/yaml#compatibility

mikelolasagasti avatar Aug 21 '24 12:08 mikelolasagasti

can you rebase, resolve conflicts, and add a meaningful PR description with "what?" and "why?" for this change.

electron0zero avatar Dec 31 '24 08:12 electron0zero

I would love to get this in and get the new features like comments, but looks like this is bit more involved then just updating the dependency.

There is a behaviour change, and I am afraid that might break people's config. If and when we do this, we will need to either verify that this is not breaking config for users, and if it's breaking, we will need to give advance notice.

also see:

  • https://github.com/prometheus/prometheus/pull/10786#issue-1255209958
  • https://github.com/go-yaml/yaml/issues/665#issuecomment-1145736596
  • https://github.com/prometheus/prometheus/pull/14886#issuecomment-2500513906

electron0zero avatar Jan 01 '25 11:01 electron0zero

The upstream of gopkg.in/yaml.v3 has been marked unmaintained. https://github.com/go-yaml/yaml/commit/944c86a7d29391925ed6ac33bee98a0516f1287a See more discussion at https://github.com/prometheus/prometheus/issues/16415,

Prometheus projects are moving from gopkg.in/yaml.v2 to go.yaml.in/yaml/v2. go.yaml.in/yaml/v2 is a drop-in replacement for gopkg.in/yaml.v2.

I will keep PR open, but it needs to be updated because we moved to go.yaml.in/yaml/* in https://github.com/prometheus/blackbox_exporter/pull/1470

electron0zero avatar Oct 31 '25 04:10 electron0zero