-
Notifications
You must be signed in to change notification settings - Fork 84
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
CLI - cancel execution upon signal reception #367
Changes from 1 commit
b973b75
fb5c434
1bd1d31
fcba594
ce5ead6
3f99119
111ba5d
89dfdf6
c457af6
04eec56
a11050f
781df87
2c04d10
55f694f
d1a696b
3c35f86
9e0d9b2
57d71f0
1fddbec
20e6108
3198623
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,7 @@ class ProcessImpl : public Process, public Envoy::Logger::Loggable<Envoy::Logger | |
void maybeCreateTracingDriver(const envoy::config::trace::v3::Tracing& configuration); | ||
|
||
void configureComponentLogLevels(spdlog::level::level_enum level); | ||
const std::vector<ClientWorkerPtr>& createWorkers(const uint32_t concurrency); | ||
void createWorkers(const uint32_t concurrency); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (optional) Is this a good time to document the method? |
||
std::vector<StatisticPtr> vectorizeStatisticPtrMap(const StatisticPtrMap& statistics) const; | ||
std::vector<StatisticPtr> | ||
mergeWorkerStatistics(const std::vector<ClientWorkerPtr>& workers) const; | ||
|
@@ -136,6 +136,8 @@ class ProcessImpl : public Process, public Envoy::Logger::Loggable<Envoy::Logger | |
Envoy::Server::ValidationAdmin admin_; | ||
Envoy::ProtobufMessage::ProdValidationContextImpl validation_context_; | ||
bool shutdown_{true}; | ||
Envoy::Thread::MutexBasicLockable workers_lock_; | ||
bool cancelled_{false}; | ||
}; | ||
|
||
} // namespace Client | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,7 @@ bool RemoteProcessImpl::run(OutputCollector& collector) { | |
|
||
bool RemoteProcessImpl::requestExecutionCancellation() { | ||
ENVOY_LOG(error, "Remote process cancellation not supported yet"); | ||
// TODO(XXX): Send a cancel request to the gRPC service. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did we want to replace XXX with a value? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I filed #380 (and updated |
||
return false; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -659,7 +659,9 @@ def test_http_request_release_timing(http_test_server_fixture, qps_parameterizat | |
|
||
|
||
def send_sigterm(p): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we choose a more readable name than "p". |
||
time.sleep(2) | ||
# Sleep for a while, under tsan the client needs a lot of time | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add a Python style docstring, since the function is public. |
||
# to start up. | ||
time.sleep(10) | ||
p.terminate() | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to reviewers: The "hide whitespace" toggle in Github makes this a lot more fun to review.
(The scope introduced for the lock guard introduces a lot of whitespace noise).