terraform-cdk: python: unable to synth pre-existing `App` for `cdktf` > 0.10

Community Note

  • Please vote on this issue by adding a πŸ‘ reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave β€œ+1” or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

cdktf & Language Versions

Core

  • python: 3.9.13
  • cdktf: 0.12.1

Deps

  • constructs: 10.1.85
  • jsii: 1.65.0

Affected Resource(s)

Not exactly sure what this means.

The error is stemming from core cdktf class App.

Debug Output

Traceback (most recent call last):
  <redacted>
  File "/var/task/<redacted>.py", line 67, in synth
    app = App(outdir=str(tmp_dir))
  File "/opt/python/jsii/_runtime.py", line 86, in __call__
    inst = super().__call__(*args, **kwargs)
  File "/opt/python/cdktf/__init__.py", line 33, in __init__
    def __init__(self,*,context=None,outdir=None,skip_validation=None,stack_traces=None):options=AppOptions(context=context,outdir=outdir,skip_validation=skip_validation,stack_traces=stack_traces);jsii.create(self.__class__,self,[options])
  File "/opt/python/cdktf/__init__.py", line 65, in __init__
    if __debug__:type_hints=typing.get_type_hints(AppOptions.__init__);check_type(argname='argument context',value=context,expected_type=type_hints['context']);check_type(argname='argument outdir',value=outdir,expected_type=type_hints['outdir']);check_type(argname='argument skip_validation',value=skip_validation,expected_type=type_hints['skip_validation']);check_type(argname='argument stack_traces',value=stack_traces,expected_type=type_hints['stack_traces'])
KeyError: 'context'

Expected Behavior

Existing CDKTF stack synths app as for previous cdktf version (0.10.4).

Actual Behavior

Exception raised due to something typing-related.

Steps to Reproduce

Important Factoids

References

  • I know there was a similar issue in one of aws-cdk/jsii/constructs, but don’t know which issue (let me dig that up).

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (7 by maintainers)

Most upvoted comments

Everything seems to have rolled out successfully πŸš€

cdktf-cdktf-provider-azurerm v2.0.11 has been released to PyPI 🐍

Thank you @ansgarm this resolved my issues!

Everything seems to have rolled out successfully πŸš€

cdktf-cdktf-provider-azurerm v2.0.11 has been released to PyPI 🐍

Hi πŸ‘‹ I’m on this and currently waiting for this upstream PR to be merged in Projen, so that we can configure our Github Actions to run with more memory which in turn will allow us to build and release updated pre-built provider packages for providers like Azurerm (and a few others).

Usually Projen is quire quick in merging and releasing PRs but if that takes longer, I’ll switch to a fork in the meantime to unblock this.