fix(bedrock-agentcore-alpha): self-managed memory strategy validation throws on unresolved tokens#37691
Conversation
… throws on unresolved tokens
|
Exemption Request: This change only adds synth-time token guards to existing validation logic; the runtime behavior and generated CloudFormation are unchanged, so an integration test would not exercise anything that unit tests don't already cover. |
leonmk-aws
left a comment
There was a problem hiding this comment.
Thank you for your contribution!
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
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). |
Merge Queue Status
This pull request spent 11 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. |
|
@Mergifyio update |
❌ Mergify doesn't have permission to updateDetailsFor security reasons, Mergify can't update this pull request. Try updating locally. |
|
@Mergifyio requeue |
☑️ Command disallowed due to command restrictions in the Mergify configuration.Details
|
Pull request has been modified.
|
@leonmk-aws |
|
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). |
Merge Queue Status
This pull request spent 29 minutes 11 seconds in the queue, including 28 minutes 53 seconds running CI. Required conditions to merge
|
|
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). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
None
Reason for this change
The validation in
SelfManagedMemoryStrategythrows when unresolved CDK tokens (e.g.CfnParameter.valueAsNumber) are passed forhistoricalContextWindowSizeor thetriggerConditionsfields. These values can't be checked at synth time and should be skipped.Description of changes
Added
Token.isUnresolved()/Duration.isUnresolved()guards inself-managed-strategy.ts, following the same pattern as_validateMemoryExpirationDays(memory.ts) andvalidateLifecycleConfiguration(runtime.ts). Same approach as #37197.Describe any new or updated permissions being added
None.
Description of how you validated changes
Added unit tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license