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

[db] fix adminGetWorkspaces/findAllWorkspaceAndInstances #10825

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

AlexTugarev
Copy link
Member

Description

This PR fixes a SQL query bug in the admin dashboard, which causes to return an empty page instead the list of a user's workspaces.

How to test

Verify that workspaces are shown as expected in the admin panel.

Release Notes

Fix a SQL query bug on admin panel.

Documentation

Werft options:

  • /werft with-preview

@AlexTugarev AlexTugarev requested a review from a team June 22, 2022 13:41
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Jun 22, 2022
@laushinka
Copy link
Contributor

laushinka commented Jun 23, 2022

/werft run

👍 started the job as gitpod-build-at-fix-admingetworkspaces.1
(with .werft/ from main)

@AlexTugarev
Copy link
Member Author

AlexTugarev commented Jun 24, 2022

/werft run with-preview

👍 started the job as gitpod-build-at-fix-admingetworkspaces.2
(with .werft/ from main)

@geropl geropl self-assigned this Jun 24, 2022
@@ -1048,7 +1048,7 @@ export abstract class AbstractTypeORMWorkspaceDBImpl implements WorkspaceDB {
.createQueryBuilder("ws")
// We need to put the subquery into the join condition (ON) here to be able to reference `ws.id` which is
// not possible in a subquery on JOIN (e.g. 'LEFT JOIN (SELECT ... WHERE i.workspaceId = ws.id)')
.leftJoinAndMapOne(
.innerJoinAndMapOne(
Copy link
Member

Choose a reason for hiding this comment

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

Have my upvote for super-power one-line fix 💪 🦸

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

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

LGTM!

@roboquat roboquat merged commit eb79aef into main Jun 24, 2022
@roboquat roboquat deleted the at/fix-adminGetWorkspaces branch June 24, 2022 06:37
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note size/XS team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants