Skip to content

feat(cli): add --parameter flag to exp scaletest command#10132

Merged
johnstcn merged 1 commit into
mainfrom
cj/scaletest-parameter-flag
Oct 9, 2023
Merged

feat(cli): add --parameter flag to exp scaletest command#10132
johnstcn merged 1 commit into
mainfrom
cj/scaletest-parameter-flag

Conversation

@johnstcn
Copy link
Copy Markdown
Member

@johnstcn johnstcn commented Oct 9, 2023

This PR adds support for passing parameters to workspaces built by exp scaletest.

@johnstcn johnstcn self-assigned this Oct 9, 2023
@johnstcn johnstcn marked this pull request as ready for review October 9, 2023 12:19
@johnstcn johnstcn requested review from mafredri and mtojek October 9, 2023 12:19
Comment thread cli/exp_scaletest.go
richParameters, err := prepWorkspaceBuild(inv, client, prepWorkspaceBuildArgs{
Action: WorkspaceCreate,
Template: tpl,
NewWorkspaceName: "scaletest-%", // TODO: the scaletest runner will pass in a different name here. Does this matter?
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@mtojek Does the value here only matter for showing the plan output?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, only for dry-run purposes. Not sure what happens if there is a workspace with such name exists. In the worst case, you can append a random number.

Copy link
Copy Markdown
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

ok!

Comment thread cli/exp_scaletest.go
richParameters, err := prepWorkspaceBuild(inv, client, prepWorkspaceBuildArgs{
Action: WorkspaceCreate,
Template: tpl,
NewWorkspaceName: "scaletest-%", // TODO: the scaletest runner will pass in a different name here. Does this matter?
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, only for dry-run purposes. Not sure what happens if there is a workspace with such name exists. In the worst case, you can append a random number.

Comment thread cli/exp_scaletest.go

useHostUser bool

parameterFlags workspaceParameterFlags
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FYI This may also pull --build-options, not sure if you want to support them too. Probably not.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't see a need at present. We don't rebuild workspaces in this command, only create.

@johnstcn johnstcn merged commit 5673aca into main Oct 9, 2023
@johnstcn johnstcn deleted the cj/scaletest-parameter-flag branch October 9, 2023 13:08
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 9, 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