Skip to content

Commit

Permalink
Fix build issue after cpp sdk upgrade (#600)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenylee-aws authored Oct 17, 2024
1 parent 8b879e2 commit 909b890
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion aws/kinesis/core/pipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Pipeline : boost::noncopyable {
shard_map_(
std::make_shared<ShardMap>(
executor_,
[this](auto& req, auto& handler, auto& context) { kinesis_client_->ListShardsAsync(req, handler, context); },
[this](auto& req, auto& handler, auto& context) { kinesis_client_->ListShardsAsync(handler, context, req ); },
stream_,
stream_arn_,
metrics_manager_)),
Expand Down
7 changes: 3 additions & 4 deletions aws/kinesis/core/test/shard_map_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ class MockKinesisClient : public Aws::Kinesis::KinesisClient {
executor_(std::make_shared<aws::utils::IoServiceExecutor>(1)) {}

virtual void ListShardsAsync(
const Aws::Kinesis::Model::ListShardsRequest& request,
const Aws::Kinesis::ListShardsResponseReceivedHandler& handler,
const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context
= nullptr) const {
const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr,
const Aws::Kinesis::Model::ListShardsRequest& request = {}) const {
executor_->schedule([=] {

if (outcomes_list_shards_.size() == 0) {
Expand Down Expand Up @@ -89,7 +88,7 @@ class Wrapper {
[this] { num_req_received_++; }),
shard_map_(
std::make_shared<aws::utils::IoServiceExecutor>(1),
[this](auto& req, auto& handler, auto& context) { mock_kinesis_client_.ListShardsAsync(req, handler, context); },
[this](auto& req, auto& handler, auto& context) { mock_kinesis_client_.ListShardsAsync(handler, context, req); },
kStreamName,
kStreamARN,
std::make_shared<aws::metrics::NullMetricsManager>(),
Expand Down
5 changes: 5 additions & 0 deletions aws/utils/logging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ class AwsBoostLogInterface : public Aws::Utils::Logging::LogSystemInterface {
va_end(args);
}

// cpp sdk made this virtual so needed to have a dummy implementation for it for build to pass
virtual void vaLog(LogLevel logLevel, const char* tag, const char* formatStr, va_list args) override {
return;
}

virtual void LogStream(LogLevel logLevel, const char* tag, const Aws::OStringStream &messageStream) override {
LogToBoost(logLevel, tag, messageStream.str());
}
Expand Down

0 comments on commit 909b890

Please sign in to comment.