Skip to content
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

Collect multiple errors in processing #410

Open
mrgrain opened this issue Oct 25, 2022 · 1 comment
Open

Collect multiple errors in processing #410

mrgrain opened this issue Oct 25, 2022 · 1 comment
Labels
enhancement New feature or request error-handling

Comments

@mrgrain
Copy link
Contributor

mrgrain commented Oct 25, 2022

Currently the app immidiately stops when an error in processing (grammer parsing, type checking, CDK evaluation) occurs.
This makes it very tedious to fix things.

We should try and continue processing as much as possible, while collecting all errors and printing them together.

@mrgrain mrgrain added enhancement New feature or request error-handling labels Oct 25, 2022
@mrgrain
Copy link
Contributor Author

mrgrain commented Oct 25, 2022

Yaml Errors look like this and cannot be collected (unless we switch the library):

YAMLSemanticError: Implicit map keys need to be on a single line at line 10, column 5:

    Type aws-cdk-lib.aws_cloudfront.OriginAccessIdentity
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^…

mergify bot pushed a commit that referenced this issue Oct 26, 2022
Resolves first part of #410 
Laying the groudwork and collect evaluation errors.

---

Creates errors like below. Note that the formatting is not final. We should probably do some tree based output.
The errors can also be inspected programatically.

```
DeclarativeStackError:

[RuntimeError at Resources.SiteDistribution]
    Cannot read properties of undefined (reading 'bind')

[TypeError at Resources.SiteDistribution.Properties.defaultBehavior.origin."aws-cdk-lib.aws_cloudfront_origins.S3Origin"]
    Cannot read properties of undefined (reading 'isWebsite')

[RuntimeError at Resources.SiteDistribution.Properties.defaultBehavior.origin."aws-cdk-lib.aws_cloudfront_origins.S3Origin".0.Ref]
    No such Resource or Parameter: SiteCertificate

[RuntimeError at Resources.SiteDistribution.Properties.defaultBehavior.origin."aws-cdk-lib.aws_cloudfront_origins.S3Origin".1.originAccessIdentity.Ref]
    No such Resource or Parameter: CloudFrontOAI

[RuntimeError at Resources.SiteDistribution.Properties.certificate.Ref]
    No such Resource or Parameter: SiteBucket

[RuntimeError at Resources.SiteDistribution.Properties.domainNames.0.Ref]
    No such Resource or Parameter: DomainName
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request error-handling
Projects
None yet
Development

No branches or pull requests

1 participant