Skip to content

Commit

Permalink
fix(triggerer-replicas-short-hand-t-is-already-taken,-remove-it-from-…
Browse files Browse the repository at this point in the history
…create/update): triggerer-replicas short hand t was already taken but didnt notice on testing since i had to turn on another flag (astronomer#445)
  • Loading branch information
bote795 authored Sep 29, 2021
1 parent 2218f6f commit 698219b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func newDeploymentCreateCmd(client *houston.Client, out io.Writer) *cobra.Comman
cmd.Flags().StringVarP(&nfsLocation, "nfs-location", "n", "", "NFS Volume Mount, specified as: <IP>:/<path>. Input is automatically prepended with 'nfs://' - do not include.")
}
if deployment.CheckTriggererEnabled(client) {
cmd.Flags().IntVarP(&triggererReplicas, "triggerer-replicas", "t", 0, "Number of replicas to use for triggerer airflow component, valid 0-2")
cmd.Flags().IntVarP(&triggererReplicas, "triggerer-replicas", "", 0, "Number of replicas to use for triggerer airflow component, valid 0-2")
}
cmd.Flags().StringVarP(&executor, "executor", "e", "", "Add executor parameter: local, celery, or kubernetes")
cmd.Flags().StringVarP(&airflowVersion, "airflow-version", "a", "", "Add desired airflow version parameter: e.g: 1.10.5 or 1.10.7")
Expand Down Expand Up @@ -199,7 +199,7 @@ $ astro deployment update UUID label=Production-Airflow --dag-deployment-type=vo
cmd.Flags().StringVarP(&nfsLocation, "nfs-location", "n", "", "NFS Volume Mount, specified as: <IP>:/<path>. Input is automatically prepended with 'nfs://' - do not include.")
}
if deployment.CheckTriggererEnabled(client) {
cmd.Flags().IntVarP(&triggererReplicas, "triggerer-replicas", "t", 0, "Number of replicas to use for triggerer airflow component, valid 0-2")
cmd.Flags().IntVarP(&triggererReplicas, "triggerer-replicas", "", 0, "Number of replicas to use for triggerer airflow component, valid 0-2")
}
cmd.Flags().StringVarP(&cloudRole, "cloud-role", "c", "", "Set cloud role to annotate service accounts in deployment")
return cmd
Expand Down
2 changes: 0 additions & 2 deletions cmd/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ func TestDeploymentCreateCommandTriggererEnabled(t *testing.T) {
expectedError string
}{
{cmdArgs: []string{"deployment", "create", "new-deployment-name", "--executor=celery", "--triggerer-replicas=1"}, expectedOutput: "Successfully created deployment with Celery executor. Deployment can be accessed at the following URLs", expectedError: ""},
{cmdArgs: []string{"deployment", "create", "new-deployment-name", "--executor=celery", "-t=1"}, expectedOutput: "Successfully created deployment with Celery executor. Deployment can be accessed at the following URLs", expectedError: ""},
}
for _, tt := range myTests {
_, output, err := executeCommandC(api, tt.cmdArgs...)
Expand Down Expand Up @@ -387,7 +386,6 @@ func TestDeploymentUpdateTriggererEnabledCommand(t *testing.T) {
expectedError string
}{
{cmdArgs: []string{"deployment", "update", "cknrml96n02523xr97ygj95n5", "label=test22222", "--triggerer-replicas=1"}, expectedOutput: "Successfully updated deployment", expectedError: ""},
{cmdArgs: []string{"deployment", "update", "cknrml96n02523xr97ygj95n5", "label=test22222", "-t=1"}, expectedOutput: "Successfully updated deployment", expectedError: ""},
{cmdArgs: []string{"deployment", "update", "cknrml96n02523xr97ygj95n5", "label=test22222"}, expectedOutput: "Successfully updated deployment", expectedError: ""},
}
for _, tt := range myTests {
Expand Down

0 comments on commit 698219b

Please sign in to comment.