Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bedrock): replace PrepareAgent with shouldPrepareAgent prop #250

Merged
merged 2 commits into from
Feb 11, 2024

Conversation

jstrunk
Copy link
Contributor

@jstrunk jstrunk commented Feb 7, 2024

Per discussions with @massi-ang and the CloudFormation team, there shouldn't be a resource to call PrepareAgent as it doesn't create anything. This change replaces the custom resource with an optional property called shouldPrepareAgent that calls and waits for the agent to be prepared after creating or updating the agent, action group, or knowledge base association custom resources.

Alias creation and updates still prepare the agent first. Developers can choose whether to use shouldPrepareAgent or create an alias that tracks the latest changes to ensure that their agent is prepared. This change makes the alias custom resource use the same function to prepare the agent and wait as the others.

This change replaces the complicated changeId hashes with the updatedAt timestamps returned by the SDK in order to determine when to update the alias.

Custom Resource exceptions are reraised by the retry mechanism.


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

Copy link

codecov bot commented Feb 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (main@c1b2c61). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #250   +/-   ##
=======================================
  Coverage        ?   94.88%           
=======================================
  Files           ?       35           
  Lines           ?     8391           
  Branches        ?      244           
=======================================
  Hits            ?     7962           
  Misses          ?      429           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@krokoko krokoko merged commit 16e8779 into awslabs:main Feb 11, 2024
12 checks passed
@jstrunk jstrunk deleted the bedrock-prepare-agent branch January 21, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants