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

update(renovate): add Go constraint #6476

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

flc1125
Copy link
Member

@flc1125 flc1125 commented Dec 15, 2024

This ensures that updates to versions that are not supported by 1.22 are avoided. Until you change this configuration item.

https://docs.renovatebot.com/language-constraints-and-upgrading/

In addition, I think it can skip CHANGELOG.

@flc1125 flc1125 requested a review from a team as a code owner December 15, 2024 05:18
Copy link

codecov bot commented Dec 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.3%. Comparing base (26e5d90) to head (7de2e1a).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #6476     +/-   ##
=======================================
- Coverage   68.3%   68.3%   -0.1%     
=======================================
  Files        200     200             
  Lines      16682   16682             
=======================================
- Hits       11410   11404      -6     
- Misses      4929    4933      +4     
- Partials     343     345      +2     

see 1 file with indirect coverage changes

Copy link
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

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

Nice idea. Have you tested if it would also work for dependencies having Go version < 1.22 and 1.22.x in their go.mod files?

@flc1125
Copy link
Member Author

flc1125 commented Dec 15, 2024

I have tested that after setting this, the packages that cause the version upgrade of this go version no longer have PRs created. Even if created, they will fail during CI.

@pellared
Copy link
Member

I have tested that after setting this, the packages that cause the version upgrade of this go version no longer have PRs created. Even if created, they will fail during CI.

Sure but what about other packages. Are we not going to miss any other updates?

@flc1125
Copy link
Member Author

flc1125 commented Dec 15, 2024

Sure but what about other packages. Are we not going to miss any other updates?

I can test it. At that time, I will be providing test results.

@flc1125
Copy link
Member Author

flc1125 commented Dec 15, 2024

Nice idea. Have you tested if it would also work for dependencies having Go version < 1.22 and 1.22.x in their go.mod files?

I want to confirm what I want to test:

Test the other dependent packages that come from the current package. If go<1.22 or 1.22.x exists, does it support it?

@dmathieu
Copy link
Member

Nice idea!
Could we document upgrading this in the release doc, for releases that drop a Go version?

@pellared
Copy link
Member

Nice idea. Have you tested if it would also work for dependencies having Go version < 1.22 and 1.22.x in their go.mod files?

I want to confirm what I want to test:

Test the other dependent packages that come from the current package. If go<1.22 or 1.22.x exists, does it support it?

Examples of such dependencies are:

  • 1.22.x : github.com/grpc-ecosystem/grpc-gateway/v2
  • < 1.22: github.com/cenkalti/backoff/v4

You can downgrade their versions and check if renovate would bump both of them.

@flc1125
Copy link
Member Author

flc1125 commented Dec 16, 2024

Nice idea! Could we document upgrading this in the release doc, for releases that drop a Go version?

They might not be exactly the same. This configuration tends to rely on the current version relationship of go.mod, it restricts the upgrade of dependent packages in the current repository, and ensures that it must conform to the version configuration of the current go.mod. Otherwise, it will report an error in CI.

Here is an example I am currently using: go-kratos-ecosystem/components#444

I'm not sure if this meets the effect you want. @pellared


Additionally, I found that many of the otel package versions are inconsistent, some are 1.22.0 and some are 1.22.7. Therefore, it caused my dependency upgrade to fail.

Is it allowed to exist like this?

@dmathieu dmathieu added the Skip Changelog Allow PR to succeed without requiring an addition to the CHANGELOG label Dec 16, 2024
@dmathieu
Copy link
Member

Yes, but when we drop support for Go 1.22, we need to upgrade this constraint to 1.23. That's what we should document.

@flc1125
Copy link
Member Author

flc1125 commented Dec 16, 2024

Yes, but when we drop support for Go 1.22, we need to upgrade this constraint to 1.23. That's what we should document.

Yes, that is very correct.

@pellared
Copy link
Member

pellared commented Dec 16, 2024

Additionally, I found that many of the otel package versions are inconsistent, some are 1.22.0 and some are 1.22.7. Therefore, it caused my dependency upgrade to fail.

Is it allowed to exist like this?

Yes. In general, we are supporting the latest versions of the two newest minor versions of Go. Meaning latest the 1.22 and the latest 1.23. Related issue:

@flc1125
Copy link
Member Author

flc1125 commented Dec 20, 2024

Under investigation: renovatebot/renovate#33222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog Allow PR to succeed without requiring an addition to the CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants