Support InvalidArgument
common failure status #277
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
pool
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-sdk-go#277
Loading…
Reference in a new issue
No description provided.
Delete branch "a-savchuk/frostfs-sdk-go:invalid-argument-status"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Close #274
Signed-off-by: Aleksey Savchuk a.savchuk@yadro.com
TestNodeUnderMaintenance
test d6c30ca649WIP: Supportto SupportInvalidArgument
common failure statusInvalidArgument
common failure statusSupportto WIP: SupportInvalidArgument
common failure statusInvalidArgument
common failure statusWIP: Supportto SupportInvalidArgument
common failure statusInvalidArgument
common failure status@ -115,3 +115,3 @@
stV2 := st.ToStatusV2()
require.Empty(t, "", stV2.Message())
require.Equal(t, "node is under maintenance", stV2.Message())
How did it pass earlier?
require.Empty
checks that""
is empty and it's empty indeed, so the test has succeeded.st2.Message()
was mistakenly passed as an info message to display if the test had failed.Indeed, I have written this code, seems to be copy-paste error.
@ -649,14 +649,14 @@ func TestHandleError(t *testing.T) {
},
{
ctx: ctx,
status: new(apistatus.SignatureVerification),
Why do you change unrelated tests instead of adding new ones?
There were two duplicate test cases:
{
ctx: ctx,
status: new(apistatus.SignatureVerification),
err: nil,
expectedError: true,
countError: true,
},
{
ctx: ctx,
status: new(apistatus.SignatureVerification),
err: nil,
expectedError: true,
countError: true,
},
I've deleted one of them and added a new one for the new status, but Git shows it as if I changed the existing test. Should I keep the duplicate test case?
@ -1228,2 +1228,3 @@
*apistatus.SignatureVerification,
*apistatus.NodeUnderMaintenance:
*apistatus.NodeUnderMaintenance,
*apistatus.InvalidArgument:
I'm not sure if we should count such error. It's more like
access denied
the node is working but user provide some incorrect dataTo me, it looks similar to
SignatureVerification
, because in both cases I have provided an incorrect request. So current placement seems valid.As for me, it looks a bit controversial that we count each of so called 'common failures' except that one. I'm clueless. So what's the final decision?
The difference with
SignatureVerification
for me is that SDK Client user cannot fix this error: it is returned when storage node and client work with incompatible API versions. So it is okay to increment error counter and switch endpoint eventually.InvalidArgument
on the other hand, can be fixed by SDK Client user by changing request parameters. @a-savchuk can you double check this? If it is incorrect, then let's keep it as it is.True, but why would we deliberately send invalid request in the first place? Most likely it is related to some version incompatibility too, and I doubt we can handle such errors automatically.
Anyway, I am OK with both options.
That's good point. Maybe I lack some context when
InvalidArgument
is returned.If this error returns when client structures are incompatible, then it makes sense to count this error.
If it also returns on invalid user input, then do not count this error.
We curently cannot distinguish between these 2 options, so yes, let's not count.
All done
01abee9c64
to997346ef95
New commits pushed, approval review dismissed automatically according to repository settings