Skip to content

test(feature-flags): add e2e tests against AppConfig and the Agent extension - #5964

Merged
dreamorosi merged 6 commits into
mainfrom
test/feature-flags-e2e-appconfig
Nov 16, 2026
Merged

dreamorosi merged 6 commits into
mainfrom
test/feature-flags-e2e-appconfig

Conversation

@dreamorosi

@dreamorosi dreamorosi commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds end-to-end tests for Feature Flags that deploy real AppConfig profiles and the AppConfig Agent Lambda extension. They cover all three AppConfig stores and record how access denial looks through each retrieval path, which the RFC lists as unverified.

Changes

  • Add packages/feature-flags/tests/e2e/appConfigStores.test.ts: one function with the Agent layer attached, a freeform Flag Document profile, and a feature-flag profile with a basic flag and a multi-variant flag with a context rule
  • Assert appConfigStore and appConfigAgentStore evaluation and missing-flag fallback; for appConfigVariantStore, assert two contexts selecting different variants, missing-flag fallback, evaluateMany, and getEnabledFeatures
  • Record the Agent version reported by /ping as a test annotation
  • Add accessDenied.test.ts: a function with appconfig:StartConfigurationSession but no appconfig:GetLatestConfiguration. The SDK store must throw GetParameterError caused by AccessDeniedException, and the Agent and Variant stores must throw AppConfigAgentError with status 403. Raw error shapes are recorded as annotations
  • Add tests/helpers/resources.ts with the AppConfig test resources and the extension layer ARN map (version 2.0.18836, same as the Parameters Agent e2e)
  • Update @aws-cdk/cloudformation-diff in the lockfile from 2.187.0 to 2.187.7: @aws-cdk/toolkit-lib calls propertiesHiddenByChangeSet, which 2.187.0 does not export, so every e2e deployment failed
  • Enable the test:e2e scripts so the package joins the e2e workflow matrix for both architectures
  • Exercise Feature Flags from the layer e2e function: one ruleEngineStore evaluation and an appConfigStore built from the /appconfig sub-path

The minimum extension version fix for the docs is in #5962. The RFC write-up of the IAM observations will follow once this suite has run in CI.

Issue number: closes #5909


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

…tension

Deploy real AppConfig profiles and the AppConfig Agent Lambda extension to
exercise appConfigStore, appConfigAgentStore, and appConfigVariantStore,
including missing-flag fallbacks, variant selection by context,
evaluateMany, and getEnabledFeatures.

Add an under-privileged function without appconfig:GetLatestConfiguration:
the SDK store must throw on access denial, while the Agent paths record the
raw outcome so the observed shapes can be reported on the RFC.

Also exercise Feature Flags from the Lambda layer e2e function.

Fixes #5909
@powertools-for-aws-oss-automation powertools-for-aws-oss-automation Bot added the size/XL PRs between 500-999 LOC, often PRs that grown with feedback label Nov 13, 2026
@aws-cdk/toolkit-lib calls propertiesHiddenByChangeSet from
@aws-cdk/cloudformation-diff whenever a change set reaches CREATE_COMPLETE,
but the lockfile still resolved cloudformation-diff to 2.187.0, which
predates that export (added in 2.187.6). toolkit-lib declares the
dependency as ^2, so dependabot's toolkit-lib bumps never moved it.

Every e2e stack deployment failed with
"propertiesHiddenByChangeSet is not a function", including the shared
LMI capacity providers. Resolve cloudformation-diff to 2.187.7.
AppConfig omits attribute values from a disabled variant, so the default
variant resolves with no attributes. Also serialize the Agent /ping
response in the annotation, which otherwise showed only its first line.
The first e2e run showed both Agent-backed stores throwing
AppConfigAgentError with status 403 on access denial, consistently across
runtimes and architectures. Assert that instead of accepting a fallback, so
an extension change that hides the denial fails CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL PRs between 500-999 LOC, often PRs that grown with feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maintenance: e2e tests for Feature Flags against AppConfig and the Agent extension

2 participants