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

[for reference] lambdas batch 1 vs backup #2

Closed
wants to merge 88 commits into from

Conversation

sobolk
Copy link
Owner

@sobolk sobolk commented Jul 7, 2023

Description of changes

Issue #, if available

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

akshbhu and others added 30 commits April 3, 2023 13:41
* chore(release): Publish rc [ci skip]

 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]

* chore: re-enable tests on windows (aws-amplify#12272)

* chore: re-enable tests on windows

* chore: fix the exclusion list

* chore: use small executor at wait step (aws-amplify#12275)

* chore: increase parallelization in e2e tests (aws-amplify#12276)

* chore: increase parallelization of tests

* chore: run searchable migration solo

* fix(amplify-util-uibuilder): update codegen-ui to 2.11.0 (aws-amplify#12265)

Co-authored-by: Justin Shih <[email protected]>

* fix(amplify-util-uibuilder): update codegen-ui to 2.11.0 (aws-amplify#12265)

Co-authored-by: Justin Shih <[email protected]>

* fix: source temp aws creds and ec2 instance credentials  using general level config (aws-amplify#12181)

* fix: added a test for general profile

* fix: added config change

* fix: exp1

* fix: running only single test

* fix: added aplify error for missing creds

* fix: fixes e2e

* fix: cci config file

* chore: fixes lint

* chore: fixes ci config again

* chore: running test in specific branches

* fix: running test after verification

* fix: address comments

* fix: e2e tests config

* chore: removes extra comments

* fix: fixes codeql warnings

* fix: config file

---------

Co-authored-by: Akshay Upadhyay <[email protected]>

* chore: use nodejs 14.x compatible with CDK (aws-amplify#12280)

* chore: use nodejs 14.x compatible with CDK

* chore: use nodejs 14.x compatible with CDK

* chore: use nodejs 14.x compatible with CDK

* fix: skip backend sync on force push (aws-amplify#12262)

* fix: skip backend sync on force push

* chore: use pkg-fetch fork (aws-amplify#12259)

* chore: fetch binaries from s3

* chore: fetch binaries from s3 (fix profile)

* chore: fetch binaries from s3 (make context single item not list)

* chore: fetch binaries from s3 (dummy commit)

* chore: use image with binaries

* chore: use image with binaries

* chore: change tag to latest

* chore: change hash

* fix: all floating promises (aws-amplify#12293)

* fix: all floating promises

* fix: make arrow functions async that have awaits

* chore: migrate from deprecated CDK api (aws-amplify#12297)

* chore(release): Publish latest [ci skip]

 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]

* chore: convert generic errors that are user errors to AmplifyErrors (aws-amplify#12296)

* chore: convert generic errors that are user errors to AmplifyErrors

* fix: run extract-api

* fix: unit test

* chore: use npm registry (aws-amplify#12300)

* chore: re-generate yarn.lock with NPM registry

* chore: replace urls

* chore: validate

* fix: set registry in build steps (aws-amplify#12303)

* fix: standalone test build

* fix: standalone test build

* fix: throws a warning for detector (aws-amplify#12307)

* fix: throws a warning for detector

* fix: address comments

* chore: fix unit test header

* chore: don't show deprecation warnings in binary (aws-amplify#12309)

* fix: enable help for category statuses (aws-amplify#12216)

* fix: enable help for category statuses

* test: add e2e test for status with help

* fix: handle bucket exists check for s3 buckets in opt in regions (aws-amplify#12298)

* fix: handle bucket exists check for s3 buckets in opt in regions

* test: add e2e tests for push, init, pull, env with help flag (aws-amplify#12310)

* test: add e2e tests for push, init, pull, env

* test: add e2e tests for push, init, pull, env (commit to restart build)

* test: fix help tests on windows with regex (aws-amplify#12314)

* chore: update pkg to 5.8.1 (aws-amplify#12322)

* chore: upgrade yarn (aws-amplify#12323)

* fix: fail `init --forcePush` fast if environment parameters or secrets are missing in the environment (aws-amplify#12279)

* chore: revise net6 baseline (aws-amplify#12327)

* fix: sso login (aws-amplify#12325)

* chore: undo custom resource exclusions on windows (aws-amplify#12329)

* chore: remove custom resource tests from windows exclusion list

* chore: undo these todos too

* chore: stick to us west

* chore: bump create-react-app scripts (aws-amplify#12334)

* chore: bump create-react-app scripts

* chore: fix that too

* fix:removing auth from local state if imported userpool is deleted (aws-amplify#12286)

* fix: cleanup auth resource when userpool not found

* fix: lint fixes

* fix: added e2e test for the scenario

* chore: address comments

* fix: added some refractoring

* fix: unit tests

* fix: lint fixes

* fix: fixing lint in auth files

* chore: removed unused imports

* chore: adjust warning

---------

Co-authored-by: Akshay Upadhyay <[email protected]>

* chore: reclassify file permissions errors as AmplifyError (aws-amplify#12336)

* chore: reclassify file permissions errors as AmplifyError

* fix: run extract-api

* chore(api): update api dependencies post 5.2.0 release (aws-amplify#12345)

* chore(api): update api dependencies post 5.2.0 release

* fix unit test

* lint fix

* change compile to implementation (aws-amplify#12313)

* chore: exclude auth test run on windows (aws-amplify#12355)

Co-authored-by: Akshay Upadhyay <[email protected]>

* fix: multi select race conditions (aws-amplify#12356)

* fix: null check for custom IAM policies Action array (aws-amplify#12346)

* chore: bump codegen deps (aws-amplify#12358)

* fix: reset readline terminal property on close (aws-amplify#12347)

* fix: reset readline terminal property on close
* test: ensure closeReadline is called on admin flow

* chore: complete amplify-prompts prefixing (aws-amplify#12360)

* fix: codegen version in snapshots (aws-amplify#12362)

* fix: yarn failures (aws-amplify#12368)

* chore: run e2e tests on windows on node18 (aws-amplify#12370)

* chore: run e2e tests on windows on node18

* chore: fix build

* chore: import from clodform-types instead of cloudform (aws-amplify#12371)

---------

Co-authored-by: aws-amplify-bot <[email protected]>
Co-authored-by: Kamil Sobol <[email protected]>
Co-authored-by: Justin Shih <[email protected]>
Co-authored-by: Justin Shih <[email protected]>
Co-authored-by: Akshay Upadhyay <[email protected]>
Co-authored-by: Pavel Lazar <[email protected]>
Co-authored-by: Zachary Goldberg <[email protected]>
Co-authored-by: Amplifiyer <[email protected]>
Co-authored-by: Edward Foyle <[email protected]>
Co-authored-by: Christopher Sundersingh <[email protected]>
Co-authored-by: Robert J. Lemmens <[email protected]>
Co-authored-by: Spencer Stolworthy <[email protected]>
Co-authored-by: Eddy Varela <[email protected]>
…amplify#12376)

* fix: removes userPool client lambda and update appclient secret

* fix: address comments

* fix: cci config

* fix: migration test snapshots

* fix: notification tests

* fix: fixes test again

* fix: fix test again

* chore: codeql warnings

* fix: fixes format changes

* chore: address comments

---------

Co-authored-by: Akshay Upadhyay <[email protected]>
* chore: add role mappings to role attachment for user pool clients

* chore: add get identity pool roles helper to e2e helpers

* test: add e2e test to test identity role mappings

* refactor: remove role map lambda

* test: add migration e2e test for role settings

* test: remove unused import

* test: add migration test for roles

* test: update snapshots

* fix: add depends on with user pool groups

* fix: fix linting warnings

* fix: fix prettier errors

* test: fix snapshot role attachments only included with user groups

* fix: remove empty object from cfn input

* fix: remove promise callback from chain

* test: fix snapshot

* fix: fix linting warnings/errors

* test: fix e2e test and add additional test

* fix: lint

* test: update snapshot for auth add all migration

* test: update snapshot to remove lambda artifacts

* test: add additional e2e test for update

* chore: update geo snapshot

* fix: update cognito stack on user pool group update

* fix: use boolean when creating role maps

* test: update snapshot to reflect added role attachments

* test: invoke cognito with region

---------

Co-authored-by: Kamil Sobol <[email protected]>
…callouts (aws-amplify#12426)

* revert: readd the hosted ui lambdas and the base role for the lambda callouts

* fix: change import list format
…plify#12274)

* feat: replace hosted ui lambda with user pool domain cfn code

* test: add e2e tests

* test: draft e2e migration test

* test: add lambda removal tests

* test: fix test and linting

* test: update scope names

* test: add fix to integration test

* test: add helper that adds signin/login urls

* fix: rename custom resource function name

* fix: use correct test helper for auth update

* chore: adding additional no-explicity-any due to e2e helpers not having typed arguments

* test: update snapshot for auth test

* fix: fix the chain of prompts for update auth

* fix: add types to the new helper methods

* chore: linter updates and remove unused policies

* fix: look for user pool domain type from domain resource

* fix: remove some lint warnings
* feat: replace lambda callout with oidc cfn code

* test: remove only from unit test

* fix: remove duplicates of imports

* fix: prettier write

* fix: change name of variable to ref oidc provider

* fix: assigning oidc provider arn to identity pool
* fix: replace oauth lambda with cfn

* fix: updated unit tests

* fix: updated migration test

* fix: updated snapshots

* fix: fixes test

* chore: update commennt

* fix: fixes lint

---------

Co-authored-by: Upadhyay <[email protected]>
Co-authored-by: Akshay Upadhyay <[email protected]>
…cess on NotFound exceptions (aws-amplify#12574)

* fix: add catch error to lambdas to prevent hanging CFN and return success on notfound exceptions

* fix: run linter and fix api extract
* feat: create social providers with cfn when lambda callout does not exist

* feat: replace lambda code with deleting resources

* fix: change template write to check if prop exists

* fix: remove debugger from app code

* test: update snapshot to remove hosted ui provider dependency

* test: add unit tests for stack builder object and transformer class

* chore: refactoring code and fixing linting

* fix: add missing types file

* test: add test for migration method helpers

* fix: change names of methods to reflect lambda responsibility and wrap addDep in if statement

* chore: move creating nested stack params to auth category

* fix: change let to const

* fix: remove unused import

* chore: move generating nested stack code to provider package

* fix: refactor tests

* fix: add more error exception for not found to lambda

* chore: remove auth dep from cloudformation package

* Update packages/amplify-provider-awscloudformation/src/push-resources.ts

Co-authored-by: John Hockett <[email protected]>

* fix: update comment and move return to separate line

---------

Co-authored-by: John Hockett <[email protected]>
…ources (aws-amplify#12610)

* fix: add custom resource dependency to the newly created provider resources

* fix: add clients as dependencies for providers

* test: update snapshot to reflect changed dependencies
…ed (aws-amplify#12609)

* fix: use all settled promise method to wait until deletes are attempted

* chore: prettify the lambda code
…lify#12677)

* fix: remove provider creds from template when not updated from user prompt

* chore: lint change
* fix: added migration test for user pool domain check

* chore: fixes prettier

* chore: address comments

* chore: removes snapshot

* chore: update test description
…/amplify-cli into feat/replace-lambda-callouts
…lify#12801)

* chore: refactor hostedUIProviderLambda.js to use async await

* chore: refactor hostedUIProviderLambda.js to use async await

* chore: fix lint
…ting (aws-amplify#12774)

* fix: update lambdas to properly handle not found errors

* test: update test snapshot to match updated lambda code

* chore: run linter

* fix: use parameter exception and throw error in lambdas

* fix: make lambda async

* test: update tests and snapshots
…ws-amplify#12725)

* fix: ensure parameters are added when migrating dependencies to cfn

* test: add mocks for path manager

* fix: remove undefined from path errors

* fix: check undefined before looking for client_id

* chore: update api extract

* fix: lint updates

* test: add unit tests for looking for migration resources

* chore: refactor files and add unit tests

* fix: lint

* fix: move migrate helpers to auth package

* chore: update api extract

* fix: make SDK call for provider creds and make call stack async

* chore: add typescript to dev dependencies

* chore: add helper method for getting user pool id from amplify meta

* chore: fix linting and update api extract

* test: update tests with fix

* chore: rename get provider creds function and update tests

* fix: move sdk calls to cloudformation provider module

* fix: create amplify meta util in auth

exports.handler = (event, context) => {
// Don't return promise, response.send() marks context as done internally
const ignoredPromise = handleEvent(event, context);

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused variable ignoredPromise.
}
}
return join(cbSpecsDir, specFile);
}

Check notice

Code scanning / CodeQL

Semicolon insertion

Avoid automated semicolon insertion (96% of all statements in [the enclosing function](1) have an explicit semicolon).

exports.handler = (event, context) => {
// Don't return promise, response.send() marks context as done internally
const ignoredPromise = handleEvent(event, context);

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused variable ignoredPromise.

const stateManagerMock = stateManager as jest.Mocked<typeof stateManager>;
const pathManagerMock = pathManager as jest.Mocked<typeof pathManager>;
const AmplifyFaultMock = AmplifyFault as jest.MockedClass<typeof AmplifyFault>;

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused variable AmplifyFaultMock.
@sobolk sobolk closed this Aug 18, 2023
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.

4 participants