Skip to content

feat: query workspaces by parameter value #10661

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

Closed
stirby opened this issue Nov 13, 2023 · 7 comments · Fixed by #12694
Closed

feat: query workspaces by parameter value #10661

stirby opened this issue Nov 13, 2023 · 7 comments · Fixed by #12694
Assignees
Labels
customer-requested Features requested by enterprise customers. Only humans may set this.

Comments

@stirby
Copy link
Collaborator

stirby commented Nov 13, 2023

Problem statement

Users should be able to query workspaces in a deployment by the set value of a coder_parameter. For example, if I wanted to list all workspaces in my organization that use a specific AWS region.

Implementation details

This could be implemented as a new query option for the list workspaces API endpoint.

If we wanted to enable multiple parameter querying:

"q": { "parameters" : [
    "param_name": "target_value",
    ...
  ]
}

Impact Notes

Customer requested feature. This can already be done by querying the resources provisioned by workspaces in some cases, but it's messy. This would be valuable for checking deprecated images, keys, and other configuration.

@cdr-bot cdr-bot bot added the feature label Nov 13, 2023
@bpmct
Copy link
Member

bpmct commented Nov 13, 2023

I like this idea, ideally you could also query this in the UI too using our search for workspaces. I always thought it would be cool if some parameter values could show up in the table too, but not exactly sure how that would work since all templates have different parametrs

@bpmct
Copy link
Member

bpmct commented Nov 20, 2023

Nice! This would help a lot for #10656 as then Backstage can determine which workspaces use which repos :)

@sreya
Copy link
Collaborator

sreya commented Nov 27, 2023

We should support both name, value for parameters so you can query for certain values of parameters

@stirby stirby added the customer-requested Features requested by enterprise customers. Only humans may set this. label Jan 12, 2024
@Kira-Pilot Kira-Pilot assigned Emyrk and unassigned kylecarbs Mar 11, 2024
@Emyrk
Copy link
Member

Emyrk commented Mar 20, 2024

I am thinking has_param:<param_name> and param:<name>=<value>. Tbd on sql query

@sreya
Copy link
Collaborator

sreya commented Mar 20, 2024

What about just param: <name>[=<value>]?

@Emyrk
Copy link
Member

Emyrk commented Mar 20, 2024

@sreya ooo I like that too.

@Emyrk
Copy link
Member

Emyrk commented Mar 20, 2024

@sreya:

NoWildCard: #12694
Wildcard: #12695

I am going to push for the wildcard. Feels more useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-requested Features requested by enterprise customers. Only humans may set this.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants