diff --git a/packages/cdk/lib/roles/cromwell-engine-role.ts b/packages/cdk/lib/roles/cromwell-engine-role.ts index 53712a11..aaa083d5 100644 --- a/packages/cdk/lib/roles/cromwell-engine-role.ts +++ b/packages/cdk/lib/roles/cromwell-engine-role.ts @@ -3,7 +3,7 @@ import * as iam from "monocdk/aws-iam"; import { PolicyOptions } from "../types/engine-options"; import { BucketOperations } from "../../common/BucketOperations"; import { CromwellBatchPolicy } from "./policies/cromwell-batch-policy"; -import { Arn, ArnComponents, Stack } from "monocdk"; +import { Arn, Stack } from "monocdk"; interface CromwellEngineRoleProps { readOnlyBucketArns: string[]; diff --git a/packages/cdk/lib/roles/nextflow-adapter-role.ts b/packages/cdk/lib/roles/nextflow-adapter-role.ts index 4ab57da7..c448e28b 100644 --- a/packages/cdk/lib/roles/nextflow-adapter-role.ts +++ b/packages/cdk/lib/roles/nextflow-adapter-role.ts @@ -2,7 +2,7 @@ import * as cdk from "monocdk"; import * as iam from "monocdk/aws-iam"; import { NextflowAdapterBatchPolicy, NextflowSubmitJobBatchPolicyProps } from "./policies/nextflow-adapter-batch-policy"; import { BucketOperations } from "../../common/BucketOperations"; -import { Arn, ArnComponents } from "monocdk"; +import { Arn } from "monocdk"; import { Stack } from "monocdk"; export interface NextflowAdapterRoleProps extends NextflowSubmitJobBatchPolicyProps { diff --git a/packages/cdk/lib/roles/nextflow-engine-role.ts b/packages/cdk/lib/roles/nextflow-engine-role.ts index c9364202..2259970a 100644 --- a/packages/cdk/lib/roles/nextflow-engine-role.ts +++ b/packages/cdk/lib/roles/nextflow-engine-role.ts @@ -2,9 +2,9 @@ import * as cdk from "monocdk"; import * as iam from "monocdk/aws-iam"; import { PolicyOptions } from "../types/engine-options"; import { BucketOperations } from "../../common/BucketOperations"; -import { NextflowEngineBatchPolicy, NextflowBatchPolicyProps } from "./policies/nextflow-engine-batch-policy"; -import { NextflowAdapterBatchPolicy, NextflowSubmitJobBatchPolicyProps } from "./policies/nextflow-adapter-batch-policy"; -import { Arn, ArnComponents, Stack } from "monocdk"; +import { NextflowEngineBatchPolicy } from "./policies/nextflow-engine-batch-policy"; +import { NextflowAdapterBatchPolicy } from "./policies/nextflow-adapter-batch-policy"; +import { Arn, Stack } from "monocdk"; interface NextflowEngineRoleProps { readOnlyBucketArns: string[]; diff --git a/packages/cdk/lib/stacks/context-stack.ts b/packages/cdk/lib/stacks/context-stack.ts index 79c113af..d3514f0b 100644 --- a/packages/cdk/lib/stacks/context-stack.ts +++ b/packages/cdk/lib/stacks/context-stack.ts @@ -7,7 +7,6 @@ import { ContextAppParameters } from "../env"; import { BatchStack, BatchStackProps } from "./nested/batch-stack"; import { CromwellEngineStack } from "./nested/cromwell-engine-stack"; import { NextflowEngineStack } from "./nested/nextflow-engine-stack"; -import { ManagedPolicy } from "monocdk/aws-iam"; export interface ContextStackProps extends StackProps { readonly contextParameters: ContextAppParameters; diff --git a/packages/cdk/lib/stacks/nested/cromwell-engine-stack.ts b/packages/cdk/lib/stacks/nested/cromwell-engine-stack.ts index f858c267..392a9e52 100644 --- a/packages/cdk/lib/stacks/nested/cromwell-engine-stack.ts +++ b/packages/cdk/lib/stacks/nested/cromwell-engine-stack.ts @@ -4,7 +4,7 @@ import { CloudMapOptions, FargateTaskDefinition, LogDriver } from "monocdk/aws-e import { Construct } from "constructs"; import { ApiProxy, SecureService } from "../../constructs"; import { PrivateDnsNamespace } from "monocdk/aws-servicediscovery"; -import { IRole, Role, ServicePrincipal } from "monocdk/aws-iam"; +import { IRole } from "monocdk/aws-iam"; import { createEcrImage, renderServiceWithContainer, renderServiceWithTaskDefinition } from "../../util"; import { APP_NAME } from "../../constants"; import { Bucket } from "monocdk/aws-s3"; diff --git a/packages/cli/cmd/application/main.go b/packages/cli/cmd/application/main.go index d1d4e2d6..cadf3920 100644 --- a/packages/cli/cmd/application/main.go +++ b/packages/cli/cmd/application/main.go @@ -34,7 +34,7 @@ slug: %s type mainVars struct { docPath string - format string + format string } func init() { diff --git a/packages/cli/internal/pkg/cli/describe_output_test.go b/packages/cli/internal/pkg/cli/describe_output_test.go index c1e40e1f..475c1ea6 100644 --- a/packages/cli/internal/pkg/cli/describe_output_test.go +++ b/packages/cli/internal/pkg/cli/describe_output_test.go @@ -29,7 +29,7 @@ func TestDescribeOutput(t *testing.T) { expectedDescription: "Output of the command has following format:\nCONTEXTINSTANCE: ErrorStatus Id Info Name RunStatus RunTime StartTime\n", }, "Context": { - output: types.Context{}, + output: types.Context{}, expectedDescription: "Output of the command has following format:\nCONTEXT: MaxVCpus Name RequestSpotInstances Status" + " StatusReason\nINSTANCETYPE: Value\nOUTPUTLOCATION: Url\n", }, diff --git a/packages/cli/internal/pkg/cli/flag.go b/packages/cli/internal/pkg/cli/flag.go index fed1bff2..c3dfe519 100644 --- a/packages/cli/internal/pkg/cli/flag.go +++ b/packages/cli/internal/pkg/cli/flag.go @@ -19,7 +19,7 @@ const ( const ( FormatFlag = "format" - FormatFlagDefault = string(format.DefaultFormat) + FormatFlagDefault = string(format.DefaultFormat) FormatFlagDescription = "Format option for output. Valid options are: text, tabular" ) diff --git a/packages/cli/internal/pkg/cli/format/format.go b/packages/cli/internal/pkg/cli/format/format.go index c7371cdb..e3a1d5a0 100644 --- a/packages/cli/internal/pkg/cli/format/format.go +++ b/packages/cli/internal/pkg/cli/format/format.go @@ -1,17 +1,19 @@ package format import ( + "bytes" "os" "text/tabwriter" - "bytes" ) + var Default Formatter = NewText() type FormatterType string + const ( - textFormat FormatterType = "text" - tableFormat FormatterType = "table" - DefaultFormat = textFormat + textFormat FormatterType = "text" + tableFormat FormatterType = "table" + DefaultFormat = textFormat ) func NewText() *Text { @@ -26,8 +28,10 @@ func NewTable() *Table { func SetFormatter(format FormatterType) { switch format { - case textFormat: Default = NewText() - case tableFormat: Default = NewTable() + case textFormat: + Default = NewText() + case tableFormat: + Default = NewTable() } } diff --git a/packages/cli/internal/pkg/cli/format/table.go b/packages/cli/internal/pkg/cli/format/table.go index 607046be..4037d4a1 100644 --- a/packages/cli/internal/pkg/cli/format/table.go +++ b/packages/cli/internal/pkg/cli/format/table.go @@ -180,7 +180,7 @@ func (f *Table) appendSimpleSlice(field reflect.Value, outputList []string, row return outputList } -func (f *Table) appendSimpleValue(field reflect.Value, outputList[]string, row int) []string { +func (f *Table) appendSimpleValue(field reflect.Value, outputList []string, row int) []string { if row > 0 { outputList = append(outputList, emptyVal) } else { diff --git a/packages/cli/internal/pkg/cli/spec/context.go b/packages/cli/internal/pkg/cli/spec/context.go index c60e092e..caa5544b 100644 --- a/packages/cli/internal/pkg/cli/spec/context.go +++ b/packages/cli/internal/pkg/cli/spec/context.go @@ -24,4 +24,4 @@ func (context *Context) UnmarshalYAML(unmarshal func(interface{}) error) error { *context = Context(defaults) return nil -} \ No newline at end of file +} diff --git a/packages/cli/internal/pkg/cli/spec/project_test.go b/packages/cli/internal/pkg/cli/spec/project_test.go index bd4624b0..02515d5c 100644 --- a/packages/cli/internal/pkg/cli/spec/project_test.go +++ b/packages/cli/internal/pkg/cli/spec/project_test.go @@ -149,7 +149,6 @@ contexts: } } - func TestProjectDefaults(t *testing.T) { const yamlStr = ` name: DefaultTest