Skip to content

Run go fix as part of the test workflow - #406

Merged
matheuscscp merged 2 commits into
fluxcd:mainfrom
haramj:ci/run-go-fix-in-tests
Nov 14, 2026
Merged

matheuscscp merged 2 commits into
fluxcd:mainfrom
haramj:ci/run-go-fix-in-tests

Conversation

@haramj

@haramj haramj commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Part of fluxcd/flux2#6120 (source-watcher).

Run go fix ./... in both Go modules as part of make test, before the existing CI dirty-tree check. Include the generated source changes and the resulting go mod tidy update.

In renderArtifactRequest, set the rendered name and namespace on the local OutputArtifact copy before embedding it. Otherwise Go 1.27.0's fix pass combines those assignments into a literal that specifies both the embedded value and its promoted fields, which does not compile.

Validation on macOS arm64 with Go 1.27.0:

  • make tidy fmt vet test manager.
  • API module: go test ./....
  • Re-running generation and go fix leaves the committed tree unchanged.

The Docker/Kind deployment steps are left to CI; the local Docker daemon is not running.

AI assistance: Codex/GPT-6.

haramj and others added 2 commits November 14, 2026 15:16
Run go fix in the root and API modules before tests so the CI dirty
check also enforces source modernization. Apply the resulting fixes.

Set rendered artifact names on the local OutputArtifact copy before
embedding it to avoid conflicting promoted-field initializers.

Signed-off-by: haramjeong <04harams77@gmail.com>
Assisted-by: Codex/GPT-6
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
@matheuscscp
matheuscscp force-pushed the ci/run-go-fix-in-tests branch from 19ae118 to 5dfc8f6 Compare November 14, 2026 15:17
@matheuscscp matheuscscp added the area/ci CI related issues and pull requests label Nov 14, 2026

@matheuscscp matheuscscp 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! 🚀

@matheuscscp
matheuscscp merged commit 1c6383b into fluxcd:main Nov 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci CI related issues and pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants