Repository navigation
Conversation
Signed-off-by: chihyeon cho <sagokgo16@gmail.com>
This branch has not been deployed
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.
When the configured gRPC port is already in use,
start_grpc_service()returns an error, butmaindiscards it intokio::select!. As a result,grpc-aalogsAA exits.and exits with status 0 despite failing to start the server.This small code quality improvement propagates the server error with the socket address as context, so startup failures report their cause and return a nonzero exit status. It also changes the pre-bind log from
listeningtoStartingto avoid claiming readiness before binding.Adds a server unit test for an occupied port and executable integration tests for an occupied port and an invalid socket address. The tests require no TEE hardware or KBS service.
Validation:
cargo test --locked -p attestation-agent --no-default-features \ --features bin,grpc --bin grpc-aa --test grpc_startup -- --nocapture cargo clippy --locked -p attestation-agent --no-default-features \ --features bin,grpc --bin grpc-aa --test grpc_startup -- -D warnings cargo fmt --all -- --check