-
Notifications
You must be signed in to change notification settings - Fork 590
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
chore(sink): validate file sink when creating #18707
Conversation
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.
lgtm, possible to add an e2e test case?
match self.op.list(&self.path).await { | ||
Ok(_) => Ok(()), | ||
Err(e) => Err(anyhow!(e) | ||
.context("Fail to create sink, please check your config.") | ||
.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.
nit style improvement
match self.op.list(&self.path).await { | |
Ok(_) => Ok(()), | |
Err(e) => Err(anyhow!(e) | |
.context("Fail to create sink, please check your config.") | |
.into()), | |
_ = self.op.list(&self.path).await.with_context(|| format!("failed to list path: {}", self.path)) |
Besides, "Fail to create sink, please check your config." doesn't provide useful information to users. If we want to add this, it should be in upper layer, e.g., CREATE SINK
handler, instead of here.
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.
"Fail to create sink, please check your config." doesn't provide useful information to users
The specific failure reason will be output below this line, so the user can get the specific information through the error.
Caused by these errors (recent errors listed first):
1: gRPC request to meta service failed: Internal error
2: failed to validate sink
3: Fail to create sink, please check your config.
4: PermissionDenied (persistent) at List::next, context: { uri: http://127.0.0.1:9301/hummock001?delimiter=%2F&list-type=2&prefix=test2, response: Parts { status: 403, version: HTTP/1.1, headers: {“connection”: “close”, “content-length”: “407", “accept-ranges”: “bytes”, “content-type”: “application/xml”, “date”: “Thu, 26 Sep 2024 06:17:52 GMT”, “server”: “MinIO”, “strict-transport-security”: “max-age=31536000; includeSubDomains”, “vary”: “Origin”, “vary”: “Accept-Encoding”, “x-amz-id-2”: “5e0466557790194f71acb9d44341f26b381bbf7ca42536c367b0a3b121df5c06", “x-amz-request-id”: “17F8B6D2A6E07AF0", “x-content-type-options”: “nosniff”, “x-xss-protection”: “1; mode=block”} }, service: s3, path: test2, listed: 0 } => S3Error { code: “SignatureDoesNotMatch”, message: “The request signature we calculated does not match the signature you provided. Check your key and signing method.“, resource: “/hummock001”, request_id: “17F8B6D2A6E07AF0" }
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.
I mean this sentence "3: Fail to create sink, please check your config" doesn't add any value.
Line 2 (general message) and line 4 (specific message) are useful. Line 3 are similar to line 2
So we should either remove line 3, or merge it into line 2.
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
as title, otherwise it will not raise error as we enable sink decouple.
close #18228
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.