Commit Graph
8 Commits
Author SHA1 Message Date
Jackson Price 91c67c69df fix(appconfig): serve legacy deployed configuration requests (#5658)
* fix(appconfig): serve legacy deployed configuration requests

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(appconfig): keep 404 for an unknown application or profile

GetConfiguration now maps only a missing environment to
BadRequestException, as a missing or undeployed environment was
observed on AWS. An unknown application or configuration profile stays
ResourceNotFoundException (404), as the API reference lists.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* docs(appconfig): note GetConfiguration error codes

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-14 17:38:58 -04:00
Aniket Shukla 2015d01864 fix(appconfig): support deleting environments (#5337)
* fix(appconfig): support deleting environments

* fix(appconfig): cascade environment deletion

* fix(appconfig): preserve deployment numbering

* fix(appconfig): resolve delete identifiers
2026-10-10 13:45:28 -04:00
Goooooooooody 2316b2fc28 feat(appconfig): serve feature flag variants to the AppConfig Agent as Amazon Ion (#4674)
* feat(appconfig): serve feature flag variants to the AppConfig Agent as Amazon Ion

The AWS AppConfig Agent evaluates multi-variant feature flags itself: it asks
AppConfigData for application/ion;type=AWS.AppConfig.FeatureFlags and gets each flag's
variants and rules back as Ion. Floci returned the stored JSON document unchanged, which
the agent cannot read, so every variant flag failed with NoSuchFlag.

A caller that accepts that type now gets the Ion stream AWS sends: a symbol table
importing AWS's ops and anns tables, then a list per flag holding its variants (name,
rule, attributes) and its default. Rules of the form (eq $attribute "value") are encoded;
any other is left to the existing JSON path with a warning. The encoding reproduces a
captured AWS response for a real 22-flag profile byte for byte.

* fix(appconfig): honour q=0 for Ion, label the stored content type, read the stream back in tests

An Accept of application/ion;type=AWS.AppConfig.FeatureFlags;q=0.0000 was treated as
acceptable; any run of zeros now means the caller rejects it.

The content type of a response was inferred from its first bytes. It now comes from the path
that produced them, so a profile that is not a feature flag profile keeps its stored type
even if it holds Ion and the caller accepts the feature flag type.

The tests decode the stream with Amazon's ion-java (test scope), with the ops and anns
shared tables registered, instead of checking the encoder against itself.

* fix(appconfig): encode a basic flag in an Ion profile as an annotated string

AWS sends a flag without variants in the Ion format as its retrieval-time JSON, annotated with
its key, not as a list holding a default variant. The encoder now does the same, reusing the
JSON path's per-flag conversion, so a profile that mixes variant and basic flags reads as AWS's.

The encoder and docs cite the layout AWS documents for the agent's local development
mode rather than the captured responses.
2026-10-01 19:30:18 -04:00
XuJianandxujiantop-crypto 1370dc02fa fix(appconfig): return feature flags in retrieval format (#3890)
Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
2026-09-19 07:15:28 -04:00
Vũ Thế Huy d624988ff8 feat(appconfig): implement ListDeployments (#3749)
* feat(appconfig): add deployment listing service

* feat(appconfig): expose ListDeployments

* docs(appconfig): document ListDeployments

* chore(appconfig): clean controller imports

* fix(appconfig): make deployment pagination cursor-based
2026-09-16 22:31:48 -04:00
sheldon-nadarajah-sft be625023eb fix(appconfig): add DeleteConfigurationProfile/DeleteHostedConfigurationVersion/ListDeploymentStrategies/DeleteDeploymentStrategy (#2280)
* fix(appconfig): add DeleteConfigurationProfile/DeleteHostedConfigurationVersion/ListDeploymentStrategies/DeleteDeploymentStrategy

These four operations had no route at all, so a request fell through
to S3's generic path-style catch-all (GET/DELETE /{bucket}[/{key}])
and returned a misleading NoSuchBucket 404 instead of a real AppConfig
response - confirmed via both raw HTTP and the real AWS SDK for Java.

Adds the missing routes + AppConfigService methods, mirroring existing
precedent (DeleteConfigurationProfile/DeleteHostedConfigurationVersion/
DeleteDeploymentStrategy follow DeleteApplication's idempotent-delete
convention - no upfront existence check; ListDeploymentStrategies
includes the three predefined strategies alongside custom ones,
verified against the API reference's own sample response).

DeleteDeploymentStrategy's real path is /deployementstrategies/{id}
(extra "e" - a genuine, documented quirk in AWS's own API model; every
other deployment-strategy operation correctly uses
/deploymentstrategies). Confirmed against the API reference and
reproduced against the real SDK, which sends the misspelled path
literally - matched it rather than "fixing" it, since wire-protocol
fidelity to what AWS actually does is the point.

Regenerated docs/services/appconfig.md's Supported Operations list
(hand-maintained for REST controllers - not yet covered by
tools/docs/regen_action_docs.py, confirmed via services.yaml's own
Phase-1 scope comment).

Tests: AppConfigIntegrationTest (+4), compatibility-tests/sdk-test-java
AppConfigTest (+1, covering all four operations via the real SDK).
Ran locally (JDK 25):

AppConfigIntegrationTest (unit):        29/29 passed
AppConfigTest (SDK compat, live):       16/16 passed

* fix(appconfig): scope profile deletion to its application, reject deleting predefined strategies

Review feedback on #2280 (Copilot + Greptile, both independently):

- deleteConfigurationProfile ignored appId entirely and deleted by the
  bare, globally-keyed profileId - a caller could delete another
  application's profile just by guessing/reusing its ID, since
  sibling reads (getConfigurationProfile) already enforce this
  ownership check but the new delete route didn't. Now rejects with
  the same ResourceNotFoundException as a mismatched get; a profileId
  that doesn't exist anywhere is still an idempotent no-op, matching
  deleteApplication's existing convention - only an existing-but-
  wrongly-scoped one is rejected.
- Same method also now cascades the delete to that profile's hosted
  configuration versions - they aren't independently addressable
  outside a profile's lifecycle, so leaving them in versionStore after
  the profile was "deleted" let a caller keep fetching versions for a
  profile that supposedly no longer exists.
- deleteDeploymentStrategy silently reported success (204) for a
  predefined strategy (e.g. AppConfig.AllAtOnce) without doing
  anything, since builtins were never in strategyStore in the first
  place - the strategy would still exist and still show up in every
  subsequent Get/List call despite the "successful" delete. Now
  rejects with BadRequestException.

Also applied this project's own established cleanup-logging
convention (System.err.println on a best-effort catch, matching
several other compatibility-tests/sdk-test-java files) to the one new
try/finally block flagged by Greptile, rather than swallowing the
exception silently.

Tests: 2 new AppConfigIntegrationTest cases (cross-application delete
rejected + original untouched, predefined-strategy delete rejected +
still resolvable) and 2 new SDK compatibility tests using the real
AWS SDK for Java v2's exception types.

AppConfigIntegrationTest:                31/31 passed
AppConfigTest (SDK compat, live):        18/18 passed

* chore: retrigger CI
2026-08-17 14:22:17 -04:00
Hector Ventura 9e35046647 Docs/enviroment instead yml (#764)
* docs: moving all config to env instead of yml
* docs: sync with main and new features
* docs: reverting docker-compose.yml
2026-05-10 11:53:31 -05:00
Hector Ventura e4d8d44724 feat: adding appconfig service (#324)
* feat: adding appconfig service
* fix: unittest appconfig service
2026-04-10 02:43:08 -05:00