-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Boltdb-shipper] If S3 ListObjects returns the directory itself getDBNameFromObjectKey fails #3173
Conversation
Wouter D'Haeseleer seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Codecov Report
@@ Coverage Diff @@
## master #3173 +/- ##
=======================================
Coverage 63.25% 63.25%
=======================================
Files 188 188
Lines 16304 16316 +12
=======================================
+ Hits 10313 10321 +8
- Misses 5051 5055 +4
Partials 940 940
|
If that's the case the getDBNameFromObjectKey will fail to split the names based on `/`
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.
Thanks for this PR -- we definitely don't want this failing on a legitimate use case.
@sandeepsukhani Can you take a look? All looks functionally to me, but I think there might be a better way to validate these than checking the suffix in four places.
I agree with Owen, we should move it to a common place. Maybe add a helper function which would accept a list of objects as inputs and return a list of objects after removing objects which end with a |
Would you mind doing that for me? I'm not a hero in this ;-) |
I create a separate issue with these changes #3394 After pushing code to address the reviews I realized the CLA wasn't signed (likely because the email on the original commit didn't match the email on the github account) and another change also introduced a merge conflict I decided to make a separate so I can get this merged today and it should make the next release. Apologies @netdata-be, not trying to take any credit away from your finding and fixing this issue, I hope you understand! |
Chubaofs returns the following:
So the directory itself is also returned, therefore we need to skip if the object ends with a
/