Skip to content
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

Merged
merged 4 commits into from
Jul 1, 2024

Conversation

josvazg
Copy link
Collaborator

@josvazg josvazg commented May 27, 2024

Extending the state machine to handle the not found error case as well explicitly:

graphviz (4)

All Submissions:

  • Have you signed our CLA?

@josvazg josvazg marked this pull request as draft May 27, 2024 12:21
@josvazg josvazg requested a review from s-urbaniak May 27, 2024 12:21
@josvazg josvazg force-pushed the CLOUDP-249804/atlassearch-error-states branch from d6b21f7 to 2952807 Compare May 29, 2024 10:22
@josvazg josvazg force-pushed the CLOUDP-249804/atlassearch-error-states branch from 2952807 to c49cab4 Compare May 29, 2024 10:28
@josvazg josvazg force-pushed the CLOUDP-249804/atlassearch-error-states branch from c49cab4 to 4746526 Compare June 24, 2024 11:31
@josvazg josvazg changed the base branch from atlassearch-translation to main June 24, 2024 11:32
@josvazg josvazg marked this pull request as ready for review June 24, 2024 11:51
Comment on lines +86 to 88
inAtlas := stateInAtlas != nil
inSpec := stateInAKO != nil

Copy link
Collaborator

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

Copy link
Collaborator Author

@josvazg josvazg Jul 1, 2024

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

Copy link
Collaborator

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

Copy link
Collaborator Author

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.

@josvazg josvazg merged commit 1fd6e0d into main Jul 1, 2024
57 of 63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants