-
Notifications
You must be signed in to change notification settings - Fork 943
fix: fix workspace status filter returning more statuses that requested #7732
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
Merged
+347
−84
Merged
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c0e2804
WIP unit test for workspace statuses
Emyrk 50b2873
Fix permission issues of dbgen
Emyrk 2cb3ece
Write unit test for workspace status
Emyrk 7d4b7ea
Add unit test for statuses
Emyrk 93d8bf9
Import order
Emyrk 6fd2b21
Fix test for slow cases
Emyrk a4ba58d
Add unit test to check for filter status
Emyrk 8704afd
Match dbfake to postgres
Emyrk 01e9fb0
Fix test
Emyrk befd8eb
Linting
Emyrk 558ef48
Linting
Emyrk aee97f8
Add dbauthz system comment
Emyrk f6857d5
Fix comment
Emyrk 985e821
Merge remote-tracking branch 'origin/main' into stevenmasley/workspac…
Emyrk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add unit test to check for filter status
- Loading branch information
commit a4ba58d3e22b71295f6d11543dacc5769825f4d0
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
these tests are great and all, but they are not combinatorially exhaustive on null vs non-null for all fields. This is another reason I think a stored procedure for the status is better.
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.
It is definitely not exhaustive. The annoying thing too is when we prepulate this much data (which isn't even that much), the postgres test gets so slow. So I skipped it in CI, meaning this bug could easily pop up again silently 😢.
I was debating about putting in a batch insert SQL query outside our typical db interface and see if it is faster. If we go the stored procedure route, might be worth investigating how to make the postgres test run in a reasonable amount of time.
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 wonder if the slowness is related to how we have to create the job, then acqui 8000 re it, then fail/complete it. Acquiring in particular might be slow because of the locking we do.
In testing we could have some queries that directly insert the job in the state we want it. Not exposed on the main
Store
interface, but available if you type assert to a test type.