-
Notifications
You must be signed in to change notification settings - Fork 591
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
fix: Kinesis: NextToken and StreamName cannot be provided together #17687
Conversation
…ption: NextToken and StreamName cannot be provided together." Signed-off-by: tabVersion <[email protected]>
Signed-off-by: tabVersion <[email protected]>
Signed-off-by: tabVersion <[email protected]>
next_token = None; | ||
continue; | ||
} | ||
bail!("Kinesis ListShards service error: {}", e.to_report_string()); |
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.
Please refer to the guide to replace it with .context
.
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.
Kinesis SdkError has one generic param, seems cannot fit into ConnectorError Impl
pub type SdkError<E, R = ::aws_smithy_runtime_api::client::orchestrator::HttpResponse> = ::aws_smithy_runtime_api::client::result::SdkError<E, R>;
def_anyhow_newtype! {
pub ConnectorError,
// Common errors
std::io::Error => transparent,
// Fine-grained connector errors
AccessError => transparent,
WireFormatError => transparent,
ConcurrentRequestError => transparent,
InvalidOptionError => transparent,
SinkError => transparent,
PbFieldNotFound => transparent,
// TODO(error-handling): Remove implicit contexts below and specify ad-hoc context for each conversion.
// Parsing errors
url::ParseError => "failed to parse url",
serde_json::Error => "failed to parse json",
csv::Error => "failed to parse csv",
uuid::Error => transparent, // believed to be self-explanatory
// Connector errors
opendal::Error => transparent, // believed to be self-explanatory
parquet::errors::ParquetError => transparent,
ArrayError => "Array error",
sqlx::Error => transparent, // believed to be self-explanatory
mysql_async::Error => "MySQL error",
tokio_postgres::Error => "Postgres error",
apache_avro::Error => "Avro error",
rdkafka::error::KafkaError => "Kafka error",
pulsar::Error => "Pulsar error",
aws_sdk_kinesis::error => "Kinesis error",
async_nats::jetstream::consumer::StreamError => "Nats error",
async_nats::jetstream::consumer::pull::MessagesError => "Nats error",
async_nats::jetstream::context::CreateStreamError => "Nats error",
async_nats::jetstream::stream::ConsumerError => "Nats error",
icelake::Error => "Iceberg error",
iceberg::Error => "IcebergV2 error",
redis::RedisError => "Redis error",
arrow_schema::ArrowError => "Arrow error",
arrow_schema_iceberg::ArrowError => "Arrow error",
google_cloud_pubsub::client::google_cloud_auth::error::Error => "Google Cloud error",
rumqttc::tokio_rustls::rustls::Error => "TLS error",
rumqttc::v5::ClientError => "MQTT error",
rumqttc::v5::OptionError => "MQTT error",
mongodb::error::Error => "Mongodb error",
openssl::error::ErrorStack => "OpenSSL error",
}
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.
Can you just simply try return Err(anyhow!(e).context("failed to list kinesis shards").into())
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.
Oh I think it just works.
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.
Can you add the background in the description? Specifically, when does this cause problem?
BTW, this might demonstrate the need for #17116
Updated. And maybe, we have so much work to do, I am saying good to have but hard to tell the priority. |
Signed-off-by: tabVersion <[email protected]>
Signed-off-by: tabVersion <[email protected]>
…17687) Signed-off-by: tabVersion <[email protected]> Signed-off-by: tabVersion <[email protected]> Co-authored-by: tabVersion <[email protected]>
…17687) Signed-off-by: tabVersion <[email protected]> Signed-off-by: tabVersion <[email protected]> Co-authored-by: tabVersion <[email protected]>
…17687) (#17878) Signed-off-by: tabVersion <[email protected]> Signed-off-by: tabVersion <[email protected]> Co-authored-by: Bohan Zhang <[email protected]> Co-authored-by: tabVersion <[email protected]>
…17687) (#17877) Signed-off-by: tabVersion <[email protected]> Signed-off-by: tabVersion <[email protected]> Co-authored-by: Bohan Zhang <[email protected]> Co-authored-by: tabVersion <[email protected]>
…ption: NextToken and StreamName cannot be provided together."
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
as title, the constraint is described in API doc
https://docs.rs/aws-sdk-kinesis/latest/aws_sdk_kinesis/operation/list_shards/struct.ListShardsInput.html
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.