Skip to content

Conversation

@rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Aug 13, 2025

The feature flag report generated by the core library includes flags that:

  • Are not configurable for CDKv2 anymore
  • Whose default value is the same as the recommended value (i.e., they don't need to be configured at all).

At the same time, the recommended-feature-flags.json file does NOT contain those flags, because they aren't necessary.

This means that a newly cdk inited application reports that 18 flags are unconfigured by the user, producing unnecessary warnings.

We will address this in 2 parts.


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

The feature flag report generated by the core library includes flags
that:

- Are not configurable for CDKv2 anymore
- Whose default value is the same as the recommended value (i.e.,
  they don't need to be configured at all).

At the same time, the `recommended-feature-flags.json` file does
NOT contain those flags, because they aren't necessary.

This means that a newly `cdk init`ed application reports that 18 flags
are unconfigured by the user, producing unnecessary warnings.

Instead, don't write all flags to the report, but only report
on those flags that have a legitimately interesting value.
@rix0rrr rix0rrr requested a review from a team as a code owner August 13, 2025 11:43
@aws-cdk-automation aws-cdk-automation requested a review from a team August 13, 2025 11:43
@github-actions github-actions bot added the p2 label Aug 13, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Aug 13, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

(This review is outdated)

@rix0rrr rix0rrr added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Aug 13, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review August 13, 2025 11:56

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation
Copy link
Collaborator

➡️ PR build request submitted to test-main-pipeline ⬅️

A maintainer must now check the pipeline and add the pr-linter/cli-integ-tested label once the pipeline succeeds.

rix0rrr added a commit to aws/aws-cdk-cli that referenced this pull request Aug 13, 2025
The flags nag message is too pessimistic, showing 18 unconfigured flags
on a newly cdk inited project.

* Part of that is the CDK library emitting info for flags that don't
  exist anymore, fixed here: aws/aws-cdk#35227
* Part of that is we are alarming on unconfigured flags, even if the
  behavior of unconfigured flags is the same as recommended behavior.

We shouldn't alarm on the latter, so filter them out.
@mergify
Copy link
Contributor

mergify bot commented Aug 13, 2025

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 merged commit 566f6ca into main Aug 13, 2025
18 checks passed
@mergify mergify bot deleted the huijbers/too-many-flags branch August 13, 2025 12:30
@github-actions
Copy link
Contributor

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 13, 2025
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 pr-linter/exempt-integ-test The PR linter will not require integ test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants