Skip to content

Conversation

@mikelolasagasti
Copy link

@mikelolasagasti mikelolasagasti commented Aug 21, 2024

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

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

@github-actions github-actions bot added the stale label Dec 30, 2024
@electron0zero
Copy link
Member

electron0zero commented Dec 31, 2024

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

@github-actions github-actions bot removed the stale label Dec 31, 2024
This update replaces `yaml.v2` with `yaml.v3`. While the change does not
directly impact blackbox_exporter functionality, `yaml.v3` provides
improved features, better YAML 1.2 compliance, and security
enhancements. Upgrading ensures the project stays aligned with best
practices and benefits from the latest module improvements.

Signed-off-by: Mikel Olasagasti Uranga <[email protected]>
"github.com/prometheus/common/expfmt"
"github.com/prometheus/common/promslog"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see @SuperQ's comment about blockers around upgrading to v3. go-yaml/yaml#665 (comment)

so I will hold and wait for @SuperQ's review on this before we merge this.

@electron0zero
Copy link
Member

electron0zero commented Jan 1, 2025

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:

@github-actions github-actions bot added the stale label Apr 14, 2025
@electron0zero electron0zero added the not-as-easy-as-it-looks This is little more involved and is not as easy as it looks on surface. label Aug 1, 2025
@github-actions github-actions bot removed the stale label Aug 1, 2025
@electron0zero
Copy link
Member

electron0zero commented Oct 31, 2025

The upstream of gopkg.in/yaml.v3 has been marked unmaintained. go-yaml/yaml@944c86a See more discussion at prometheus/prometheus#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 #1470

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-as-easy-as-it-looks This is little more involved and is not as easy as it looks on surface.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants