Skip to content

Commit

Permalink
chore: even better feature flag documentation (#22811)
Browse files Browse the repository at this point in the history
Include the following changes:

- Include and require a section on restoring old behavior (or dealing with the required source changes) on removed/removable flags.
- Reorganize the Markdown file to put all tables up top, with links to the detailed flag information at the bottom.
- Include v1-only flags (including removed ones) in the details.
- Remove the "value" column from a couple of tables to make it fit GitHub's page width better


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
rix0rrr committed Nov 7, 2022
1 parent b20a6b4 commit e89f2e0
Show file tree
Hide file tree
Showing 5 changed files with 552 additions and 202 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Expand Up @@ -977,6 +977,7 @@ Adding a new flag looks as follows:
your description, be sure to cover the following:
- Consciously pick the type of feature flag. Can the flag be removed in a future major version, or not?
- Motivate why the feature flag exists. What is the change to existing infrastructure and why is it not safe?
- In case of a "default change flag", describe what the user needs to do to restore the old behavior.
4. Add an entry for your feature flag in the [README](https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/cx-api/README.md) file.
5. In your tests, ensure that you test your feature with and without the feature flag enabled. You can do this by passing the feature flag to the `context` property when instantiating an `App`.
```ts
Expand Down

0 comments on commit e89f2e0

Please sign in to comment.