Provide path_to_schema to schema definition state - #1316
Merged
Conversation
jwils
requested review from
BrianSigafoos-SQ,
bsorbo,
ellisandrews-toast,
jwondrusch,
marcdaniels-toast,
myronmarston and
rossroberts-toast
as code owners
July 25, 2026 15:13
myronmarston
requested changes
Jul 25, 2026
jwils
force-pushed
the
joshuaw/artifact-manager-schema-path
branch
from
July 29, 2026 19:13
20d16fd to
41f7655
Compare
myronmarston
approved these changes
Jul 29, 2026
myronmarston
left a comment
Collaborator
There was a problem hiding this comment.
LGTM apart from a suggestion below and one other thing: the PR description is no longer accurate. Worth updating before you merge?
path_to_schema to SchemaArtifactManagerpath_to_schema to schema definition state
jwils
added a commit
that referenced
this pull request
Jul 31, 2026
## Why Nested relationship acceptance tests assumed that each logical search would use a separate `_msearch` transport request. Fiber scheduling can batch the same six searches into five requests, causing unrelated changes such as #1316 to fail despite correct results and routing. ## What - Stop asserting the transport request count in the bi-directional nested relationship test - Continue asserting six logical datastore searches and their exact shard routing ## Risk Assessment Low — this is a test-only change that preserves the result, query-count, and routing coverage. ## References - Reproduced in the Ruby 3.4 and 4.0 `run_each_gem_spec` jobs on #1316 - `bundle exec rspec elasticgraph-graphql/spec/acceptance/nested_relationships_spec.rb` - `script/lint`
jwils
force-pushed
the
joshuaw/artifact-manager-schema-path
branch
from
July 31, 2026 01:54
41f7655 to
33db237
Compare
jwils
enabled auto-merge (squash)
July 31, 2026 02:21
Schema definition extensions may need to maintain inputs alongside the schema file. Carry the configured path on State so extensions can access it without expanding SchemaArtifactManager dependencies.
jwils
force-pushed
the
joshuaw/artifact-manager-schema-path
branch
from
July 31, 2026 02:38
33db237 to
c4f0213
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.
Today, every schema artifact is a pure function of the schema definition: the schema artifacts directory can safely be deleted and regenerated at any time. In #1304 (comment), @myronmarston pointed out that
proto_field_numbers.yamldoesn't fit that model--it's an input toschema.protogeneration, not a pure output--and suggested treating it as part of the schema definition, stored as a sibling ofpath_to_schema, rather than as a schema artifact.For an extension to maintain a file there, schema definition state needs to know where the schema definition lives.
RakeTasksalready knows (it's how the schema gets loaded) but never passed it into the API. This PR storespath_to_schemaonSchemaDefinition::State, allowing extensions to access it without expandingSchemaArtifactManager's dependencies.Nothing in core uses the value yet, so there are no behavior changes to the core artifacts. #1304 builds on this to relocate
proto_field_numbers.yaml.Update — 2026-07-29
After review, the path is carried by schema definition state rather than an extension-only
SchemaArtifactManagerinstance variable. The manager continues to accept the narrower schema-definition results object.