Promote the generation preview to Goa v3.31.0 - #3971
Merged
Merged
Conversation
* Fix schemas and security for named strings * Complete named credential generation contracts * Test optional Basic username with required password
This was referenced Sep 3, 2026
Co-authored-by: Raphael (manual office deploy after cloud-state fix) <simon.raphael@gmail.com>
This was referenced Sep 16, 2026
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.
Goa v3.31.0 promotes the generation preview to stable. The generator now records the complete design, generated packages, declarations, imports, conversions, and validators before writing files. Every service, transport, command, example, OpenAPI document, and plugin uses those same choices. This fixes disagreements between independently generated declarations and callers that previously produced invalid or inconsistent code.
This is a substantial upgrade with intentional breaking changes, while retaining the
goa.design/goa/v3module path. Keeping v3 does not imply source or wire compatibility with every v3.30.0 application. UPGRADING.md is the application migration guide; codegen/ARCHITECTURE.md describes ownership and the complete generator API migration.Generated behavior
OneOfstores one selected branch behind generated constructors, setters, accessors, andKind. Public branch fields are removed. Required unions reject absent or nil selections; selecting a new branch replaces the old one.false,0, or empty value remains explicit, while an omitted required value is rejected before conversion. Scalar protobuf Go fields become pointers; service fields retain their existing layouts. Defaults apply only to absent inputs, never to service results. Repeated and map fields accept valid empty collections because protobuf cannot represent their presence.data: {name, body}; caller-selected views useresult: {view, body}. Unknown errors retain their raw JSON-RPC representation. JSON-RPC WebSocket, client-streaming, and bidirectional APIs are removed.ArrayOfRequiredJSON arrays reject null primitive items. Multipart decoding validates the body before constructing the service payload. Whole-query maps decode the same raw keys that clients send. HTTP response selection requires exactly one untagged default response. Custom path types retain their imports in generated client and server path files.The generation run owns package declarations and imports. Each transport owns its wire schema, presence rules, codecs, and validators. Plugins that add declarations must plan them before names become final. Released registration functions and generator entry points remain, but custom plugins that called removed internal-analysis helpers or constructed changed planning records must migrate.
Upgrade and deployment
gentree, and compile and test the application. Never mix generated versions. Goa requires Go 1.25; the examples and plugins repositories retain their existing Go 1.26 requirement.protoc-gen-go v1.36.12andprotoc-gen-go-grpc v1.6.2, then regenerate protobuf code. Update direct scalar message literals for pointers. Update clients before enabling new server presence validation when required zero or empty values matter.goa examplepreserves existing handwritten files and cannot migrate those callers automatically.There is no persisted-data migration. Rollback restores the previous design, handwritten callers, dependency versions, and complete generated tree or matching binaries. Roll back both peers together for changed transport exchanges.
Release review and validation
uuid.UUID.The synchronized downstream branches are reviewed in goadesign/examples#219 and goadesign/plugins#271. All 19 example modules and all four plugins modules pass local generation/build/test checks against this generator; all downstream CI checks pass and both PRs are merged. Goa CI also passes on Go 1.25 Linux and Windows, alongside dependency review and CodeQL. This PR merges the implementation and migration guide; the release workflow creates the final version commit and tags afterward.
Review
codegen/generation.go,codegen/generator/plan.go, and the service/transport plans for ownership; the union and validation code for value semantics;grpc/codegen/protobuf_catalog.goand conversion planning for presence and views; andjsonrpc/types.goplus the JSON-RPC generators for the changed exchanges. The architecture guide maps each removed or changed exported generator API to its replacement.