Repository navigation
config: replace deprecated reflect.Ptr references - #2356
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Replace pointer-kind checks across reflection paths butane/config/util/filter.go, butane/translate/*, config/config_test.go, config/doc/generate.go, config/merge/merge.go, config/translate/translate.go, config/util/reflection.go, internal/exec/stages/fetch_offline/fetch-offline.go, docs/release-notes.d/reflect-pointer.change.md |
Reflection kind checks use reflect.Pointer in config validation, translation, merging, path traversal, and offline inspection. Existing pointer handling is unchanged. The release note directs users to replace deprecated reflect.Ptr references. |
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Refactor
Possibly related issues
- coreos/ignition#2353: This PR adds a release-note fragment using the workflow described by the issue.
Possibly related PRs
- coreos/ignition#2346: This PR replaces the deprecated
reflect.Ptruses reported by thego fixpipeline. - coreos/ignition#2352: This PR adds a release-note fragment under the directory required by this PR.
- coreos/ignition#2347: This PR adds a release-note fragment using the per-PR format introduced there.
Suggested reviewers: prestist, angelcerveraroldan
Merge Risk: 
Minimal · up to dfa03
-
The change is a behavior-preserving replacement compatible with the repository's supported Go versions.
Pre-merge checks: 
5 · 
1
-
Failed checks: 1 warning Passed checks: 5 passed-
Full details: Title check
-
Explanation
The title follows the required format. It uses the subsystem prefix "config:", a lowercase imperative description, and no trailing period. It accurately summarizes the replacement of deprecated
reflect.Ptrreferences.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 54.55% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 11 functions across 9 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Binary size report (
|
| Size | |
|---|---|
Base (main) |
33MiB |
| PR (#2356) | 33MiB |
| Delta | +0B (0.00%) |
prestist
left a comment
There was a problem hiding this comment.
Locally reviewed: converted all non-vendor reflect.Ptr uses, go.mod targets 1.25 so reflect.Pointer is available, release-note fragment follows docs/release-notes.d convention. No behavior change. LGTM.
reflect.Ptrhas been deprecated since Golang 1.18, withreflect.Pointertaking its place. Ignition tests for Golang versions 1.25 and 1.26, so the codebase should target the newerPointerdeclaration.These were recommended by the
go fixpipeline output for version 1.26, with a link to one example below. There are a large number of these, so I will not link every reference the way I have in other PRs.Link to most recent Go version 1.26.x CI job on main with
reflect.PtrflagReferences: