Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: workspaces query to correctly user username from users table #15305

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
merged 4 commits into from
Oct 31, 2024

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Oct 31, 2024

Fixes #15302

The subquery on the users table was incorrectly using the username from the workspaces table, not the users table.

This passed sqlc-vet because the column did exist in the query, it just was not the correct one.


Note: If we do not care about deleted users, we can drop querying the Users table at all and use the owner_username on the workspaces. But then we'd get deleted users with the same name 😢

@Emyrk Emyrk changed the title chore: add unit test to verify filter by owner name fix: workspaces query to correctly user username from users table Oct 31, 2024
@Emyrk Emyrk marked this pull request as ready for review October 31, 2024 13:59
@Emyrk Emyrk requested a review from johnstcn October 31, 2024 13:59
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stamp 👍

@Emyrk Emyrk merged commit 9d03e04 into main Oct 31, 2024
25 checks passed
@Emyrk Emyrk deleted the stevenmasley/workspace_owner_name_filter branch October 31, 2024 16:33
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fail to query workspaces by owner name
2 participants