Skip to content

Commit 133c9b5

Browse files
authored
docs: update missing link (#26041)
Update the links about feature flags in the contribution guide under "Feature Flags" section because these is missing link. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 9af05d8 commit 133c9b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CONTRIBUTING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ automatically, and we have to use a feature flag:
10951095
Adding a new flag looks as follows:
10961096

10971097
1. Define a new const under
1098-
[cx-api/lib/features.ts](https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/cx-api/lib/features.ts)
1098+
[cx-api/lib/features.ts](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/cx-api/lib/features.ts)
10991099
with the name of the context key that enables this new feature (for
11001100
example, `ENABLE_STACK_NAME_DUPLICATES`). The context key should be in the
11011101
form `module.Type:feature` (e.g. `@aws-cdk/core:enableStackNameDuplicates`).
@@ -1106,12 +1106,12 @@ Adding a new flag looks as follows:
11061106
2. Use `FeatureFlags.of(construct).isEnabled(cxapi.ENABLE_XXX)` to check if this feature is enabled
11071107
in your code. If it is not defined, revert to the legacy behavior.
11081108
3. Add your feature flag to the `FLAGS` map in
1109-
[cx-api/lib/features.ts](https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/cx-api/lib/features.ts). In
1109+
[cx-api/lib/features.ts](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/cx-api/lib/features.ts). In
11101110
your description, be sure to cover the following:
11111111
- Consciously pick the type of feature flag. Can the flag be removed in a future major version, or not?
11121112
- Motivate why the feature flag exists. What is the change to existing infrastructure and why is it not safe?
11131113
- In case of a "default change flag", describe what the user needs to do to restore the old behavior.
1114-
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.
1114+
4. Add an entry for your feature flag in the [README](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/cx-api/README.md) file.
11151115
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`.
11161116
```ts
11171117
const myFeatureFlag = { [cxapi.MY_FEATURE_FLAG]: true };
@@ -1124,7 +1124,7 @@ Adding a new flag looks as follows:
11241124

11251125
`fix(core): impossible to use the same physical stack name for two stacks (under feature flag)`
11261126

1127-
[jest helper methods]: https://github.com/aws/aws-cdk/blob/main/tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts
1127+
[jest helper methods]: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/core/lib/feature-flags.ts
11281128

11291129
## Versioning and Release
11301130

0 commit comments

Comments
 (0)