Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(cli): add template filter support to exp scaletest cleanup and traffic #10558

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

Conversation

mafredri
Copy link
Member

@mafredri mafredri commented Nov 7, 2023

This is change allows using --tempalte for both cleanup and workspace-traffic to target specific workspaces created from that template.

Part of #8556

@mafredri mafredri self-assigned this Nov 7, 2023
@mafredri mafredri requested a review from johnstcn November 7, 2023 12:56
@mafredri mafredri force-pushed the mafredri/cli-exp-scaletest-add-template-filter-for-workspaces branch from 7029b02 to 4b2ec25 Compare November 7, 2023 12:56
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

Would it not make more sense instead to allow specifying a raw filter query that gets passed to the WorkspaceFilter?

This would still allow you to do e.g. coder exp scaletest workspace-traffic --filter template:some-template while also allowing more flexibility around future query needs for roughly the same amount of overall effort.

@mafredri
Copy link
Member Author

mafredri commented Nov 7, 2023

Would it not make more sense instead to allow specifying a raw filter query that gets passed to the WorkspaceFilter?

This would still allow you to do e.g. coder exp scaletest workspace-traffic --filter template:some-template while also allowing more flexibility around future query needs for roughly the same amount of overall effort.

I'm open to making the change, but did you have a use-case in mind? As the tool is currently, I don't see a whole lot of benefit.

@johnstcn
Copy link
Member

johnstcn commented Nov 7, 2023

Would it not make more sense instead to allow specifying a raw filter query that gets passed to the WorkspaceFilter?
This would still allow you to do e.g. coder exp scaletest workspace-traffic --filter template:some-template while also allowing more flexibility around future query needs for roughly the same amount of overall effort.

I'm open to making the change, but did you have a use-case in mind? As the tool is currently, I don't see a whole lot of benefit.

Up to you if you don't see a need for it, it just seemed like an easy way to get more flexibility for the same amount of work!

@mafredri
Copy link
Member Author

mafredri commented Nov 7, 2023

Up to you if you don't see a need for it, it just seemed like an easy way to get more flexibility for the same amount of work!

It was a good suggestion! For now I think it'll be simpler to keep it as-is since it matches the flag given to create-workspace and we get validation that a proper template name is given (vs empty result).

@mafredri mafredri enabled auto-merge (squash) November 7, 2023 16:37
@mafredri mafredri merged commit 43a8674 into main Nov 7, 2023
@mafredri mafredri deleted the mafredri/cli-exp-scaletest-add-template-filter-for-workspaces branch November 7, 2023 16:41
@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2023
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.

2 participants