Skip to content

chore: migrate from unmaintained gopkg.in/yaml.v3 to go.yaml.in/yaml/v4 - #1922

Merged
TerryHowe merged 1 commit into
oras-project:mainfrom
bupd:yamlv3-mig
Dec 17, 2025
Merged

TerryHowe merged 1 commit into
oras-project:mainfrom
bupd:yamlv3-mig

Conversation

@bupd

@bupd bupd commented Dec 6, 2025

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Summary

This PR replaces all imports of the unmaintained gopkg.in/yaml.v3 package with the officially maintained go.yaml.in/yaml/v4 module.

Why

  • gopkg.in/yaml.v3 is no longer maintained and receives no security updates.
  • The YAML organization now maintains the go.yaml.in/yaml/v4 module.
  • It is a drop-in compatible replacement and actively maintained by the official yaml org.

Changes Made

  • Updated all imports from:

    gopkg.in/yaml.v3

    to

    go.yaml.in/yaml/v4
  • migrate on both cli and e2e tests

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1920

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test? No, it only changes the imports
  • Does this change require a documentation update? NO
  • Does this introduce breaking changes that would require an announcement or bumping the major version? NO
  • Do all new files have an appropriate license header? NO new files

@codecov

codecov Bot commented Dec 6, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.33%. Comparing base (e456403) to head (6f3a856).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1922      +/-   ##
==========================================
+ Coverage   87.26%   87.33%   +0.07%     
==========================================
  Files         143      143              
  Lines        5535     5535              
==========================================
+ Hits         4830     4834       +4     
+ Misses        419      415       -4     
  Partials      286      286              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TerryHowe TerryHowe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

- migrate from unmaintained to pkg maintained by yaml org
- migrate on both cli and e2e tests

Signed-off-by: bupd <[email protected]>
@bupd

bupd commented Dec 17, 2025

Copy link
Copy Markdown
Contributor Author

fixed conflicts, ready to merge.

@TerryHowe TerryHowe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@TerryHowe
TerryHowe merged commit e12fb79 into oras-project:main Dec 17, 2025
@TerryHowe

Copy link
Copy Markdown
Member

Thanks!

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.

Migrate from deprecated gopkg.in/yaml.v3 to go.yaml.in/yaml/v3 maintained package

2 participants