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

docs(core): aspects with same priority are not guaranteed to be executed in the same order #33596

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/aws-cdk-lib/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,10 @@ values must be non-negative integers, where a higher number means the Aspect wil

By default, newly created nodes always inherit aspects. Priorities are mainly for ordering between mutating aspects on the construct tree.

CDK provides standard priority values for mutating and readonly aspects to help ensure consistency across different construct libraries:
CDK provides standard priority values for mutating and readonly aspects to help ensure consistency across different construct libraries.
Note that Aspects that have same priority value are not guaranteed to be executed
in a consistent order.


```ts
/**
Expand Down
5 changes: 4 additions & 1 deletion packages/aws-cdk-lib/core/lib/aspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ export interface AspectOptions {
* The priority value to apply on an Aspect.
* Priority must be a non-negative integer.
*
* @default - AspectPriority.DEFAULT
* Aspects that have same priority value are not guaranteed to be
* executed in a consistent order.
*
* @default AspectPriority.DEFAULT
*/
readonly priority?: number;
}
Expand Down
Loading