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

chore: add readme for cloud-assembly-schema #31151

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

TheRealAmazonKendra
Copy link
Contributor

This points users to the correct repo for the source code. No other changes have yet been made to this README. The contents of this README will be automatically updated to the contents of the README in the source code on every version update.

This change also includes removal of a file that shouldn't have been committed (.jsii.tabl.json) and the revert of unintended changes to the jest config.

Issue # (if applicable)

Closes #.

Reason for this change

Description of changes

Description of how you validated changes

Checklist


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

This points users to the correct repo for the source code.

The contents of this README will be automatically updated to the contents of the
README in the source code on every version update.
@aws-cdk-automation aws-cdk-automation requested a review from a team August 19, 2024 18:25
@github-actions github-actions bot added the p2 label Aug 19, 2024
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Aug 19, 2024
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Aug 19, 2024

## Versioning

The schema version is specified my the major version of the package release. It follows semantic versioning, but with a small twist.
Copy link
Contributor

@evzzk evzzk Aug 21, 2024

Choose a reason for hiding this comment

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

Suggested change
The schema version is specified my the major version of the package release. It follows semantic versioning, but with a small twist.
The schema version is specified by the major version of the package release. It follows semantic versioning, but with a slight modification.

Copy link
Contributor

@evzzk evzzk left a comment

Choose a reason for hiding this comment

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

Left some minor suggestions for the read me file.

Copy link
Contributor

@comcalvi comcalvi left a comment

Choose a reason for hiding this comment

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

Approving with comments, we should address these in the new source-of-truth for this README

[`cdk synth`](https://github.com/aws/aws-cdk/tree/main/packages/aws-cdk#cdk-synthesize)
command, or the [`app.synth()`](https://github.com/aws/aws-cdk/blob/main/packages/@aws-cdk/core/lib/app.ts#L135) method invocation.

Its essentially a set of files and directories, one of which is the `manifest.json` file. It defines the set of instructions that are
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Its essentially a set of files and directories, one of which is the `manifest.json` file. It defines the set of instructions that are
It contains the files the CDK CLI needs to deploy your application, including assets and the CloudFormation Template that defines your application's infrastructure. This includes `manifest.json`, which defines the instructions the CDK CLI follows to deploy your application.

> - Deploy CloudFormation templates.

Therefore, the assembly is how the CDK class library and CDK CLI (or any other consumer) communicate. To ensure compatibility
between the assembly and its consumers, we treat the manifest file as a well defined, versioned schema.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
between the assembly and its consumers, we treat the manifest file as a well defined, versioned schema.
between the assembly and its consumers, the manifest file follows a well defined, versioned schema.


## Versioning

The schema version is specified my the major version of the package release. It follows semantic versioning, but with a small twist.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The schema version is specified my the major version of the package release. It follows semantic versioning, but with a small twist.
The schema version is specified by the major version of the package release. It follows semantic versioning, but with a small twist.

Comment on lines +32 to +37
When we add instructions to the assembly, they are reflected in the manifest file and the _json-schema_ accordingly.
Every such instruction, is crucial for ensuring the correct deployment behavior. This means that to properly deploy a cloud assembly,
consumers must be aware of every such instruction modification.

For this reason, every change to the schema, even though it might not strictly break validation of the _json-schema_ format,
is considered `major` version bump. All changes that do not impact the schema are considered a `minor` version bump.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
When we add instructions to the assembly, they are reflected in the manifest file and the _json-schema_ accordingly.
Every such instruction, is crucial for ensuring the correct deployment behavior. This means that to properly deploy a cloud assembly,
consumers must be aware of every such instruction modification.
For this reason, every change to the schema, even though it might not strictly break validation of the _json-schema_ format,
is considered `major` version bump. All changes that do not impact the schema are considered a `minor` version bump.
Cloud assembly consumers must support every instruction in the cloud assembly manifest. Thus every change to the schema, breaking or not, is considered a `major` version bump. Changes that do not impact the schema are considered a `minor` version bump.

Comment on lines +40 to +46

If you'd like to consume the [schema file](./schema/cloud-assembly.schema.json) in order to do validations on `manifest.json` files,
simply download it from this repo and run it against standard _json-schema_ validators, such as [jsonschema](https://www.npmjs.com/package/jsonschema).

Consumers must take into account the `major` version of the schema they are consuming. They should reject cloud assemblies
with a `major` version that is higher than what they expect. While schema validation might pass on such assemblies, the deployment integrity
cannot be guaranteed because some instructions will be ignored.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If you'd like to consume the [schema file](./schema/cloud-assembly.schema.json) in order to do validations on `manifest.json` files,
simply download it from this repo and run it against standard _json-schema_ validators, such as [jsonschema](https://www.npmjs.com/package/jsonschema).
Consumers must take into account the `major` version of the schema they are consuming. They should reject cloud assemblies
with a `major` version that is higher than what they expect. While schema validation might pass on such assemblies, the deployment integrity
cannot be guaranteed because some instructions will be ignored.
If you'd like to consume the [schema file](./schema/cloud-assembly.schema.json) to validate the manifest, download it from this repo and run it against standard _json-schema_ validators, such as [jsonschema](https://www.npmjs.com/package/jsonschema).
Consumers must take into account the `major` version of the schema they are consuming. They should reject cloud assemblies
with a `major` version that is higher than what they expect. While schema validation might pass on such assemblies, the deployment integrity
cannot be guaranteed because some instructions will be ignored.

Copy link
Contributor

mergify bot commented Aug 21, 2024

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

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Aug 21, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 82e9b94
  • 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 76e7af6 into main Aug 21, 2024
15 checks passed
Copy link
Contributor

mergify bot commented Aug 21, 2024

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

@mergify mergify bot deleted the TheRealAmazonKendra/cloud-assembly-schema-readme branch August 21, 2024 17:55
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contribution/core This is a PR that came from AWS. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants