Extract API codegen into a shared composite action#1111
Closed
SachaProbo wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/actions/generate-go/action.yaml">
<violation number="1" location=".github/actions/generate-go/action.yaml:17">
P1: `retry_generate` won’t reliably retry failures under GitHub Actions because `go generate` is executed in a context where `errexit` exits before your retry branch runs.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
3a69282 to
4e614b9
Compare
Move the four parallel `go generate` calls used by the build, lint-go, and test-go jobs into a shared composite action, and drop the order-only Makefile prerequisites between the gqlgen targets that f7070c4 added. The serialization workaround for the intermittent gqlgen Rewriter.getSource panic was insufficient; reverting to parallel execution restores CI throughput, and a retry will be added separately. Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
4e614b9 to
7dcb19e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gqlgen's rewriter captures token offsets at packages.Load() parse time and re-reads files from disk later to extract source ranges. When the on-disk content drifts between the two reads, the slice goes out of bounds and gqlgen panics. The race is intermittent.
Inline a retry_generate bash helper in each CI "Generate Go code" step that retries gqlgen up to three times on the slice-bounds panic and propagates other errors unchanged. Drop the order-only Makefile prerequisites and CI sequencing introduced in f7070c4 so console and trust gqlgen runs go back to running in parallel.
Summary by cubic
Moved Go API code generation to a shared composite action and restored parallel
gqlgenruns for./pkg/server/api/{connect,console,trust,mcp}/v1to speed up CI../.github/actions/generate-goin build, lint-go, and test-go jobs to rungo generatein parallel.makecan fan out codegen again.Written for commit 7dcb19e. Summary will update on new commits. Review in cubic