Skip to content
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

refactor: replace github.com/ghodss/yaml with sigs.k8s.io/yaml #6935

Merged
merged 3 commits into from
Mar 10, 2023
Merged

refactor: replace github.com/ghodss/yaml with sigs.k8s.io/yaml #6935

merged 3 commits into from
Mar 10, 2023

Conversation

Juneezee
Copy link
Contributor

@Juneezee Juneezee commented Mar 5, 2023

The package github.com/ghodss/yaml is no longer actively maintained. See discussion in ghodss/yaml#75 and ghodss/yaml#80. sigs.k8s.io/yaml is a permanent fork of github.com/ghodss/yaml.

The notable change is that github.com/ghodss/yaml uses gopkg.in/yaml.v2 v2.2.2, but sigs.k8s.io/yaml uses gopkg.in/yaml.v2 v2.4.0. Changes can be seen here v2.2.2...v2.4.0, mostly bug fixes.

At the time of making this commit, the package `github.com/ghodss/yaml`
is no longer actively maintained.

`sigs.k8s.io/yaml` is a permanent fork of `ghodss/yaml` and is actively
maintained by Kubernetes SIG.

Signed-off-by: Eng Zer Jun <[email protected]>
@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 5, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 5, 2023

Hi @Juneezee. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot requested review from elfosardo and honza March 5, 2023 08:18
@r4f4
Copy link
Contributor

r4f4 commented Mar 6, 2023

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 6, 2023
In `sigs.k8s.io/yaml`, yaml.UnmarshalStrict enables
DisallowUnknownFields automatically.

Fixes: 666feef ("installconfig: Move fatal error to warn for strict marshal")
Signed-off-by: Eng Zer Jun <[email protected]>
@r4f4
Copy link
Contributor

r4f4 commented Mar 6, 2023

Is there some place left still using github.com/ghodss/yaml? I'd expect vendoring changes to remove that dep.

@Juneezee
Copy link
Contributor Author

Juneezee commented Mar 7, 2023

Is there some place left still using github.com/ghodss/yaml? I'd expect vendoring changes to remove that dep.

@r4f4 One of our dependency https://github.com/openshift/cluster-api-provider-libvirt is still using github.com/ghodss/yaml.

$ go mod why -m github.com/ghodss/yaml
# github.com/ghodss/yaml
github.com/openshift/installer/pkg/asset/cluster
github.com/openshift/cluster-api-provider-libvirt/pkg/apis/libvirtproviderconfig/v1beta1
github.com/ghodss/yaml

@r4f4
Copy link
Contributor

r4f4 commented Mar 7, 2023

Is there some place left still using github.com/ghodss/yaml? I'd expect vendoring changes to remove that dep.

@r4f4 One of our dependency https://github.com/openshift/cluster-api-provider-libvirt is still using github.com/ghodss/yaml.

$ go mod why -m github.com/ghodss/yaml
# github.com/ghodss/yaml
github.com/openshift/installer/pkg/asset/cluster
github.com/openshift/cluster-api-provider-libvirt/pkg/apis/libvirtproviderconfig/v1beta1
github.com/ghodss/yaml

So maybe we could use a replace directive to take care of that until cluster-api-provider-libvirt moves away from it?

replace github.com/ghodss/yaml => sigs.k8s.io/yaml

@Juneezee
Copy link
Contributor Author

Juneezee commented Mar 7, 2023

So maybe we could use a replace directive to take care of that until cluster-api-provider-libvirt moves away from it?

replace github.com/ghodss/yaml => sigs.k8s.io/yaml

@r4f4 Go doesn't seem to allow this

$ go mod tidy
go: sigs.k8s.io/[email protected] used for two different module paths (github.com/ghodss/yaml and sigs.k8s.io/yaml)

Is it okay if I go open a PR in https://github.com/openshift/cluster-api-provider-libvirt to replace github.com/ghodss/yaml with sigs.k8s.io/yaml?

@r4f4
Copy link
Contributor

r4f4 commented Mar 7, 2023

So maybe we could use a replace directive to take care of that until cluster-api-provider-libvirt moves away from it?

replace github.com/ghodss/yaml => sigs.k8s.io/yaml

@r4f4 Go doesn't seem to allow this

$ go mod tidy
go: sigs.k8s.io/[email protected] used for two different module paths (github.com/ghodss/yaml and sigs.k8s.io/yaml)

Oh I see.

Is it okay if I go open a PR in https://github.com/openshift/cluster-api-provider-libvirt to replace github.com/ghodss/yaml with sigs.k8s.io/yaml?

Yep, I think that's the proper way to solve this problem.

@Juneezee
Copy link
Contributor Author

Juneezee commented Mar 7, 2023

Marking this PR as draft until openshift/cluster-api-provider-libvirt#252 is merged.

@Juneezee Juneezee marked this pull request as draft March 7, 2023 12:26
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 7, 2023
@Juneezee Juneezee marked this pull request as ready for review March 8, 2023 16:36
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 8, 2023
@Juneezee Juneezee requested review from r4f4 and removed request for honza and elfosardo March 8, 2023 16:37
@openshift-ci openshift-ci bot requested review from dulek and elfosardo March 8, 2023 16:38
Copy link
Contributor

@r4f4 r4f4 left a comment

Choose a reason for hiding this comment

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

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 8, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: r4f4

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 8, 2023
Copy link
Contributor

@barbacbd barbacbd left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 9, 2023
@openshift-merge-robot openshift-merge-robot merged commit 6fde21d into openshift:master Mar 10, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 10, 2023

@Juneezee: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-libvirt 107b012 link false /test e2e-libvirt
ci/prow/okd-scos-e2e-aws-ovn 107b012 link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-azurestack 107b012 link false /test e2e-azurestack
ci/prow/e2e-gcp-ovn-shared-vpc 107b012 link false /test e2e-gcp-ovn-shared-vpc
ci/prow/e2e-aws-ovn-workers-rhel8 107b012 link false /test e2e-aws-ovn-workers-rhel8
ci/prow/okd-scos-e2e-aws-upgrade 107b012 link false /test okd-scos-e2e-aws-upgrade
ci/prow/okd-e2e-aws-ovn-upgrade 107b012 link false /test okd-e2e-aws-ovn-upgrade

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants