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

doc: clarify handling of duplicate xDS resource names #12756

Merged
merged 3 commits into from
Aug 24, 2020

Conversation

markdroth
Copy link
Contributor

Signed-off-by: Mark D. Roth [email protected]

Commit Message: doc: clarify handling of duplicate xDS resource names
Additional Description: Updates the xDS protocol spec.
Risk Level: Low
Testing: N/A
Docs Changes: Included in PR
Release Notes: N/A

CC @htuch

^^^^^^^^^^^^^^^^^^^^^^^^

It is an error for a server to send a single response that contains the same resource name
twice. Clients must NACK responses that contain multiple instances of the same resource name.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should underspecify this, i.e. say that clients may NACK or chose their own behavior here, e.g. accept first or last resource of the same name. This seems to impose less burden on client implementations for a path that servers should not be following in the first place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed "must" to "should". Does that work?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems OK, but is there a reason for "should" vs. "may" from your perspective?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I lean toward a stricter definition of protocol behavior, because I think being more liberal leads to confusing and hard-to-debug interoperability problems. If a server is currently sending a duplicate resource and its current clients happen to be fine with that, and then they start using a new client that NACKs in that case, it may be hard to figure out what's wrong. But if the clients are all strict, then the server will never get into that situation to begin with.

Also, in the context of this specific change, there are a lot fewer client implementations than server implementations, so I'm not really worried about imposing an undue burden on clients.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Please run fix_format, since there is some double space issue to resolve.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Signed-off-by: Mark D. Roth <[email protected]>
Signed-off-by: Mark D. Roth <[email protected]>
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@htuch htuch merged commit c7323f2 into envoyproxy:master Aug 24, 2020
@markdroth markdroth deleted the xds_duplicate_resource_names branch August 24, 2020 17:03
lavignes added a commit to lavignes/envoy that referenced this pull request Aug 24, 2020
* envoy/master: (90 commits)
  cleanup: use structured binding (envoyproxy#12791)
  docs: fix header name for retries in gRPC services (envoyproxy#12790)
  docs: clarify meaning of HeaderValueOption.append (envoyproxy#12792)
  doc: clarify handling of duplicate xDS resource names (envoyproxy#12756)
  Dependencies: build updates. (envoyproxy#12786)
  Ratelimit: Add optional descriptor key to generic_key action (envoyproxy#12734)
  test: refactor header inclusion to speed up building (for test/mocks/upstream:upstream_mocks)  (envoyproxy#12407)
  docs: Fix omitted word (envoyproxy#12782)
  ci: avoid uploading dwp as separate artifact (envoyproxy#12777)
  doc: Fix small typos (envoyproxy#12769)
  fix cache factory category (envoyproxy#12765)
  docs: fix typo v1.15.0.rst (envoyproxy#12680)
  Add clang-cl RBE toolchain for Windows (envoyproxy#12776)
  fuzz: add router fuzz proto (envoyproxy#12727)
  header: New HeaderMatcher and StringMatcher type - Contains (envoyproxy#12623)
  tcp_proxy: use dynamicMetadata() from StreamInfo for load balancing (envoyproxy#12595)
  network: add io handle recv function for http inspector (envoyproxy#12736)
  jwt_authn: supports jwt payload without "iss" field (envoyproxy#12744)
  Add support for nested JSON format in json logging mode (envoyproxy#12602)
  http: fixing a fuzz flake by setting details on connection teardown (envoyproxy#12737)
  ...

Signed-off-by: Scott LaVigne <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants