Skip to content

fix(coderd/database): fix limit in GetUserWorkspaceBuildParameters #11954

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 2 commits into from
Jan 31, 2024

Conversation

mafredri
Copy link
Member

This is a fix for the query introduced in #11731 where the LIMIT is applied to a list of sorted names, potentially ignoring more recently used names if the number of results exceed 100.

First we select all the unique names with their values and latest dates, then we re-sort that list by date and select the 100 most recent ones.

Alternatively, we could remove the limit entirely.

@mafredri mafredri self-assigned this Jan 31, 2024
@mafredri mafredri requested review from ammario and mtojek January 31, 2024 11:43
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

Ship it

@mafredri mafredri merged commit b25deaa into main Jan 31, 2024
@mafredri mafredri deleted the mafredri/user-param-hotfix branch January 31, 2024 11:56
@github-actions github-actions bot locked and limited conversation to collaborators Jan 31, 2024
@ammario
Copy link
Member

ammario commented Jan 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.

3 participants