Skip to content

feat: persist app groups in the database #17977

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 1 commit into from
May 27, 2025
Merged

feat: persist app groups in the database #17977

merged 1 commit into from
May 27, 2025

Conversation

aslilac
Copy link
Member

@aslilac aslilac commented May 21, 2025

Part of #8237

Apps with the same agent and group name will be grouped together in the UI. On workspace build, we need to persist this value so that we can create these groupings later.

@coder coder deleted a comment from github-actions bot May 22, 2025
@aslilac aslilac marked this pull request as ready for review May 23, 2025 16:57
Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

All nits, won't block an approve

@@ -0,0 +1 @@
alter table workspace_apps add column display_group text;
Copy link
Member

Choose a reason for hiding this comment

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

the other text fields use character varying(65534),, but I think text is better 👍. Should we limit the size of the display_group??

coder/coderd/database/dump.sql

Lines 1979 to 1980 in 4931c61

command character varying(65534),
url character varying(65534),

Copy link
Member

Choose a reason for hiding this comment

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

We definitely should, as it's much easier to increase an existing limit than it is to enforce a new one. If the display_group is going to need to fit inside a similar size UI element to workspace_apps.display_name character varying(64), it may make sense to copy that limit over.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, but it should be validated by the terraform provider, or you won't notice the issue until you build a workspace. we should surface any validation issues at plan time.

Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -0,0 +1 @@
alter table workspace_apps add column display_group text;
Copy link
Member

Choose a reason for hiding this comment

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

We definitely should, as it's much easier to increase an existing limit than it is to enforce a new one. If the display_group is going to need to fit inside a similar size UI element to workspace_apps.display_name character varying(64), it may make sense to copy that limit over.

@spikecurtis
Copy link
Contributor

What is an App Group? The PR has no description or link to an issue. The terraform provider text for the "group" field just says "The name of a group that this app belongs to."

@aslilac aslilac force-pushed the lilac/app-groups branch from 4931c61 to 44ec1ab Compare May 27, 2025 18:50
@coder coder deleted a comment from github-actions bot May 27, 2025
@aslilac aslilac merged commit 9fc3329 into main May 27, 2025
39 of 40 checks passed
@aslilac aslilac deleted the lilac/app-groups branch May 27, 2025 19:13
@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2025
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.

4 participants