Skip to content

Remove validateFunctionVersions feature flag before v0.24 release (graduate to always-on) #342

Description

@sakul-learning

Context

PR #296 (function version validation) introduced the validateFunctionVersions feature flag to gate ValidateFunctionVersionSupport validation behind an opt-in context key. This validation checks that Terraform functions used through Fn.* are supported by the declared targetVersions at synth time.

The flag was intentionally behind a feature flag to avoid breaking existing projects in a minor release. New projects created via cdktn init automatically get the flag enabled through FUTURE_FLAGS.

Why now

The v0.23 → v0.24 release is a pre-v1 breaking-change-equivalent version bump. Per the feature flag lifecycle in CONTRIBUTING.md, v0.24 is the correct window to graduate the flag to always-on. If we miss this window, the flag stays gated until v0.25.

Must land BEFORE the v0.24 release is cut. Depends on PR #303.

What needs to change

  1. Always register validationterraform-stack.ts:134: remove the if (this.node.tryGetContext(VALIDATE_FUNCTION_VERSIONS)) gate, always call this.node.addValidation(new ValidateFunctionVersionSupport(this))
  2. Remove from FUTURE_FLAGSfeatures.ts:43: drop VALIDATE_FUNCTION_VERSIONS from the FUTURE_FLAGS map
  3. Stop injecting into new projectscli-core/src/lib/init.ts: FUTURE_FLAGS iteration will naturally skip it
  4. Update testsvalidations.test.ts: tests that pass [VALIDATE_FUNCTION_VERSIONS]: "true" need updating; default (no-flag) behavior becomes the validated behavior
  5. Update integration test configtest/typescript/function-version-validation/cdktf.json: drop the flag from context

Acceptance criteria

  • ValidateFunctionVersionSupport runs on every TerraformStack regardless of context
  • validateFunctionVersions is removed from FUTURE_FLAGS
  • cdktn init no longer generates the flag in cdktf.json
  • All tests pass with validation as the default behavior
  • Tests cover both always-on validation and the no-targeted-functions path

Flagged during review of PR #296 by @so0k. /cc @jsteinich

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions