Skip to content

api: relax inline_string length limitation in DataSource#14461

Merged
mattklein123 merged 2 commits intoenvoyproxy:masterfrom
lizan:empty_data_source_validation
Dec 19, 2020
Merged

api: relax inline_string length limitation in DataSource#14461
mattklein123 merged 2 commits intoenvoyproxy:masterfrom
lizan:empty_data_source_validation

Conversation

@lizan
Copy link
Copy Markdown
Member

@lizan lizan commented Dec 17, 2020

As discussed in #14276, relax the min length requirement of inline_string in DataSource. It should checked after DataSource since an empty file could pass validation.

Risk Level: Low
Testing: integration test
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Lizan Zhou lizan@tetrate.io

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
@lizan lizan requested a review from esmet December 17, 2020 01:55
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
API shepherd assignee is @htuch
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #14461 was opened by lizan.

see: more, trace.

@lizan lizan changed the title api: relex inline_string length limitation in DataSource api: relax inline_string length limitation in DataSource Dec 17, 2020
}
return "";
}
if (!allow_empty && data.empty()) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will this start enforcing allow_empty on the kFilename case where it didn't previously?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes and this is intended in that way. I took quick look on existing use and mostly are allowing empty so this shouldn't be a big issue.

esmet
esmet previously approved these changes Dec 17, 2020
Copy link
Copy Markdown
Contributor

@esmet esmet left a comment

Choose a reason for hiding this comment

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

Looks good


// String inlined in the configuration.
string inline_string = 3 [(validate.rules).string = {min_len: 1}];
string inline_string = 3;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we also relax on inline_bytes?

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
@mattklein123 mattklein123 merged commit 239013e into envoyproxy:master Dec 19, 2020
mpuncel added a commit to mpuncel/envoy that referenced this pull request Dec 22, 2020
* master: (30 commits)
  Deflaked: Guarddog_impl_test (envoyproxy#14475)
  [fuzz] add fuzz tests for hpack encoding and decoding (envoyproxy#13315)
  [filters] Prevent a filter from sending local reply and continue (envoyproxy#14416)
  oauth2: improving coverage (envoyproxy#14479)
  owners: Change dio email address (envoyproxy#14498)
  macos build: Fix ninja install (envoyproxy#14495)
  http: use OptRef helper to reduce some boilerplate (envoyproxy#14361)
  doc: update test/integration/README.md (envoyproxy#14485)
  server: wait workers to start before draining parent. (envoyproxy#14319)
  api: relax inline_string length limitation in DataSource (envoyproxy#14461)
  oauth: properly stop filter chain when a response was sent (envoyproxy#14476)
  listener: deprecate use_proxy_proto (envoyproxy#14406)
  deps: update cel and remove a patch (envoyproxy#14473)
  preconnect: rename: (envoyproxy#14474)
  coverage: ratcheting limits (envoyproxy#14472)
  grpc mux: fix sending node again after stream is reset (envoyproxy#14080)
  [test] Replace printers_include with printers_lib. (envoyproxy#14442)
  tcp: nodelay in the new pool (envoyproxy#14453)
  test: replace mock_methodn macros with mock_method (envoyproxy#14450)
  tcp: extending tcp integration test (envoyproxy#14451)
  ...

Signed-off-by: Michael Puncel <mpuncel@squareup.com>
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.

4 participants