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

Option 2: Split out schema generation. #2169

Conversation

sobolk
Copy link
Member

@sobolk sobolk commented Oct 30, 2024

This is a (preferred?) alternative to #2167 .

The idea here is to split out schema computations from data construct creation. So that schema computation can become both input to function and data construct.

Elements:

  1. Split schema generation logic.
  2. Add new concept in construct container to register provider/factory method that can provide arbitrary piece of data.

The upside of this solution is that schema is can be bundling time asset without network calls from lambda.

The downside (if this is a downside at all?) is that we're inventing new way of how verticals can communicate and construct container becomes closer to be generic DI container (like syringe) where modules may register arbitrary logic. (which can be abused if contract between verticals established this way is not guarded with proper types/interfaces which become public api of a vertical).

rtpascual and others added 2 commits October 29, 2024 17:01
* update ctrl+c behavior to always print guidance and not prompt

* pr feedback

* Update .changeset/bright-jokes-draw.md

Co-authored-by: Kamil Sobol <[email protected]>

---------

Co-authored-by: Kamil Sobol <[email protected]>
// const todos = (await client.models.Todo.list()).data;
// return todos.length;

console.log(process.env.MIS);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works as well.

image

rtpascual and others added 21 commits October 30, 2024 13:26
* feed pr base sha and ref into envs before scripts

* removing empty file
* Propagate errors to AppSync

* this works

* more tests

* validation error

* more tests
…ry (#2174)

* Remove tool usage for non current turns when looking up message history

* remove that.
…nstruct (#2087)

* fix: clearing the .amplify/generated/env/ before synthesis

* fix: clearing the .amplify/generated/env/ before synthesis

* fix: clearing the .amplify/generated/env/ before synthesis

* fix: clearing the .amplify/generated/env/ before synthesis

* fix: clearing the .amplify/generated/env/ before synthesis

* fix: clearing the .amplify/generated/env/ before synthesis

* chore: add changeset

* fix: clearing the .amplify/generated/env/ before synthesis

* fix: clearing the .amplify/generated/env/ before synthesis

* fix: clearing the .amplify/generated/env/ before synthesis

* fix: Clear generated env directory before shim generation

* fix: Clear generated env directory before shim generation

* fix: Clear generated env directory before shim generation

* fix: Clear generated env directory before shim generation

* chore: add changeset

* fix: Clear generated env directory before shim generation

* fix: Clear generated env directory before shim generation

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* feat: adding custom lambda function trigger for email

* cleanup

* chore: removed unwanted changesets

* chore: preparing for merge

* chore: preparing for merge

* chore: preparing for merge

* feat: added a functionality to translate auth-props for custom fucntion email

* chore: added changeset

* chore: added new API

* feat: added a functionality to translate auth-props for custom fucntion email

* feat: added a test case to cover custom function in backend-auth

* feat: added a test case to cover custom function in backend-auth

* feat: added a test case to cover custom function in backend-auth

* feat: added a test case to cover custom function in backend-auth

* feat: added a test case to cover custom function in backend-auth

* feat: narrowed down the permission by updating the conditions

* Refactored the code

* Refactored the code

* added a test case for checking lambdaTrigger={} empty condition

* added a test case for checking lambdaTrigger={} empty condition

* Merge Branch

* Merge Branch

* Merge Branch

* Merge Branch

* Merge Branch

* Merge Branch

* Merge Branch

* Merge Branch

* Merge Branch

* Merge Branch

* fixed the code to use addTrigger instead of manually setting up permissions

* added KMS Key for customEmailSender

* changed KMS key to not read-only

* changed the test case to include lambdaArn

* add a test case validation for KMS key

* fixed the code to use addTrigger instead of manually setting up permissions

* added KMS Key for customEmailSender

* changed KMS key to not read-only

* changed the test case to include lambdaArn

* add a test case validation for KMS key

* detect transform errors with multiple errors (#2102)

* detect transform errors with multiple errors

* new method of getting multiple transform errors

* Add minify option to defineFunction (#2093)

* Add minify option to defineFunction

* Add unit tests and e2e tests when set minify option to false

* Add changeset

* Update API.md

* add bundling options

* Update .changeset/pink-rockets-dance.md

* use optional chaining

* include funcNoMinify into function.ts

---------

Co-authored-by: Kamil Sobol <[email protected]>

* upgrade constructs (#2103)

* Remove deprecated messages field from event (#2106)

* detect generic CFN stack creation errors (#2108)

* Fix cdk tests when new dependencies are shipped to npm. (#2107)

* Fix cdk tests when new dependencies are shipped to npm.

* try this

* try this

* try this

* try this

* API changes

* Update API changes

* Added kmsKeyArn for custom user KMS keys

* chore: added changesets and updated API's

* chore: added changesets

* Added integration tests for customEmailSender

* updated the API files to reflect master

* feat: added customSenderEmail with types and added exceptions to eslint dict

* chore: Updated API

* chore: Updated API

* chore: updated API

* Delete packages/ai-constructs/API.md

* chore: Updated API

* chore: delete unused file

* chore: update changeset

* chore: update changeset

* chore: Updated API and changeSets

* chore: Updated the API from main

* API updates to resolve conflicting naming

* Updated the types in backend-auth

* chore: Updated changesets

* Added custom Email handler function and refactored the types of auth-construct

* chore: updated API

---------

Co-authored-by: Roshane Pascual <[email protected]>
Co-authored-by: MURAKAMI Masahiko <[email protected]>
Co-authored-by: Kamil Sobol <[email protected]>
Co-authored-by: Kamil Sobol <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Handle parameter not found error while deleting secret

* remove if
* avoid client config generation race condition

* remove rejectCleanupSandbox action

* add changeset

* try this

* update deployment test template
* Handle case where synthesis renders empty cdk assembly

* fix test

* undo that

* actual fix
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
)

* add validation if layer arn region does not match function region

* add backend to changeset

* update function region in test and add conditional logic for region
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add metadata to user agent in conversation handler runtime

* tests

* remove validation.
Copy link

changeset-bot bot commented Nov 5, 2024

🦋 Changeset detected

Latest commit: d900a82

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@aws-amplify/ai-constructs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@stocaaro stocaaro deleted the branch stocaaro/data-funct-dep-issue/main November 11, 2024 16:06
@stocaaro stocaaro closed this Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants