Surprisingly! The CDK deployment was successful despite of some of the test suits have failed while running the "npm test" command.
the error log is attached below
FAIL lib/lambda/mwaa-status-poller.test.ts
โ Test suite failed to run
lib/lambda/mwaa-status-poller.test.ts:33:41 - error TS2345: Argument of type 'MWAAClient' is not assignable
to parameter of type 'InstanceOrClassType<Client<ServiceInputTypes, MetadataBearer, any>>'.
Type 'MWAAClient' is not assignable to type 'Client<ServiceInputTypes, MetadataBearer, any>'.
The types of 'middlewareStack.concat' are incompatible between these types.
Type '<InputType extends ServiceInputTypes, OutputType extends ServiceOutputTypes>(from: MiddlewareSt
ack<InputType, OutputType>) => MiddlewareStack<...>' is not assignable to type '<InputType extends ServiceInput
Types, OutputType extends MetadataBearer>(from: MiddlewareStack<InputType, OutputType>) => MiddlewareStack<Inpu
tType, OutputType>'.
Types of parameters 'from' and 'from' are incompatible.
Type 'MiddlewareStack<InputType, OutputType>' is not assignable to type 'MiddlewareStack<InputTyp
e, ServiceOutputTypes>'.
Types of property 'addRelativeTo' are incompatible.
Type '(middleware: MiddlewareType<InputType, OutputType>, options: RelativeMiddlewareOptions)
=> void' is not assignable to type '(middleware: MiddlewareType<InputType, ServiceOutputTypes>, options: Relat
iveMiddlewareOptions) => void'.
Types of parameters 'middleware' and 'middleware' are incompatible.
Type 'MiddlewareType<InputType, ServiceOutputTypes>' is not assignable to type 'Middlewar
eType<InputType, OutputType>'.
Type 'InitializeMiddleware<InputType, ServiceOutputTypes>' is not assignable to type 'M
iddlewareType<InputType, OutputType>'.
Type 'InitializeMiddleware<InputType, ServiceOutputTypes>' is not assignable to type
'InitializeMiddleware<InputType, OutputType>'.
Call signature return types 'InitializeHandler<InputType, ServiceOutputTypes>' and
'InitializeHandler<InputType, OutputType>' are incompatible.
Type 'Promise<InitializeHandlerOutput<ServiceOutputTypes>>' is not assignable to
type 'Promise<InitializeHandlerOutput<OutputType>>'.
Type 'InitializeHandlerOutput<ServiceOutputTypes>' is not assignable to type 'I
nitializeHandlerOutput<OutputType>'.
Types of property 'output' are incompatible.
Type 'ServiceOutputTypes' is not assignable to type 'OutputType'.
'ServiceOutputTypes' is assignable to the constraint of type 'OutputType'
, but 'OutputType' could be instantiated with a different subtype of constraint 'MetadataBearer'.
Type 'CreateCliTokenCommandOutput' is not assignable to type 'OutputTyp
e'.
'CreateCliTokenCommandOutput' is assignable to the constraint of type
'OutputType', but 'OutputType' could be instantiated with a different subtype of constraint 'MetadataBearer'.
33 const mwaaClientMock = mockClient(mwaaClient);
~~~~~~~~~~
lib/lambda/mwaa-status-poller.test.ts:35:9 - error TS2345: Argument of type '{ Environment: { Status: strin
g; }; }' is not assignable to parameter of type 'CommandResponse<MetadataBearer>'.
Object literal may only specify known properties, and 'Environment' does not exist in type 'CommandRespon
se<MetadataBearer>'.
35 Environment: {
~~~~~~~~~~~~~~
36 Status: 'AVAILABLE',
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 },
~~~~~~~~~
lib/lambda/mwaa-status-poller.test.ts:48:41 - error TS2345: Argument of type 'MWAAClient' is not assignable
to parameter of type 'InstanceOrClassType<Client<ServiceInputTypes, MetadataBearer, any>>'.
48 const mwaaClientMock = mockClient(mwaaClient);
~~~~~~~~~~
lib/lambda/mwaa-status-poller.test.ts:50:9 - error TS2345: Argument of type '{ Environment: { Status: strin
g; }; }' is not assignable to parameter of type 'CommandResponse<MetadataBearer>'.
Object literal may only specify known properties, and 'Environment' does not exist in type 'CommandRespon
se<MetadataBearer>'.
50 Environment: {
~~~~~~~~~~~~~~
51 Status: 'CREATING',
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
52 },
~~~~~~~~~
lib/lambda/mwaa-status-poller.test.ts:63:41 - error TS2345: Argument of type 'MWAAClient' is not assignable
to parameter of type 'InstanceOrClassType<Client<ServiceInputTypes, MetadataBearer, any>>'.
63 const mwaaClientMock = mockClient(mwaaClient);
~~~~~~~~~~
lib/lambda/mwaa-status-poller.test.ts:74:41 - error TS2345: Argument of type 'MWAAClient' is not assignable
to parameter of type 'InstanceOrClassType<Client<ServiceInputTypes, MetadataBearer, any>>'.
74 const mwaaClientMock = mockClient(mwaaClient);
~~~~~~~~~~
lib/lambda/mwaa-status-poller.test.ts:87:41 - error TS2345: Argument of type 'MWAAClient' is not assignable
to parameter of type 'InstanceOrClassType<Client<ServiceInputTypes, MetadataBearer, any>>'.
87 const mwaaClientMock = mockClient(mwaaClient);
~~~~~~~~~~
lib/lambda/mwaa-status-poller.test.ts:102:41 - error TS2345: Argument of type 'MWAAClient' is not assignabl
e to parameter of type 'InstanceOrClassType<Client<ServiceInputTypes, MetadataBearer, any>>'.
102 const mwaaClientMock = mockClient(mwaaClient);
~~~~~~~~~~
lib/lambda/mwaa-status-poller.test.ts:104:9 - error TS2345: Argument of type '{ Environment: { Status: stri
ng; }; }' is not assignable to parameter of type 'CommandResponse<MetadataBearer>'.
Object literal may only specify known properties, and 'Environment' does not exist in type 'CommandRespon
se<MetadataBearer>'.
104 Environment: {
~~~~~~~~~~~~~~
105 Status: 'DELETED',
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106 },
~~~~~~~~~
lib/lambda/mwaa-status-poller.test.ts:117:41 - error TS2345: Argument of type 'MWAAClient' is not assignabl
e to parameter of type 'InstanceOrClassType<Client<ServiceInputTypes, MetadataBearer, any>>'.
117 const mwaaClientMock = mockClient(mwaaClient);
~~~~~~~~~~
lib/lambda/mwaa-status-poller.test.ts:119:9 - error TS2345: Argument of type '{ Environment: { Status: stri
ng; }; }' is not assignable to parameter of type 'CommandResponse<MetadataBearer>'.
Object literal may only specify known properties, and 'Environment' does not exist in type 'CommandRespon
se<MetadataBearer>'.
119 Environment: {
~~~~~~~~~~~~~~
120 Status: 'AVAILABLE',
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121 },
~~~~~~~~~
lib/lambda/mwaa-status-poller.test.ts:132:41 - error TS2345: Argument of type 'MWAAClient' is not assignabl
e to parameter of type 'InstanceOrClassType<Client<ServiceInputTypes, MetadataBearer, any>>'.
132 const mwaaClientMock = mockClient(mwaaClient);
~~~~~~~~~~
lib/lambda/mwaa-status-poller.test.ts:143:41 - error TS2345: Argument of type 'MWAAClient' is not assignabl
e to parameter of type 'InstanceOrClassType<Client<ServiceInputTypes, MetadataBearer, any>>'.
143 const mwaaClientMock = mockClient(mwaaClient);
~~~~~~~~~~
lib/lambda/mwaa-status-poller.test.ts:156:41 - error TS2345: Argument of type 'MWAAClient' is not assignabl
e to parameter of type 'InstanceOrClassType<Client<ServiceInputTypes, MetadataBearer, any>>'.
156 const mwaaClientMock = mockClient(mwaaClient);
~~~~~~~~~~
751.1kb2116f70b352f89c26a6269ccf1564e7343602a24a7b9a74d3f2\index.js
...2116f70b352f89c26a6269ccf1564e7343602a24a7b9a74d3f2\index.js.map 1.4mb
Done in 416ms
...7e8e1d06e543bc54c0369252189ace173091346061b7070fa7303ec\index.js 751.1kb
...1d06e543bc54c0369252189ace173091346061b7070fa7303ec\index.js.map 1.4mb
Done in 498ms
Bundling asset mwaa-main-stack/mwaa-polling-stack/mwaa-polling-polling-fn/Code/Stage...
Bundling asset mwaa-main-stack/mwaa-polling-stack/mwaa-polling-polling-fn/Code/Stage...
751.1kb6612f946fc3e6a2f5eb2d66ff30fe390b85fa298f2824109e5e\index.js
...6612f946fc3e6a2f5eb2d66ff30fe390b85fa298f2824109e5e\index.js.map 1.4mb
Done in 595ms
FAIL lib/lambda/mwaa-new-environment-function.test.ts
โ Test suite failed to run
lib/lambda/mwaa-new-environment-function.test.ts:23:29 - error TS2344: Type 'MWAAClient' does not satisfy t
he constraint 'Client<any, any, any>'.
The types of 'middlewareStack.concat' are incompatible between these types.
Type '<InputType extends ServiceInputTypes, OutputType extends ServiceOutputTypes>(from: MiddlewareStac
k<InputType, OutputType>) => MiddlewareStack<...>' is not assignable to type '<InputType extends any, OutputTyp
e extends any>(from: MiddlewareStack<InputType, OutputType>) => MiddlewareStack<InputType, OutputType>'.
Types of parameters 'from' and 'from' are incompatible.
Type 'MiddlewareStack<InputType, OutputType>' is not assignable to type 'MiddlewareStack<InputType,
ServiceOutputTypes>'.
Types of property 'addRelativeTo' are incompatible.
Type '(middleware: MiddlewareType<InputType, OutputType>, options: RelativeMiddlewareOptions) =
> void' is not assignable to type '(middleware: MiddlewareType<InputType, ServiceOutputTypes>, options: Relativ
eMiddlewareOptions) => void'.
Types of parameters 'middleware' and 'middleware' are incompatible.
Type 'MiddlewareType<InputType, ServiceOutputTypes>' is not assignable to type 'MiddlewareT
ype<InputType, OutputType>'.
Type 'InitializeMiddleware<InputType, ServiceOutputTypes>' is not assignable to type 'Mid
dlewareType<InputType, OutputType>'.
Type 'InitializeMiddleware<InputType, ServiceOutputTypes>' is not assignable to type 'I
nitializeMiddleware<InputType, OutputType>'.
Call signature return types 'InitializeHandler<InputType, ServiceOutputTypes>' and 'I
nitializeHandler<InputType, OutputType>' are incompatible.
Type 'Promise<InitializeHandlerOutput<ServiceOutputTypes>>' is not assignable to ty
pe 'Promise<InitializeHandlerOutput<OutputType>>'.
Type 'InitializeHandlerOutput<ServiceOutputTypes>' is not assignable to type 'Ini
tializeHandlerOutput<OutputType>'.
Types of property 'output' are incompatible.
Type 'ServiceOutputTypes' is not assignable to type 'OutputType'.
'ServiceOutputTypes' is assignable to the constraint of type 'OutputType',
but 'OutputType' could be instantiated with a different subtype of constraint 'any'.
Type 'CreateCliTokenCommandOutput' is not assignable to type 'OutputType'
.
'CreateCliTokenCommandOutput' is assignable to the constraint of type '
OutputType', but 'OutputType' could be instantiated with a different subtype of constraint 'any'.
23 let mwaaMock: AwsClientStub<MWAAClient>;
~~~~~~~~~~
lib/lambda/mwaa-new-environment-function.test.ts:27:5 - error TS2322: Type 'AwsStub<ServiceInputTypes, Meta
dataBearer>' is not assignable to type 'never'.
27 mwaaMock = mockClient(MWAAClient);
~~~~~~~~
lib/lambda/mwaa-new-environment-function.test.ts:27:27 - error TS2345: Argument of type 'typeof MWAAClient'
is not assignable to parameter of type 'InstanceOrClassType<Client<ServiceInputTypes, MetadataBearer, any>>'.
Type 'typeof MWAAClient' is not assignable to type 'ClassType<Client<ServiceInputTypes, MetadataBearer, a
ny>>'.
Types of property 'prototype' are incompatible.
Type 'MWAAClient' is not assignable to type 'Client<ServiceInputTypes, MetadataBearer, any>'.
27 mwaaMock = mockClient(MWAAClient);
~~~~~~~~~~
lib/lambda/mwaa-new-environment-function.test.ts:31:14 - error TS2339: Property 'restore' does not exist on
type 'never'.
31 mwaaMock.restore();
~~~~~~~
lib/lambda/mwaa-new-environment-function.test.ts:35:14 - error TS2339: Property 'on' does not exist on type
'never'.
35 mwaaMock.on(CreateEnvironmentCommand).resolves({ Arn: 'my-env-arn' });
~~
lib/lambda/mwaa-new-environment-function.test.ts:48:44 - error TS2345: Argument of type 'typeof CreateEnvir
onmentCommand' is not assignable to parameter of type 'new (input: CreateEnvironmentCommandInput) => AwsCommand
<CreateEnvironmentCommandInput, MetadataBearer, any, any>'.
Types of construct signatures are incompatible.
Type 'new (input: CreateEnvironmentCommandInput) => CreateEnvironmentCommand' is not assignable to type
'new (input: CreateEnvironmentCommandInput) => AwsCommand<CreateEnvironmentCommandInput, MetadataBearer, any,
any>'.
Construct signature return types 'CreateEnvironmentCommand' and 'AwsCommand<CreateEnvironmentCommandI
nput, MetadataBearer, any, any>' are incompatible.
The types of 'middlewareStack.concat' are incompatible between these types.
Type '<InputType extends CreateEnvironmentCommandInput, OutputType extends CreateEnvironmentComma
ndOutput>(from: MiddlewareStack<InputType, OutputType>) => MiddlewareStack<...>' is not assignable to type '<In
putType extends CreateEnvironmentCommandInput, OutputType extends MetadataBearer>(from: MiddlewareStack<InputTy
pe, OutputType>) => MiddlewareStack<...>'.
Types of parameters 'from' and 'from' are incompatible.
Type 'MiddlewareStack<InputType, OutputType>' is not assignable to type 'MiddlewareStack<Inpu
tType, CreateEnvironmentCommandOutput>'.
Types of property 'addRelativeTo' are incompatible.
Type '(middleware: MiddlewareType<InputType, OutputType>, options: RelativeMiddlewareOpti
ons) => void' is not assignable to type '(middleware: MiddlewareType<InputType, CreateEnvironmentCommandOutput>
, options: RelativeMiddlewareOptions) => void'.
Types of parameters 'middleware' and 'middleware' are incompatible.
Type 'MiddlewareType<InputType, CreateEnvironmentCommandOutput>' is not assignable to
type 'MiddlewareType<InputType, OutputType>'.
Type 'InitializeMiddleware<InputType, CreateEnvironmentCommandOutput>' is not assig
nable to type 'MiddlewareType<InputType, OutputType>'.
Type 'InitializeMiddleware<InputType, CreateEnvironmentCommandOutput>' is not ass
ignable to type 'InitializeMiddleware<InputType, OutputType>'.
Call signature return types 'InitializeHandler<InputType, CreateEnvironmentComm
andOutput>' and 'InitializeHandler<InputType, OutputType>' are incompatible.
Type 'Promise<InitializeHandlerOutput<CreateEnvironmentCommandOutput>>' is no
t assignable to type 'Promise<InitializeHandlerOutput<OutputType>>'.
Type 'InitializeHandlerOutput<CreateEnvironmentCommandOutput>' is not assig
nable to type 'InitializeHandlerOutput<OutputType>'.
Types of property 'output' are incompatible.
Type 'CreateEnvironmentCommandOutput' is not assignable to type 'Output
Type'.
'CreateEnvironmentCommandOutput' is assignable to the constraint of t
ype 'OutputType', but 'OutputType' could be instantiated with a different subtype of constraint 'MetadataBearer
'.
48 expect(mwaaMock).toHaveReceivedCommand(CreateEnvironmentCommand);
~~~~~~~~~~~~~~~~~~~~~~~~
lib/lambda/mwaa-new-environment-function.test.ts:53:14 - error TS2339: Property 'on' does not exist on type
'never'.
53 mwaaMock.on(CreateEnvironmentCommand).resolves({ Arn: 'my-env-arn' });
~~
lib/lambda/mwaa-new-environment-function.test.ts:66:44 - error TS2345: Argument of type 'typeof CreateEnvir
onmentCommand' is not assignable to parameter of type 'new (input: CreateEnvironmentCommandInput) => AwsCommand
<CreateEnvironmentCommandInput, MetadataBearer, any, any>'.
66 expect(mwaaMock).toHaveReceivedCommand(CreateEnvironmentCommand);
~~~~~~~~~~~~~~~~~~~~~~~~
lib/lambda/mwaa-new-environment-function.test.ts:71:14 - error TS2339: Property 'on' does not exist on type
'never'.
71 mwaaMock.on(CreateEnvironmentCommand).resolves({ Arn: 'my-env-arn' });
~~
lib/lambda/mwaa-new-environment-function.test.ts:83:44 - error TS2345: Argument of type 'typeof CreateEnvir
onmentCommand' is not assignable to parameter of type 'new (input: CreateEnvironmentCommandInput) => AwsCommand
<CreateEnvironmentCommandInput, MetadataBearer, any, any>'.
83 expect(mwaaMock).toHaveReceivedCommand(CreateEnvironmentCommand);
~~~~~~~~~~~~~~~~~~~~~~~~
index.js 751.1kba054fefd21e607937ea05e4a747d9332fde7ae9e27b\
...65a65c13a054fefd21e607937ea05e4a747d9332fde7ae9e27b\index.js.map 1.4mb
Done in 826ms
...3bfa0d44d2ded8898c8cd3b5072331489d93f5f6b6310a52effd6e5\index.js 751.1kb
...0d44d2ded8898c8cd3b5072331489d93f5f6b6310a52effd6e5\index.js.map 1.4mb
Done in 693ms
751.1kbba9ad7dc1df6a71b563b9d8398c3d9db20ab4ef86dc0e1ff8a4a0\index.js
...9ad7dc1df6a71b563b9d8398c3d9db20ab4ef86dc0e1ff8a4a0\index.js.map 1.4mb
Done in 641ms
Bundling asset mwaa-main-stack/mwaa-polling-stack/mwaa-polling-polling-fn/Code/Stage...
Bundling asset mwaa-main-stack/mwaa-polling-stack/mwaa-polling-polling-fn/Code/Stage...
Bundling asset mwaa-main-stack/mwaa-polling-stack/mwaa-polling-polling-fn/Code/Stage...
Bundling asset mwaa-main-stack/mwaa-polling-stack/mwaa-polling-polling-fn/Code/Stage...
FAIL lib/lambda/dags-cli.test.ts
โ Test suite failed to run
lib/lambda/dags-cli.test.ts:24:29 - error TS2344: Type 'MWAAClient' does not satisfy the constraint 'Client
<any, any, any>'.
24 let mwaaMock: AwsClientStub<MWAAClient>;
~~~~~~~~~~
lib/lambda/dags-cli.test.ts:49:7 - error TS2322: Type 'AwsStub<ServiceInputTypes, MetadataBearer>' is not a
ssignable to type 'never'.
49 mwaaMock = mockClient(MWAAClient);
~~~~~~~~
lib/lambda/dags-cli.test.ts:49:29 - error TS2345: Argument of type 'typeof MWAAClient' is not assignable to
parameter of type 'InstanceOrClassType<Client<ServiceInputTypes, MetadataBearer, any>>'.
49 mwaaMock = mockClient(MWAAClient);
~~~~~~~~~~
lib/lambda/dags-cli.test.ts:50:16 - error TS2339: Property 'on' does not exist on type 'never'.
50 mwaaMock.on(CreateCliTokenCommand).resolves(token);
~~
lib/lambda/dags-cli.test.ts:54:16 - error TS2339: Property 'restore' does not exist on type 'never'.
54 mwaaMock.restore();
~~~~~~~
lib/lambda/dags-cli.test.ts:75:48 - error TS2345: Argument of type 'typeof CreateCliTokenCommand' is not as
signable to parameter of type 'new (input: CreateCliTokenCommandInput) => AwsCommand<CreateCliTokenCommandInput
, MetadataBearer, any, any>'.
Types of construct signatures are incompatible.
Type 'new (input: CreateCliTokenCommandInput) => CreateCliTokenCommand' is not assignable to type 'new
(input: CreateCliTokenCommandInput) => AwsCommand<CreateCliTokenCommandInput, MetadataBearer, any, any>'.
Construct signature return types 'CreateCliTokenCommand' and 'AwsCommand<CreateCliTokenCommandInput,
MetadataBearer, any, any>' are incompatible.
The types of 'middlewareStack.concat' are incompatible between these types.
Type '<InputType extends CreateCliTokenCommandInput, OutputType extends CreateCliTokenCommandOutp
ut>(from: MiddlewareStack<InputType, OutputType>) => MiddlewareStack<...>' is not assignable to type '<InputTyp
e extends CreateCliTokenCommandInput, OutputType extends MetadataBearer>(from: MiddlewareStack<InputType, Outpu
tType>) => MiddlewareStack<...>'.
Types of parameters 'from' and 'from' are incompatible.
Type 'MiddlewareStack<InputType, OutputType>' is not assignable to type 'MiddlewareStack<Inpu
tType, CreateCliTokenCommandOutput>'.
Types of property 'addRelativeTo' are incompatible.
Type '(middleware: MiddlewareType<InputType, OutputType>, options: RelativeMiddlewareOpti
ons) => void' is not assignable to type '(middleware: MiddlewareType<InputType, CreateCliTokenCommandOutput>, o
ptions: RelativeMiddlewareOptions) => void'.
Types of parameters 'middleware' and 'middleware' are incompatible.
Type 'MiddlewareType<InputType, CreateCliTokenCommandOutput>' is not assignable to ty
pe 'MiddlewareType<InputType, OutputType>'.
Type 'InitializeMiddleware<InputType, CreateCliTokenCommandOutput>' is not assignab
le to type 'MiddlewareType<InputType, OutputType>'.
Type 'InitializeMiddleware<InputType, CreateCliTokenCommandOutput>' is not assign
able to type 'InitializeMiddleware<InputType, OutputType>'.
Call signature return types 'InitializeHandler<InputType, CreateCliTokenCommand
Output>' and 'InitializeHandler<InputType, OutputType>' are incompatible.
Type 'Promise<InitializeHandlerOutput<CreateCliTokenCommandOutput>>' is not a
ssignable to type 'Promise<InitializeHandlerOutput<OutputType>>'.
Type 'InitializeHandlerOutput<CreateCliTokenCommandOutput>' is not assignab
le to type 'InitializeHandlerOutput<OutputType>'.
Types of property 'output' are incompatible.
Type 'CreateCliTokenCommandOutput' is not assignable to type 'OutputTyp
e'.
'CreateCliTokenCommandOutput' is assignable to the constraint of type
'OutputType', but 'OutputType' could be instantiated with a different subtype of constraint 'MetadataBearer'.
75 expect(mwaaMock).toHaveReceivedCommand(CreateCliTokenCommand);
~~~~~~~~~~~~~~~~~~~~~
lib/lambda/dags-cli.test.ts:85:53 - error TS2345: Argument of type 'typeof CreateCliTokenCommand' is not as
signable to parameter of type 'new (input: CreateCliTokenCommandInput) => AwsCommand<CreateCliTokenCommandInput
, MetadataBearer, any, any>'.
Types of construct signatures are incompatible.
Type 'new (input: CreateCliTokenCommandInput) => CreateCliTokenCommand' is not assignable to type 'new
(input: CreateCliTokenCommandInput) => AwsCommand<CreateCliTokenCommandInput, MetadataBearer, any, any>'.
Type 'CreateCliTokenCommand' is not assignable to type 'AwsCommand<CreateCliTokenCommandInput, Metada
taBearer, any, any>'.
85 expect(mwaaMock).toHaveReceivedCommandTimes(CreateCliTokenCommand, 1);
~~~~~~~~~~~~~~~~~~~~~
index.js 384.8kb27b2213755c3705b8200742b12aca8e2315aeef9d35\
...795a606727b2213755c3705b8200742b12aca8e2315aeef9d35\index.js.map 800.3kb