-
Notifications
You must be signed in to change notification settings - Fork 73
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
CLOUDP-249804: Add Not found to search state machine #1612
Conversation
d6b21f7
to
2952807
Compare
eb554be
to
0693424
Compare
2952807
to
c49cab4
Compare
0693424
to
ac5d63f
Compare
ac5d63f
to
423f264
Compare
Signed-off-by: jose.vazquez <jose.vazquez@mongodb.com>
c49cab4
to
4746526
Compare
inAtlas := stateInAtlas != nil | ||
inSpec := stateInAKO != nil | ||
|
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.
Why? But it's okay, I guess
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.
This is for readability. The statements inAtlas
or inSpec
are affirmative, so they read better both alone if inAtlas
or when negated if !inAtlas
. Where as empty...
is a negative statement, which feels like always reversing logic once or twice when you read emptyInAtlas && !emptyInAKO
. For example: !emptyInAKO
means just present or inSpec
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.
Then I'd rename those to be inAtlas
and inAKO
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'd say Spec is more accurate and avoids explaining an acronym. We use AKO too much. But I agree we are not consistent, even in this PR.
Extending the state machine to handle the not found error case as well explicitly:
All Submissions: