Skip to content

chore(cfnspec): consume CloudFormation specification in parts#18210

Merged
mergify[bot] merged 7 commits intomasterfrom
huijbers/split-cfn-spec
Jan 4, 2022
Merged

chore(cfnspec): consume CloudFormation specification in parts#18210
mergify[bot] merged 7 commits intomasterfrom
huijbers/split-cfn-spec

Conversation

@rix0rrr
Copy link
Copy Markdown
Contributor

@rix0rrr rix0rrr commented Dec 29, 2021

Whenever there are errors in the CloudFormation specification, we
currently have to fail the build and can't consume anything.

To ensure we make some progress, apply the following strategy instead:

  • Split the spec into fragments, on a per-service basis.
  • Consume those per-service spec updates that are valid; if updates
    are invalid, we will leave them at the old version.

This will produce an always-building spec, of which certain parts
may be outdated. Report the outdated parts in the CHANGELOG.

Notifying the CloudFormation team about spec errors is an out-of-band
process, and out of scope of this PR.

As a side effect of this work, formalize the spec manipulation we do
with JSON and patch files into a mini-standard called "JSON Patch
Stacks", and add some tools to operate on them.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Whenever there are errors in the CloudFormation specification, we
currently have to fail the build and can't consume anything.

To ensure we make some progress, apply the following strategy instead:

- Split the spec into fragments, on a per-service basis.
- Consume those per-service spec updates that are valid; if updates
  are invalid, we will leave them at the old version.

This will produce an always-building spec, of which certain parts
may be outdated. Report the outdated parts in the CHANGELOG.

Notifying the CloudFormation team about spec errors is an out-of-band
process, and out of scope of this PR.

As a side effect of this work, formalize the spec manipulation we do
with JSON and patch files into a mini-standard called "JSON Patch
Stacks", and add some tools to operate on them.
@rix0rrr rix0rrr requested a review from a team December 29, 2021 14:28
@rix0rrr rix0rrr self-assigned this Dec 29, 2021
@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Dec 29, 2021

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Dec 29, 2021
Copy link
Copy Markdown
Contributor

@njlynch njlynch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

This is a good bit of new code, but no new tests. :( Some baseline tests so someone modifying this in the future knows they likely haven't horked it would be nifty.

Also, the build is currently failing. :)

@rix0rrr rix0rrr requested review from a team and njlynch December 31, 2021 12:32
throw new Error(`Attempted to merge ${JSON.stringify(fragVal)} into incompatible ${JSON.stringify(specVal)} at path ${jsonPath.join('/')}/${key}`);
}
if (typeof specVal !== 'object' && specVal !== fragVal) {
if (specVal == fragVal) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional ==, or intended to be ===?

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jan 4, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 89cf3c4
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 73f0f0e into master Jan 4, 2022
@mergify mergify bot deleted the huijbers/split-cfn-spec branch January 4, 2022 11:41
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jan 4, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
)

Whenever there are errors in the CloudFormation specification, we
currently have to fail the build and can't consume anything.

To ensure we make some progress, apply the following strategy instead:

- Split the spec into fragments, on a per-service basis.
- Consume those per-service spec updates that are valid; if updates
  are invalid, we will leave them at the old version.

This will produce an always-building spec, of which certain parts
may be outdated. Report the outdated parts in the CHANGELOG.

Notifying the CloudFormation team about spec errors is an out-of-band
process, and out of scope of this PR.

As a side effect of this work, formalize the spec manipulation we do
with JSON and patch files into a mini-standard called "JSON Patch
Stacks", and add some tools to operate on them.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@aws-cdk/cfnspec contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants