-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[server] Fix mismatch collation issue in workspace instance metrics query #20933
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
Conversation
"wsi.metrics", | ||
DBWorkspaceInstanceMetrics, | ||
"wsim", | ||
"wsim.instanceId COLLATE utf8mb4_general_ci = wsi.id COLLATE utf8mb4_general_ci", |
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.
The 2nd COLLATE
is superfluous.
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.
But also... why not leave it as-is, looking at the mess in some of the tables schemas... 🫠
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.
But also... why not leave it as-is, looking at the mess in some of the tables schemas... 🫠
I did it because of the original request XD "Maybe we can fix that in the query itself (there is a way to force a collation on the fly)."
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.
Yep, update schema will be a better idea, let's merge current PR first
@mustard-mh The test instructions are not correct; they always work because there is not difference between metritcs and instance tables.
Otherwise the change works! 👍 |
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.
Changes LGTM, tested and works! ✔️
Description
Search in codebase with
d_b_org_env_var
,d_b_workspace_instance_metrics
,DBOrgEnvVar
,DBWorkspaceInstanceMetrics
(which table is altered in the last db migration) and check their usage, make sure the joined rows are using the same collationRelated Issue(s)
Fixes CLC-1500
How to test
Verify in real case
Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold