Skip to content

Upgrade gopkg.in/yaml.v2 to go.yaml.in/yaml/v3#2023

Open
chimanjain wants to merge 4 commits into
operator-framework:masterfrom
chimanjain:deps/upgrade-yaml-v3
Open

Upgrade gopkg.in/yaml.v2 to go.yaml.in/yaml/v3#2023
chimanjain wants to merge 4 commits into
operator-framework:masterfrom
chimanjain:deps/upgrade-yaml-v3

Conversation

@chimanjain

@chimanjain chimanjain commented Jun 24, 2026

Copy link
Copy Markdown

Description of the change:

Upgraded gopkg.in/yaml.v2 to go.yaml.in/yaml/v3(YAML maintained repository).

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

Copilot AI review requested due to automatic review settings June 24, 2026 04:36
@openshift-ci openshift-ci Bot requested review from camilamacedo86 and pedjak June 24, 2026 04:36
@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Hi @chimanjain. Thanks for your PR.

I'm waiting for a operator-framework 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.

Details

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-sigs/prow repository.

@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 Jun 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the Operator Registry codebase to use gopkg.in/yaml.v3 instead of gopkg.in/yaml.v2, aligning YAML encoding/decoding usage with the newer major version across relevant packages.

Changes:

  • Switched Go imports from gopkg.in/yaml.v2 to gopkg.in/yaml.v3 in bundle, indexer, and sqlite test code.
  • Updated go.mod to require gopkg.in/yaml.v3 v3.0.1 directly (with gopkg.in/yaml.v2 remaining as an indirect dependency).
  • Minor test formatting adjustments for readability in pkg/sqlite/directory_test.go.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/sqlite/directory_test.go Updates YAML import to v3 and reformats a couple of composite literals in assertions.
pkg/lib/indexer/indexer.go Updates YAML import to v3 for indexer YAML interactions.
pkg/lib/bundle/utils_test.go Updates YAML import to v3 for test YAML marshaling.
pkg/lib/bundle/generate.go Updates YAML import to v3 for bundle annotation/dockerfile generation workflows.
pkg/lib/bundle/generate_test.go Updates YAML import to v3 for YAML-based tests.
pkg/lib/bundle/chartutil.go Updates YAML import to v3 for Helm chart metadata parsing.
go.mod Moves the direct dependency from gopkg.in/yaml.v2 to gopkg.in/yaml.v3.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@perdasilva

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2026
@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rashmigottipati
Once this PR has been reviewed and has the lgtm label, please ask for approval from perdasilva. For more information see the Code Review Process.

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

Details 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

@perdasilva perdasilva removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 24, 2026
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2026
@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@chimanjain

Copy link
Copy Markdown
Author

thanks @perdasilva and @rashmigottipati for reviewing the PR, I fixed the UT'S and set the indentation to 2 to match the behavior of yaml.v3 with yaml.v2. The UT's are passing in my local environment, please re-review.

@camilamacedo86

Copy link
Copy Markdown
Contributor

I would not move with it.
Both are deprecated and should no longer be used.
Same of for example: kubernetes-sigs/controller-tools#1440

@perdasilva @rashmigottipati

Copilot AI review requested due to automatic review settings June 24, 2026 18:24
@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 24, 2026
Signed-off-by: Chiman Jain <chimanjain15@gmail.com>
…tencies

Signed-off-by: Chiman Jain <chimanjain15@gmail.com>
Signed-off-by: Chiman Jain <chimanjain15@gmail.com>
@chimanjain chimanjain force-pushed the deps/upgrade-yaml-v3 branch from e679a16 to 52ecb0c Compare June 24, 2026 18:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread go.mod
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 24, 2026
Signed-off-by: Chiman Jain <chimanjain15@gmail.com>
Copilot AI review requested due to automatic review settings June 24, 2026 18:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread go.mod
@chimanjain chimanjain changed the title Upgrade gopkg.in/yaml from v2 to v3 Upgrade gopkg.in/yaml.v2 to go.yaml.in/yaml/v3 Jun 24, 2026
@chimanjain

Copy link
Copy Markdown
Author

Thanks @camilamacedo86 for the review. I've update the gomodule to go.yaml.in/yaml/v3 (YAML maintained repository). Please re-review.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants