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

runtime: support bootstrap runtime configuration. #6759

Merged
merged 8 commits into from
May 6, 2019

Conversation

htuch
Copy link
Member

@htuch htuch commented Apr 30, 2019

As a first step towards TDS, add support for proto/JSON representations of the runtime virtual file
system and plumb this into bootstrap.

"numerator" and "denominator" are now reserved keywords and can't be used in runtime keys; this
simplifies parsing significantly. It is not expected that these are widely used, due to the
difficulty of ensuring atomicity if representing fractions, but this is technically a runtime API
breaking change.

Risk level: Medium (due to the reserved word changes).
Testing: Unit and server tests added.

Part of #6708

Signed-off-by: Harvey Tuch htuch@google.com

As a first step towards TDS, add support for proto/JSON representations of the runtime virtual file
system and plumb this into bootstrap.

"numerator" and "denominator" are now reserved keywords and can't be used in runtime keys; this
simplifies parsing significantly. It is not expected that these are widely used, due to the
difficulty of ensuring atomicity if representing fractions, but this is technically a runtime API
breaking change.

Risk level: Medium (due to the reserved word changes).
Testing: Unit and server tests added.

Part of envoyproxy#6708

Signed-off-by: Harvey Tuch <htuch@google.com>
htuch added 3 commits April 30, 2019 23:53
Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
Copy link
Contributor

@alyssawilk alyssawilk left a comment

Choose a reason for hiding this comment

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

Cool, this will be awesome to have.

I owe you another look at code but here's some early thoughts

docs/root/configuration/runtime.rst Outdated Show resolved Hide resolved
docs/root/configuration/runtime.rst Outdated Show resolved Hide resolved
EXPECT_EQ("world", loader_->snapshot().get("file2"));
EXPECT_EQ("thing", loader_->snapshot().get("some"));
EXPECT_EQ("thang", loader_->snapshot().get("other"));
// Admin overrides disk and bootstrap.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it admin, or latest takes? If there's a file reload, does it overwrite the admin overrides?

I think we can be more clear about this in tests and docs.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. It overrides as a layer, I've added a test to demonstrate this (and convince myself!).

docs/root/configuration/runtime.rst Show resolved Hide resolved
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Nice, super cool. Few comments.

/wait

docs/root/configuration/runtime.rst Outdated Show resolved Hide resolved
docs/root/configuration/runtime.rst Show resolved Hide resolved
source/server/configuration_impl.cc Show resolved Hide resolved
htuch added 4 commits May 2, 2019 14:44
Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Very nice!

@htuch htuch merged commit eb699ab into envoyproxy:master May 6, 2019
@htuch htuch deleted the tds-bootstrap branch May 6, 2019 21:25
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.

3 participants