-
Notifications
You must be signed in to change notification settings - Fork 4k
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
‼️ NOTICE | apigateway: Unable to serialize value as aws-cdk-lib.aws_apigateway.IModel
#21902
‼️ NOTICE | apigateway: Unable to serialize value as aws-cdk-lib.aws_apigateway.IModel
#21902
Comments
Can you please share how you're using the empty model? It is working fine for me |
ditto for me + my usage:
|
Something is really off in here, I went down to 2.35 through 2.40 and in each release I am seeing this error in CICD pipeline. |
Could you post the full reproduction code you've used @kornicameister? |
Not really, code is proprietary. I will try and check if I can replicate that. On the other hand: tests or synth are failing for me only in CICD. Locally synth is working and tests are green. Most likely something differs between environments. I am using python, so I will just recreate environment and see if situation from CICD happens then. |
Ok, I don't have a reproduction yet, I just managed to confirm that if I recreated a virtualenv (I am using python bindings) and went from 2.40.0 to 2.36.0 each time running same test and doing:
each time if has failed with: so fresh environment gave me a consistent result around error. @peterwoodworth can you try with a fresh environment too? |
you might find that your "software.amazon.jsii" has upgraded to 1.67.0. This seems to be the problem. I downgraded to 1.66.0 and the problem went away. |
@cn-cit it actually helped. |
I use the cdk with java as a maven project. I just added this as a dependency in the pom. Not sure how to do it with other environments. |
@cn-cit @kornicameister, thanks for pointing this out. Yes, it seems that jsii 1.67.0 is culprit introducing this problem. I'm able to confirm after explicitly downgrading to jsii 1.66.0 in my requirements.txt file instead of 1.67.0 local cdk synth and my code pipeline is now working. This matches my experience on Friday Sept 2 I first experienced this when my CDK pipeline must have pulled in jsii 1.67.0 which was also released 2 days ago. 4 hours prior to 1.67.0 being released my CDK pipeline was working fine, but then started to fail after it was released. |
Same thing is happening with the Java version of the CDK.
Pinning the JSII version to 1.66.0 fixes the issue. |
Hi guys, The version of jsii.runtime upgraded from 1.66.0 to 1.67.0 by her own. How could it be possible ? |
For Gradle, we can use Gradle's dependency constraints In
|
I can confirm that pinning jsii to version 1.66.0 works on local environments. But when trying to run it from codepipeline we get the same error after pinning jsii==1.66.0 in requirements.txt |
@nixenos that's odd, I have a CICD and after making a change and not even clearing a cache, tests passed + synth happened. |
Hi. For Python users it needs to be specified explicitly under requirements.txt |
This is very strange yesterday after we set the dependency |
@phamngocthanhtrung I had the same issue this morning and had to add exclusions to my Maven pom file to make it work again. You probably have to do something simililar.
|
Yeah it was issue on my part :D, pinning to 1.66.0 works in pipelines also |
You're both getting a notice. A warning that had been added since, waiting for the fix. |
Just a clarification, as mentioned by @zessx - the notice you're seeing in the CLI is not an error. It's just our way of letting you know about this important issue, that may affect your application. You will see this as long as your framework version (aws-cdk-lib) is greater or equal to 2.41.0, even if the toolkit version is below that. You will see it even if not using APIGateway because this issue might affect other constructs as well. As long as Fix is in the oven. |
It does however look like the notice is being sent out to unaffected versions as well. Sorry about that, feel free to ignore if your version doesn't fall into the mentioned range. |
Hi team, Just received this message. Not sure what is happening since it didn't happen earlier today ` 21902 apigateway: Unable to serialize value as aws-cdk-lib.aws_apigateway.IModel
If you don’t want to see a notice anymore, use "cdk acknowledge ". For example, "cdk acknowledge 21902". |
I g
I just got the same message now, trying to deploy |
The message is appearing even if you aren't using any of the |
+1 |
1 similar comment
👍 |
We fixed the notice. It should not be sent anymore if you framework version is not in these ranges:
Please note though, it will be shown even if you're not using apigateway. This is intentional as is NOT an error. This issue might be causing the same problem with other constructs, so its better to be aware of it. |
A new version of jsii has been released that solves this issue: https://github.com/aws/jsii/releases/tag/v1.68.0 I've updated the workaround to pin your jsii version to 1.68.0. We are working on releasing a patch version of the CDK so this pinning won't be necessary. |
I still see the same issue with pom.xml
The same issue running the example https://github.com/aws-samples/aws-cdk-examples/tree/master/java/hello-world
aws cli version is
|
One more correction: v1 is not actually susceptible to this. If you are using v1, you shouldn't be seeing the notice anymore. |
…for non TS / JS language (#22204) See https://github.com/aws/jsii/releases/tag/v1.68.0 Fixes #21902 ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…for non TS / JS language (#22204) See https://github.com/aws/jsii/releases/tag/v1.68.0 Fixes #21902 ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
I am encountering this in v2.43.1:
|
I updated to v2.43.1 as well as the jsii to 1.68.0 and the message went away for me (if that helps)
|
aws/aws-cdk#21867 and aws/aws-cdk#21902 (jsii 1.69+ required)
We've recently seen lots of [confusion](#21902) from our users thinking the sheer display of the notice constitutes an error. Try to clarify this isn't the case. ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
We've recently seen lots of [confusion](aws#21902) from our users thinking the sheer display of the notice constitutes an error. Try to clarify this isn't the case. ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
I am encountering this warning in v2.55.1. 21902 apigateway: Unable to serialize value as aws-cdk-lib.aws_apigateway.IModel
|
We've recently seen lots of [confusion](aws#21902) from our users thinking the sheer display of the notice constitutes an error. Try to clarify this isn't the case. ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
We've recently seen lots of [confusion](aws#21902) from our users thinking the sheer display of the notice constitutes an error. Try to clarify this isn't the case. ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Please add your +1 👍 to let us know you have encountered this
Status: RESOLVED
Overview:
Users of CDK in any language other than TS/JS cannot use values that return an instance of a deprecated class.
Affected Versions
Any version greater or equal to 2.41.0
Complete Error Message:
Workaround:
Case by case workarounds, such as ones described here.
You could also pin the jsii client libraries to 1.68.0:
Python
jsii==1.68.0
Java
Golang
C#
Amazon.JSII.Runtime==1.68.0
Solution:
TBD
Related Issues:
Original report
Describe the bug
I have a CDK v2 project in python and the "cdk synth" command is now suddenly failing. Below is the error from CodeBuild log, this just suddenly started after my latest commit triggered a build of my CDK Pipeline where I was using CDK 2.39.0. I also am now seeing the synth step failing on my local dev environment as well and installing CDK 2.40.0 did not seem to resolve the error either.
2022/09/02 17:42:50 Running command cdk synth
144 | jsii.errors.JavaScriptError:
145 | @jsii/kernel.SerializationError: Of static property aws-cdk-lib.aws_apigateway.Model.EMPTY_MODEL: Unable to serialize value as aws-cdk-lib.aws_apigateway.IModel
146 | ├── 🛑 Failing value is an instance of aws-cdk-lib.aws_apigateway.EmptyModel
147 | │ EmptyModel { modelId: 'Empty' }
148 | ╰── 🔍 Failure reason(s):
149 | ╰─ Type 'aws-cdk-lib.aws_apigateway.EmptyModel' not found
150 | at Object.process (/tmp/tmpdm_u1x99/lib/program.js:6194:19)
...
158 | The above exception was the direct cause of the following exception:
159 |
160 | Traceback (most recent call last):
161 | File "/codebuild/output/src197530525/src/app.py", line 10, in
162 | NextgenPipeline(app, "Nextgen", env=pipeline_env)
...
192 | raise JSIIError(resp.error) from JavaScriptError(resp.stack)
193 | jsii.errors.JSIIError: Of static property aws-cdk-lib.aws_apigateway.Model.EMPTY_MODEL: Unable to serialize value as aws-cdk-lib.aws_apigateway.IModel
194 | ├── 🛑 Failing value is an instance of aws-cdk-lib.aws_apigateway.EmptyModel
195 | │ EmptyModel { modelId: 'Empty' }
196 | ╰── 🔍 Failure reason(s):
197 | ╰─ Type 'aws-cdk-lib.aws_apigateway.EmptyModel' not found
198 |
Expected Behavior
I am expecting the "cdk synth" command to complete successfully.
Current Behavior
Currently the "cdk synth" step is failing to complete. Below is the full log from CodeBuild during my pipeline execution:
[Container] 2022/09/02 17:41:50 Waiting for agent ping
[Container] 2022/09/02 17:41:51 Waiting for DOWNLOAD_SOURCE
[Container] 2022/09/02 17:41:51 Phase is DOWNLOAD_SOURCE
[Container] 2022/09/02 17:41:51 CODEBUILD_SRC_DIR=/codebuild/output/src197530525/src
[Container] 2022/09/02 17:41:51 YAML location is /codebuild/readonly/buildspec.yml
[Container] 2022/09/02 17:41:51 Setting HTTP client timeout to higher timeout for S3 source
[Container] 2022/09/02 17:41:51 Processing environment variables
[Container] 2022/09/02 17:41:52 No runtime version selected in buildspec.
[Container] 2022/09/02 17:41:54 Moving to directory /codebuild/output/src197530525/src
[Container] 2022/09/02 17:41:54 Configuring ssm agent with target id: codebuild:358e2836-7acb-4c8c-9210-9bb6f58d3d69
[Container] 2022/09/02 17:41:54 Successfully updated ssm agent configuration
[Container] 2022/09/02 17:41:54 Registering with agent
[Container] 2022/09/02 17:41:54 Phases found in YAML: 1
[Container] 2022/09/02 17:41:54 BUILD: 4 commands
[Container] 2022/09/02 17:41:54 Phase complete: DOWNLOAD_SOURCE State: SUCCEEDED
[Container] 2022/09/02 17:41:54 Phase context status code: Message:
[Container] 2022/09/02 17:41:54 Entering phase INSTALL
[Container] 2022/09/02 17:41:54 Phase complete: INSTALL State: SUCCEEDED
[Container] 2022/09/02 17:41:54 Phase context status code: Message:
[Container] 2022/09/02 17:41:54 Entering phase PRE_BUILD
[Container] 2022/09/02 17:41:54 Phase complete: PRE_BUILD State: SUCCEEDED
[Container] 2022/09/02 17:41:54 Phase context status code: Message:
[Container] 2022/09/02 17:41:54 Entering phase BUILD
[Container] 2022/09/02 17:41:54 Running command npm install -g aws-cdk
/usr/local/bin/cdk -> /usr/local/lib/node_modules/aws-cdk/bin/cdk
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/aws-cdk/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 1 package from 1 contributor in 2.842s
[Container] 2022/09/02 17:42:09 Running command python -m pip install -r requirements.txt
Collecting aws-cdk-lib==2.40.0
Downloading aws_cdk_lib-2.40.0-py3-none-any.whl (61.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.9/61.9 MB 38.0 MB/s eta 0:00:00
Collecting constructs<11.0.0,>=10.0.0
Downloading constructs-10.1.94-py3-none-any.whl (56 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.4/56.4 kB 4.2 MB/s eta 0:00:00
Collecting pytest==6.2.5
Downloading pytest-6.2.5-py3-none-any.whl (280 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 280.7/280.7 kB 28.9 MB/s eta 0:00:00
Collecting syrupy==1.7.0
Downloading syrupy-1.7.0-py3-none-any.whl (38 kB)
Collecting boto3==1.20.32
Downloading boto3-1.20.32-py3-none-any.whl (131 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 131.8/131.8 kB 9.6 MB/s eta 0:00:00
Collecting aws-lambda-powertools==1.26.0
Downloading aws_lambda_powertools-1.26.0-py3-none-any.whl (173 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 173.6/173.6 kB 16.4 MB/s eta 0:00:00
Collecting requests==2.28.1
Downloading requests-2.28.1-py3-none-any.whl (62 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 kB 4.9 MB/s eta 0:00:00
Collecting beautifulsoup4==4.11.1
Downloading beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 128.2/128.2 kB 12.7 MB/s eta 0:00:00
Collecting publication>=0.0.3
Downloading publication-0.0.3-py2.py3-none-any.whl (7.7 kB)
Collecting jsii<2.0.0,>=1.66.0
Downloading jsii-1.67.0-py3-none-any.whl (547 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 547.4/547.4 kB 35.6 MB/s eta 0:00:00
Collecting typeguard~=2.13.3
Downloading typeguard-2.13.3-py3-none-any.whl (17 kB)
Collecting pluggy<2.0,>=0.12
Downloading pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting py>=1.8.2
Downloading py-1.11.0-py2.py3-none-any.whl (98 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.7/98.7 kB 9.6 MB/s eta 0:00:00
Requirement already satisfied: attrs>=19.2.0 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from pytest==6.2.5->-r requirements.txt (line 3)) (21.4.0)
Collecting toml
Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting packaging
Downloading packaging-21.3-py3-none-any.whl (40 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 kB 13.4 MB/s eta 0:00:00
Collecting iniconfig
Downloading iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting colored<2.0.0,>=1.3.92
Downloading colored-1.4.3.tar.gz (29 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting s3transfer<0.6.0,>=0.5.0
Downloading s3transfer-0.5.2-py3-none-any.whl (79 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.5/79.5 kB 2.9 MB/s eta 0:00:00
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from boto3==1.20.32->-r requirements.txt (line 5)) (0.10.0)
Collecting botocore<1.24.0,>=1.23.32
Downloading botocore-1.23.54-py3-none-any.whl (8.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.5/8.5 MB 93.0 MB/s eta 0:00:00
Collecting aws-xray-sdk<3.0.0,>=2.8.0
Downloading aws_xray_sdk-2.10.0-py2.py3-none-any.whl (99 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.7/99.7 kB 29.3 MB/s eta 0:00:00
Collecting fastjsonschema<3.0.0,>=2.14.5
Downloading fastjsonschema-2.16.1-py3-none-any.whl (22 kB)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from requests==2.28.1->-r requirements.txt (line 7)) (1.26.9)
Requirement already satisfied: certifi>=2017.4.17 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from requests==2.28.1->-r requirements.txt (line 7)) (2022.6.15)
Collecting charset-normalizer<3,>=2
Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Requirement already satisfied: idna<4,>=2.5 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from requests==2.28.1->-r requirements.txt (line 7)) (2.10)
Collecting soupsieve>1.2
Downloading soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
Collecting wrapt
Downloading wrapt-1.14.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (77 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.8/77.8 kB 2.4 MB/s eta 0:00:00
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from botocore<1.24.0,>=1.23.32->boto3==1.20.32->-r requirements.txt (line 5)) (2.8.2)
Requirement already satisfied: typing-extensions<5.0,>=3.7 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from jsii<2.0.0,>=1.66.0->aws-cdk-lib==2.40.0->-r requirements.txt (line 1)) (3.10.0.0)
Collecting cattrs<22.2,>=1.8
Downloading cattrs-22.1.0-py3-none-any.whl (33 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 kB 1.3 MB/s eta 0:00:00
Collecting exceptiongroup
Downloading exceptiongroup-1.0.0rc9-py3-none-any.whl (12 kB)
Requirement already satisfied: six>=1.5 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.24.0,>=1.23.32->boto3==1.20.32->-r requirements.txt (line 5)) (1.16.0)
Building wheels for collected packages: colored
Building wheel for colored (setup.py): started
Building wheel for colored (setup.py): finished with status 'done'
Created wheel for colored: filename=colored-1.4.3-py3-none-any.whl size=14342 sha256=6b92539979906f58ed82424ca1b92018f3ca76c7974f9757a2cf67589e284e6d
Stored in directory: /root/.cache/pip/wheels/31/7b/79/7cf37e7860649bd09d359bfbbde9084a103a35eedd8f12a592
Successfully built colored
Installing collected packages: publication, iniconfig, fastjsonschema, colored, wrapt, typeguard, toml, soupsieve, pyparsing, py, pluggy, exceptiongroup, charset-normalizer, requests, packaging, cattrs, botocore, beautifulsoup4, s3transfer, pytest, jsii, aws-xray-sdk, syrupy, constructs, boto3, aws-lambda-powertools, aws-cdk-lib
Attempting uninstall: requests
Found existing installation: requests 2.25.1
Uninstalling requests-2.25.1:
Successfully uninstalled requests-2.25.1
Attempting uninstall: botocore
Found existing installation: botocore 1.27.18
Uninstalling botocore-1.27.18:
Successfully uninstalled botocore-1.27.18
Attempting uninstall: s3transfer
Found existing installation: s3transfer 0.6.0
Uninstalling s3transfer-0.6.0:
Successfully uninstalled s3transfer-0.6.0
Attempting uninstall: boto3
Found existing installation: boto3 1.24.18
Uninstalling boto3-1.24.18:
Successfully uninstalled boto3-1.24.18
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
aws-sam-cli 1.52.0 requires requests==2.25.1, but you have requests 2.28.1 which is incompatible.
Successfully installed aws-cdk-lib-2.40.0 aws-lambda-powertools-1.26.0 aws-xray-sdk-2.10.0 beautifulsoup4-4.11.1 boto3-1.20.32 botocore-1.23.54 cattrs-22.1.0 charset-normalizer-2.1.1 colored-1.4.3 constructs-10.1.94 exceptiongroup-1.0.0rc9 fastjsonschema-2.16.1 iniconfig-1.1.1 jsii-1.67.0 packaging-21.3 pluggy-1.0.0 publication-0.0.3 py-1.11.0 pyparsing-3.0.9 pytest-6.2.5 requests-2.28.1 s3transfer-0.5.2 soupsieve-2.3.2.post1 syrupy-1.7.0 toml-0.10.2 typeguard-2.13.3 wrapt-1.14.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[notice] A new release of pip available: 22.1.2 -> 22.2.2
[notice] To update, run: pip install --upgrade pip
[Container] 2022/09/02 17:42:50 Running command cdk synth
jsii.errors.JavaScriptError:
@jsii/kernel.SerializationError: Of static property aws-cdk-lib.aws_apigateway.Model.EMPTY_MODEL: Unable to serialize value as aws-cdk-lib.aws_apigateway.IModel
├── 🛑 Failing value is an instance of aws-cdk-lib.aws_apigateway.EmptyModel
│ EmptyModel { modelId: 'Empty' }
╰── 🔍 Failure reason(s):
╰─ Type 'aws-cdk-lib.aws_apigateway.EmptyModel' not found
at Object.process (/tmp/tmpdm_u1x99/lib/program.js:6194:19)
at exports.Kernel._fromSandbox (/tmp/tmpdm_u1x99/lib/program.js:5837:29)
at exports.Kernel.sget (/tmp/tmpdm_u1x99/lib/program.js:5413:34)
at exports.KernelHost.processRequest (/tmp/tmpdm_u1x99/lib/program.js:6618:36)
at exports.KernelHost.run (/tmp/tmpdm_u1x99/lib/program.js:6592:48)
at Immediate._onImmediate (/tmp/tmpdm_u1x99/lib/program.js:6593:46)
at processImmediate (internal/timers.js:464:21)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/codebuild/output/src197530525/src/app.py", line 10, in
NextgenPipeline(app, "Nextgen", env=pipeline_env)
File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/jsii/_runtime.py", line 86, in call
inst = super().call(*args, **kwargs)
File "/codebuild/output/src197530525/src/nextgen/build_pipeline/nextgen_pipeline.py", line 64, in init
wave.add_stage(DeployDev(self, "Dev"))
File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/jsii/_runtime.py", line 86, in call
inst = super().call(*args, **kwargs)
File "/codebuild/output/src197530525/src/nextgen/build_pipeline/stages/deploy_dev.py", line 50, in init
cloudsearch(self)
File "/codebuild/output/src197530525/src/nextgen/build_pipeline/stages/deploy_dev.py", line 90, in cloudsearch
CloudSearch(
File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/jsii/_runtime.py", line 86, in call
inst = super().call(*args, **kwargs)
File "/codebuild/output/src197530525/src/nextgen/stacks/cloudsearch.py", line 61, in init
CloudSearchAPI(
File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/jsii/_runtime.py", line 86, in call
inst = super().call(*args, **kwargs)
File "/codebuild/output/src197530525/src/nextgen/constructs/cloudsearch/cloudsearch_api.py", line 163, in init
response_models={"application/json": apigateway.Model.EMPTY_MODEL},
File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/jsii/python.py", line 16, in get
return self.fget.get(obj, klass)()
File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/aws_cdk/aws_apigateway/init.py", line 19608, in EMPTY_MODEL
return typing.cast(IModel, jsii.sget(cls, "EMPTY_MODEL"))
File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/jsii/_kernel/init.py", line 148, in wrapped
return _recursize_dereference(kernel, fn(kernel, *args, **kwargs))
File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/jsii/_kernel/init.py", line 368, in sget
return self.provider.sget(
File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/jsii/_kernel/providers/process.py", line 356, in sget
return self._process.send(request, GetResponse)
File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/jsii/_kernel/providers/process.py", line 329, in send
raise JSIIError(resp.error) from JavaScriptError(resp.stack)
jsii.errors.JSIIError: Of static property aws-cdk-lib.aws_apigateway.Model.EMPTY_MODEL: Unable to serialize value as aws-cdk-lib.aws_apigateway.IModel
├── 🛑 Failing value is an instance of aws-cdk-lib.aws_apigateway.EmptyModel
│ EmptyModel { modelId: 'Empty' }
╰── 🔍 Failure reason(s):
╰─ Type 'aws-cdk-lib.aws_apigateway.EmptyModel' not found
Subprocess exited with error 1
[Container] 2022/09/02 17:42:58 Command did not exit successfully cdk synth exit status 1
[Container] 2022/09/02 17:42:58 Phase complete: BUILD State: FAILED
[Container] 2022/09/02 17:42:58 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: cdk synth. Reason: exit status 1
[Container] 2022/09/02 17:42:58 Entering phase POST_BUILD
[Container] 2022/09/02 17:42:58 Phase complete: POST_BUILD State: SUCCEEDED
[Container] 2022/09/02 17:42:58 Phase context status code: Message:
[Container] 2022/09/02 17:42:58 Expanding base directory path: cdk.out
[Container] 2022/09/02 17:42:58 Assembling file list
[Container] 2022/09/02 17:42:58 Expanding cdk.out
[Container] 2022/09/02 17:42:58 Expanding file paths for base directory cdk.out
[Container] 2022/09/02 17:42:58 Assembling file list
[Container] 2022/09/02 17:42:58 Expanding */
[Container] 2022/09/02 17:42:58 Found 26 file(s)
[Container] 2022/09/02 17:42:58 Phase complete: UPLOAD_ARTIFACTS State: SUCCEEDED
[Container] 2022/09/02 17:42:58 Phase context status code: Message:
Reproduction Steps
run the "cdk synth" command on a CDK project that is using aws-cdk-lib.aws_apigateway.Model.EMPTY_MODEL
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.40.0
Framework Version
No response
Node.js Version
16.15.0
OS
Mac OS Montery (12.4)
Language
Python
Language Version
3.10.2
Other information
No response
The text was updated successfully, but these errors were encountered: