acoustic-carpenter-78188
02/18/2026, 2:53 AMmake generate was updating files such as go.sum, go.mod, swagger.json, and lockfiles even when no protobuf definitions or generation inputs changed. This resulted in unnecessary CI diffs, noisy PRs, and confusion about what actually changed. These updates ensure generation only modifies files when inputs change and that the process is deterministic and idempotent.
What changes were proposed in this pull request?
• Gate go mod tidy behind RUN_GO_TIDY
(boilerplate/flyte/golang_test_targets/go-gen.sh)
go mod tidy is no longer run by default in the shared generate script.
It runs only when explicitly enabled (e.g. RUN_GO_TIDY=1 make generate).
Prevents incidental go.mod / go.sum churn. Tidy remains available via make go-tidy or the env var.
• Add idempotency check in CI
(.github/workflows/go_generate.yml)
After DELTA_CHECK=true make generate, CI runs make generate again and fails if the working tree is dirty.
Ensures deterministic generation and catches nondeterministic tools or environment differences.
• Content-aware swagger copy
(flyteidl/clients/go/assets/embed.go)
The swagger file is copied only if content differs (cmp -s ... || cp ...).
Prevents no-op diffs and timestamp-only changes.
• Pin buf image
(flyteidl/generate_protos.sh)
Updated from implicit latest to bufbuild/buf:v1.65.0 for reproducible proto generation.
• Add path filters to generate CI
(.github/workflows/checks.yml, .github/workflows/flyteidl-checks.yml)
Generate checks run only when relevant paths change, reducing unnecessary CI runs and unrelated churn.
How was this patch tested?
• Ran make generate locally in affected components and confirmed no unexpected diffs when inputs were unchanged.
• Verified RUN_GO_TIDY=1 make generate still runs go mod tidy.
• Confirmed CI idempotency step fails if the working tree becomes dirty.
• Validated path-filter behavior to ensure generate runs only when relevant files change.
Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
flyteorg/flyte