Skip to content

Commit

Permalink
why still not pass?
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
  • Loading branch information
BugenZhao committed Feb 23, 2024
1 parent 52bad07 commit cf13de1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion e2e_test/source/basic/ddl.slt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ db error: ERROR: Failed to run the query
Caused by these errors (recent errors listed first):
1: gRPC request to meta service failed: Internal error
2: failed to create source worker
3: missing field `properties.bootstrap.server`
3: failed to parse json
4: missing field `properties.bootstrap.server`


statement error
Expand Down
14 changes: 7 additions & 7 deletions src/meta/service/src/cloud_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl CloudService for CloudServiceImpl {
{
return Ok(new_rwc_validate_fail_response(
ErrorType::PrivatelinkResolveErr,
e.to_string(),
e.to_report_string(),
));
}
} else {
Expand All @@ -152,7 +152,7 @@ impl CloudService for CloudServiceImpl {
if let Err(e) = props {
return Ok(new_rwc_validate_fail_response(
ErrorType::KafkaInvalidProperties,
e.to_string(),
e.to_report_string(),
));
};

Expand All @@ -167,28 +167,28 @@ impl CloudService for CloudServiceImpl {
if let Err(e) = enumerator {
return Ok(new_rwc_validate_fail_response(
ErrorType::KafkaInvalidProperties,
e.to_string(),
e.to_report_string(),
));
}
if let Err(e) = enumerator.unwrap().list_splits().await {
let error_message = e.to_string();
let error_message = e.to_report_string();
if error_message.contains("BrokerTransportFailure") {
return Ok(new_rwc_validate_fail_response(
ErrorType::KafkaBrokerUnreachable,
e.to_string(),
e.to_report_string(),
));
}
static TOPIC_NOT_FOUND: LazyLock<Regex> =
LazyLock::new(|| Regex::new(r"topic .* not found").unwrap());
if TOPIC_NOT_FOUND.is_match(error_message.as_str()) {
return Ok(new_rwc_validate_fail_response(
ErrorType::KafkaTopicNotFound,
e.to_string(),
e.to_report_string(),
));
}
return Ok(new_rwc_validate_fail_response(
ErrorType::KafkaOther,
e.to_string(),
e.to_report_string(),
));
}
});
Expand Down

0 comments on commit cf13de1

Please sign in to comment.