Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Switch to Go 1.24 as a min version, bump CI, modernize sources#28

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
kolyshkin wants to merge5 commits intoopencontainers:main
base:main
Choose a base branch
Loading
fromkolyshkin:go124-min

Conversation

@kolyshkin
Copy link
Contributor

@kolyshkinkolyshkin commentedAug 14, 2025
edited
Loading

See individual commits for details. High level overview:

  • require go 1.24, add go 1.25 to CI, drop go 1.23
  • replaceomitempty withomitzero everywhere (mostly this is a no-op and done for consistency, but for some fields, like nested struct fields, it will result in more "omitting" behavior)
  • add some golangci-extra exceptions for names (and moved some more from code to config)
  • modernize code for Go 1.24

Similar runc PR:opencontainers/runc#4851

@kolyshkin
Copy link
ContributorAuthor

lint-extra warnings should be ignored

@kolyshkinkolyshkin added this to the0.1.0 milestoneAug 20, 2025
@kolyshkinkolyshkin marked this pull request as draftAugust 20, 2025 19:15
@kolyshkin
Copy link
ContributorAuthor

Draft until we release v0.0.5

@kolyshkin
Copy link
ContributorAuthor

Rebased.

@kolyshkinkolyshkin marked this pull request as ready for reviewSeptember 5, 2025 21:09
ThrottlingDataThrottlingData`json:"throttling_data,omitempty"`
PSI*PSIStats`json:"psi,omitempty"`
BurstDataBurstData`json:"burst_data,omitempty"`
CpuUsageCpuUsage`json:"cpu_usage,omitzero"`
Copy link
Member

Choose a reason for hiding this comment

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

Ah, this is technical debt. We have two options:

  • Make a breaking change by renaming it toCPUUsage.
  • Add a//nolint:revive directive to suppress the warning.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

The third option is to ignore linters-extra warnings as they are technically for new code and this is not new code. In the next commit or PR linters-extra won't flag this issue as it won't be "new".

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@lifubang I've added the nolint directives as requested. Now the main linter errors out.

Alas our linter setup is not ideal -- the whole point of lint-extra job is to use more rules for new code only. When we change something, it is treated as "new code" while in fact it is not. This is why I said "let's ignore these warnings".

Also, this is not technical debt, as future patches won't hit this warning (lint-extra only checks "new" code).

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I'm keeping the code as is for now, so you can take a look@lifubang

Copy link
Member

@cypharcypharOct 30, 2025
edited
Loading

Choose a reason for hiding this comment

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

I agree with keeping it as-is. The mess with lint-extra is unfortunate but such is the cost of working on "legacy" code. ;)

kolyshkin reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Ah! Ended up naming exception to golangi-extra config (hoping we won't add new IDs with the whitelisted names).

cyphar reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

...and moving existing exceptions to config file, too -- yay to less code clutter!

cyphar reacted with thumbs up emoji
Bump go to 1.24 in go.mod. Remove go 1.23 and add go 1.25 to CI.Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkinkolyshkinforce-pushed thego124-min branch 2 times, most recently frome67ac1f to324a463CompareOctober 31, 2025 00:31
For some fields (like nested struct fields), omitempty has no effectbut omitzero does. Let's use it.NOTE it might result in some compatibility issues since nowzero-only fields are not serialized.Since linter-extra thinks it's a new code, add some naming exceptions.Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkinkolyshkinforce-pushed thego124-min branch 2 times, most recently from9e042c0 to0764414CompareOctober 31, 2025 00:44
For some fields (like nested struct fields), omitempty has no effectbut omitzero does. Let's use it (everywhere -- for consistency).NOTE it might result in some compatibility issues since nowzero-only fields are not serialized.Since linter-extra thinks it's a new code, add some naming exceptions.Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This is technically a no-op, but let's change it for consistency.While at it, move linter-extra exceptions to golangci-extra.yml.Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Mostly done bymodernize -fix -test ./...with some minor manual edits on top.Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@cypharcypharcyphar approved these changes

@thaJeztahthaJeztahAwaiting requested review from thaJeztah

@mrunalpmrunalpAwaiting requested review from mrunalp

@AkihiroSudaAkihiroSudaAwaiting requested review from AkihiroSuda

@lifubanglifubangAwaiting requested review from lifubang

At least 2 approving reviews are required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

0.1.0

Development

Successfully merging this pull request may close these issues.

3 participants

@kolyshkin@lifubang@cyphar

[8]ページ先頭

©2009-2025 Movatter.jp