Repository navigation
core: add clientVersion to client schemas - #14959
Merged
Merged
Conversation
vito
added a commit
that referenced
this pull request
Oct 29, 2026
Fill in the PR number of the clientVersion fragment. Signed-off-by: Alex Suraci <[email protected]>
vito
marked this pull request as ready for review
October 29, 2026 17:14
vito
added a commit
that referenced
this pull request
Oct 29, 2026
Fill in the PR number of the clientVersion fragment. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/client-version-arg
branch
2 times, most recently
from
October 29, 2026 19:11
6d9ced1 to
441d95c
Compare
vito
added a commit
that referenced
this pull request
Oct 29, 2026
Fill in the PR number of the clientVersion fragment. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Oct 29, 2026
Fill in the PR number of the clientVersion fragment. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/client-version-arg
branch
from
October 29, 2026 22:07
441d95c to
168f78a
Compare
This was referenced Oct 29, 2026
vito
added a commit
that referenced
this pull request
Nov 2, 2026
Fill in the PR number of the clientVersion fragment. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/client-version-arg
branch
from
November 2, 2026 15:58
168f78a to
20b139e
Compare
vito
added a commit
that referenced
this pull request
Nov 4, 2026
Fill in the PR number of the clientVersion fragment. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/client-version-arg
branch
from
November 4, 2026 16:29
20b139e to
b309a67
Compare
vito
added a commit
that referenced
this pull request
Nov 4, 2026
Fill in the PR number of the clientVersion fragment. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/client-version-arg
branch
from
November 4, 2026 18:57
b309a67 to
0c0f1c3
Compare
vito
added a commit
that referenced
this pull request
Nov 4, 2026
Fill in the PR number of the clientVersion fragment. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 5, 2026
Fill in the PR number of the clientVersion fragment. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/client-version-arg
branch
from
November 5, 2026 00:06
987c7da to
9fc5c1f
Compare
vito
added a commit
that referenced
this pull request
Nov 5, 2026
Fill in the PR number of the clientVersion fragment. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/client-version-arg
branch
from
November 5, 2026 00:15
9fc5c1f to
48b81ef
Compare
vito
added a commit
that referenced
this pull request
Nov 5, 2026
Fill in the PR number of the clientVersion fragment. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/client-version-arg
branch
from
November 5, 2026 03:40
48b81ef to
c7dd6e6
Compare
SDKs generate a dependency's client from ModuleSource.clientSchemaIntrospectionJSON, and pick the core view they need with withEngineVersion(<their client's version>). Since modules are named by the engine version they declare, that override also renames the dependency: one that declares v1.0.0-beta.20 got a client with the new spellings while the engine serves it with the old ones, and the reverse across the cut. clientSchemaIntrospectionJSON(clientVersion:) describes core at the view of that client's engine version, capped at the engine's, and loads the module at the version it declares, the way the engine serves a dependency to a consumer. It defaults to the module's own version, so existing callers are unchanged, and is in every view since the SDK modules calling it are pinned pre-cut. withEngineVersion keeps meaning "this module now declares another version". Signed-off-by: Alex Suraci <[email protected]>
A beta.20 and a beta.22 Dang module: clientVersion describes core at the client's view and keeps each module's own names; the default is the module's own version; withEngineVersion still renames the module. Signed-off-by: Alex Suraci <[email protected]>
Regenerate the API reference schema and the in-repo SDK clients for ModuleSource.clientSchemaIntrospectionJSON(clientVersion:). Signed-off-by: Alex Suraci <[email protected]>
The PR number is filled in once the PR is open. Signed-off-by: Alex Suraci <[email protected]>
The identifier-casing design listed a version argument for client schemas as an open follow-up; it now names clientVersion, and leaves the SDKs switching to it as not done. Two other design docs pointed at the removed loadDefaultSchemaBuilder. Signed-off-by: Alex Suraci <[email protected]>
Fill in the PR number of the clientVersion fragment. Signed-off-by: Alex Suraci <[email protected]>
With the identifier casing cut at v1.0.0-beta.25, v1.0.0-beta.24 is the last release before it, with a view of its own: check that it still has clientSchemaIntrospectionJSON's old spelling and its clientVersion argument. Signed-off-by: Alex Suraci <[email protected]>
Keep the explicit last-pre-cut clientVersion case current while preserving the existing beta.20 fixture. Signed-off-by: Alex Suraci <[email protected]>
Check clientVersion through the public API from beta.20 and beta.25 callers, including the legacy spelling, independent consumer view, and omitted default. Assert the caller view and optional argument metadata through introspection, replacing the redundant schema registration unit while retaining mixed-version module naming and withEngineVersion comparisons. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/client-version-arg
branch
from
November 5, 2026 16:28
c7dd6e6 to
bc29b4f
Compare
vito
added a commit
that referenced
this pull request
Nov 5, 2026
Fill in the PR number of the clientVersion fragment. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/client-version-arg
branch
from
November 5, 2026 17:37
bc29b4f to
de20bfa
Compare
vito
added a commit
that referenced
this pull request
Nov 5, 2026
Fill in the PR number of the clientVersion fragment. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/client-version-arg
branch
from
November 5, 2026 20:07
de20bfa to
be19105
Compare
grouville
approved these changes
Nov 5, 2026
vito
force-pushed
the
naming/client-version-arg
branch
from
November 5, 2026 20:56
be19105 to
963e22a
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.
Adds
clientVersionto dependency-client schema introspection, so SDKs can select the consumer's core API view without changing the dependency's declared version or names. Refs #13668.Why
Dependency clients need two versions to remain distinct:
Using
source.withEngineVersion(consumerVersion)before introspection changes both. For example, a pre-cut dependency served asBeforeHttpClientcan be described asBeforeHTTPClientwhen overridden to the beta.26 view. The generated client then selects names the dependency does not expose. The reverse mismatch occurs for a post-cut dependency and pre-cut consumer.API
Pre-cut callers use the existing
clientSchemaIntrospectionJSONspelling; the argument is available on both view-gated spellings.clientVersionselects core's view, using declared-version normalization and capping it at the engine's view.latestselects the engine version.""uses the dependency's version, preserving the previous default—not the calling client's version.withEngineVersionstill changes the dependency's declared version, including its names. SDK generation should usesource.clientSchemaIntrospectionJSON(clientVersion: v)instead of overriding the source solely to select core's view. SDK call-site changes belong in their own repositories.Version normalization
This argument follows the existing declared-engine-version rules. An unrecognized non-semver value is not newly rejected; it uses the existing v0.11.9 compatibility fallback. This PR does not introduce a different validation policy for client versions.
Validation
Existing
TestModuleNaming/TestClientSchemaVersionexercises both sides ofengine.IdentifierCasingVersion(currently beta.26):File.asJson, while the module remainsBeforeHttpClient.asJSON, while the module remainsAfterHTTPClient.withEngineVersiondemonstrates why overriding the dependency produces different module names.clientVersion. The test verifies the caller's actual schema version and the public nullableStringargument with its""default.All six integration rows passed on a source-built engine. Ignoring
clientVersionmade the new beta.20 caller case fail on the returned schema version; restoring the resolver passed again. The redundant registration/default unit was removed because those assertions now run through public integration paths.TestTypeDefNamingCacheIdentityalso passed; focused review found nothing to fix.Earlier validation also passed
TestGenerators/TestClientSchemaIntrospectionJSON; the SDL and six in-repo SDK clients were regenerated. The beta.26 restack checked build/vet (with pre-existinglostcancelwarnings disabled) and schema regeneration. These latter results are historical, not a claim of a fresh full-suite run.API changes
go -C hack/sdl-diff run . aa85b3d92685835af7e516378673514e43742b7b:docs/docs-graphql/schema.graphqls c7dd6e602e731e793522f5c977d168715f8614aa:docs/docs-graphql/schema.graphqlsDetailed diff
extend type ModuleSource { """ The client-facing introspection schema JSON file for this module source. This is the schema consumed by client codegen: unlike introspectionSchemaJson (the module-facing schema), it hides no core types and installs this module (reached via dag.<moduleName>) so a generated client can bind it. The module's dependencies are excluded: a client is generated for a single module plus core, not its dependency graph. """ - clientSchemaIntrospectionJson: File! + clientSchemaIntrospectionJson( + """ + The engine version of the client the schema is generated for, e.g. the + engineVersion of the module that depends on this one: core is described as + that client sees it, capped at this engine's version. + + This module is still loaded at the engine version it declares, and so named + by its own naming rules, as the engine serves it to such a client. Defaults + to this module's own engine version. + + Use this rather than withEngineVersion, which makes this module declare another version and so changes its names. + """ + clientVersion: String = "" + ): File! }