Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AIP-134: Update masks should not be optional #1402

Open
SLaks opened this issue Aug 7, 2024 · 0 comments
Open

AIP-134: Update masks should not be optional #1402

SLaks opened this issue Aug 7, 2024 · 0 comments

Comments

@SLaks
Copy link

SLaks commented Aug 7, 2024

Problem

  1. Client Foo does not include an update mask
  2. Server introduces a new optional field bar
  3. User sets bar on a newer client
  4. User updates the containing object via an older build of client Foo that does not know about bar.
  5. The update RPC does not include bar (eg, because it uses read masks and didn't request it, or because it drops unknown fields.
  6. The bar field is silently cleared

Solution

Change https://linter.aip.dev/134/update-mask-optional-behavior and The field must be optional, and the service must treat an omitted field mask as an implied field mask equivalent to all fields that are populated (have a non-empty value). to make update masks always required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant