Simplify admin server feature-flagging in #1642#1682
Merged
hawkw merged 9 commits intoeliza/log-streaming-demofrom May 18, 2022
Merged
Simplify admin server feature-flagging in #1642#1682hawkw merged 9 commits intoeliza/log-streaming-demofrom
hawkw merged 9 commits intoeliza/log-streaming-demofrom
Conversation
prost generates empty files for google protobuf types. This change adds these generated files so that they are not regenerated on `make test`. Signed-off-by: Oliver Gould <[email protected]>
Bumps [rustls](https://github.com/rustls/rustls) from 0.20.5 to 0.20.6. - [Release notes](https://github.com/rustls/rustls/releases) - [Changelog](https://github.com/rustls/rustls/blob/main/RELEASE_NOTES.md) - [Commits](rustls/rustls@v/0.20.5...v/0.20.6) --- updated-dependencies: - dependency-name: rustls dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
socket2 v0.4.5 has been yanked (rust-lang/socket2#308). This reverts commit 9004d9c. Signed-off-by: Oliver Gould <[email protected]>
#1678) Bumps [EmbarkStudios/cargo-deny-action](https://github.com/EmbarkStudios/cargo-deny-action) from 1.2.17 to 1.3.0. - [Release notes](https://github.com/EmbarkStudios/cargo-deny-action/releases) - [Commits](EmbarkStudios/cargo-deny-action@3481b77...b655a95) --- updated-dependencies: - dependency-name: EmbarkStudios/cargo-deny-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [clang-sys](https://github.com/KyleMayes/clang-sys) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/KyleMayes/clang-sys/releases) - [Changelog](https://github.com/KyleMayes/clang-sys/blob/master/CHANGELOG.md) - [Commits](https://github.com/KyleMayes/clang-sys/commits) --- updated-dependencies: - dependency-name: clang-sys dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Rather than push feature flagging down into the `serve` logic, we can avoid even matching the logs.json endpoint when the feature isn't disabled. This avoids the need for conditional feature gatingc in the handler. * The log module is split into two submodules: level and stream. The stream module is feature-gated. This allows to extract function-local defintions into the module, which simplifies scoping and makes things easier to read (imo). Signed-off-by: Oliver Gould <[email protected]>
Signed-off-by: Oliver Gould <[email protected]>
olix0r
commented
May 18, 2022
|
|
||
| // If log streaming support is enabled, start a new log stream | ||
| pub async fn serve<B>( | ||
| handle: trace::Handle, |
Member
Author
There was a problem hiding this comment.
Changed the type here to avoid taking a generic parameter. Cloning the handle should be cheap (and this isn't really allocation-sensitive)
Signed-off-by: Oliver Gould <[email protected]>
hawkw
approved these changes
May 18, 2022
Contributor
hawkw
left a comment
There was a problem hiding this comment.
yeah, this feels a bit neater --- thanks!
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.
servelogic, we canavoid even matching the logs.json endpoint when the feature isn't
disabled. This avoids the need for conditional feature gatingc in the
handler.
stream module is feature-gated. This allows to extract function-local
defintions into the module, which simplifies scoping and makes things
easier to read (imo).