Repository navigation
Reject object updates containing unknown fields - #1174
Merged
Haven Xia (HavenXia) merged 1 commit intoAug 25, 2026
Merged
Conversation
Luiz Oliveira (laoj2)
requested review from
Haven Xia (HavenXia) and
Julian Gutierrez Oschmann (juli4n)
August 24, 2026 21:27
Haven Xia (HavenXia)
previously approved these changes
Aug 24, 2026
Member
|
Thanks, this matches exactly the 2nd proposal in substrate upgrade proposal |
Luiz Oliveira (laoj2)
force-pushed
the
update-full-objects
branch
from
August 25, 2026 02:33
2319308 to
4d41913
Compare
Haven Xia (HavenXia)
added a commit
to HavenXia/substrate
that referenced
this pull request
Aug 25, 2026
A Create carrying unknown fields means the caller knows a newer schema than this server and is asking for behavior it cannot deliver. Dropping them silently creates the resource without what the user thinks they set. Reject with InvalidArgument instead, completing the create half of the reject-on-write rule from agent-substrate#954; the update half is agent-substrate#1174, whose validateNoUnknownFields helper this reuses. Covers CreateActor, CreateActorTemplate, CreateAtespace and CreateActorSnapshotTag.
2 tasks done
Haven Xia (HavenXia)
added a commit
to HavenXia/substrate
that referenced
this pull request
Aug 25, 2026
A Create carrying unknown fields means the caller knows a newer schema than this server and is asking for behavior it cannot deliver. Dropping them silently creates the resource without what the user thinks they set. Reject with InvalidArgument instead, completing the create half of the reject-on-write rule from agent-substrate#954; the update half is agent-substrate#1174, whose validateNoUnknownFields helper this reuses. Covers CreateActor, CreateActorTemplate, CreateAtespace and CreateActorSnapshotTag.
Luiz Oliveira (laoj2)
force-pushed
the
update-full-objects
branch
from
August 25, 2026 13:18
4d41913 to
28b2351
Compare
Haven Xia (HavenXia)
approved these changes
Aug 25, 2026
Haven Xia (HavenXia)
added a commit
to HavenXia/substrate
that referenced
this pull request
Aug 25, 2026
A Create carrying unknown fields means the caller knows a newer schema than this server and is asking for behavior it cannot deliver. Dropping them silently creates the resource without what the user thinks they set. Reject with InvalidArgument instead, completing the create half of the reject-on-write rule from agent-substrate#954; the update half is agent-substrate#1174, whose validateNoUnknownFields helper this reuses. Covers CreateActor, CreateActorTemplate, CreateAtespace and CreateActorSnapshotTag.
Benjamin Elder (BenTheElder)
added a commit
to BenTheElder/substrate
that referenced
this pull request
Aug 25, 2026
agent-substrate#1174 landed a test written against tag, which agent-substrate#1167 had renamed to actor_snapshot_tag, so cmd/ateapi/internal/controlapi does not compile.
Luiz Oliveira (laoj2)
pushed a commit
that referenced
this pull request
Aug 25, 2026
Part of #1011 , stack on #1174 As I was writing [ate upgrade proposal](https://docs.google.com/document/d/1JduAyGZFyqdNp4UhKiv0EN-is3iW5tf5BwGTWbt2ouI/edit?usp=sharing&resourcekey=0-MXG12QCkleIxhY7cOB7g6A), we should have both rejection for unknown fields for creating and updating. Add the creating part here. - [x] Tests pass - [x] Appropriate changes to documentation are included in the PR
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.
#1011
An update containing unknown fields during a RMW indicates there's a version skew between client and server.
So, the server enforces a policy to fail explicitly when it receives an unknown proto field: so that it does not silently drop fields that the user intended to set but the current server version cannot process
This also helps to avoid behaviour drift during rolling upgrades: During rolling upgrades, different components (like the data plane and control plane) can be on different versions. If an older server replica . If an older server replica processes a request coming from a newer client, it will reject it (it doesn't know how to validate/handle it) and it's the client's responsibility to retry.