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

Deploy integration test backends using amplify CLI in headless mode. #71

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

rjuliano
Copy link
Contributor

Issue #, if available:

Description of changes:

CDK App

CDK app that creates CodeBuild projects used to build and deploy amplify backends to support the various integration test scenarios for amplify-android.

CodeBuild assets

Scripts and other components used by the CodeBuild project. These scripts use the amplify CLI in headless mode to setup the amplify projects. Schema files are located under the schemas folder and are loosely grouped by the integration tests for each respective module in amplify-android

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

@lgtm-com
Copy link

lgtm-com bot commented Dec 29, 2020

This pull request introduces 7 alerts and fixes 3 when merging 0837ec4 into 6834d2f - view on LGTM.com

new alerts:

  • 7 for Unused import

fixed alerts:

  • 3 for 'import *' may pollute namespace

Copy link
Contributor

@jamesonwilliams jamesonwilliams left a comment

Choose a reason for hiding this comment

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

Looks good!

For the schema files, can you name them like:

  • events_api.graphql
  • person_car.graphql
  • team_project.graphql
  • blog_api.graphql
  • comments_blogs.graphql

Please be sure to update the high-level documentation, to mention the functionality that's available:

  • ./README.md
  • ./src/integ_test_resources/android/README.md

And add a new one under ./src/integ_test_resources/android/amplify/README.md (or one of the child dirs) that talks about howto setup the Amplify resources.

Looks like we're at a point now where we can provision the API and DataStore AppSync dependencies, is that right? Cognito auth stuff, too? Do we have a way to generate configuration files for this stuff? Maybe through amplify CLI, itself? Anyway, these are all questions I have as an interested customer of this work. It'd be great to get into a README.

Depending on how far we are now, we should also update Amplify Android's CONTRIBUTING.md so that contributors (me, you, Susie Q) can run the tests in our own dev accounts.

REMOVE = "remove"

def parse_arguments():
parser = argparse.ArgumentParser(description="Utility that runs the Amplify CLI in headless mode to provision backend resources for integration tests.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Woohoo!

@lgtm-com
Copy link

lgtm-com bot commented Dec 30, 2020

This pull request introduces 7 alerts and fixes 3 when merging 5a17034 into 6834d2f - view on LGTM.com

new alerts:

  • 7 for Unused import

fixed alerts:

  • 3 for 'import *' may pollute namespace

@rjuliano
Copy link
Contributor Author

Looks good!

For the schema files, can you name them like:

  • events_api.graphql
  • person_car.graphql
  • team_project.graphql
  • blog_api.graphql
  • comments_blogs.graphql

Done.

Please be sure to update the high-level documentation, to mention the functionality that's available:

  • ./README.md
  • ./src/integ_test_resources/android/README.md

And add a new one under ./src/integ_test_resources/android/amplify/README.md (or one of the child dirs) that talks about howto setup the Amplify resources.

Yes...I'll work on that next.

Looks like we're at a point now where we can provision the API and DataStore AppSync dependencies, is that right? Cognito auth stuff, too?

Correct. That's currently what we are doing for the backends used by the DataStore and API tests. It configures Amplify apps with Auth and API since those two categories can be setup in headless mode via the CLI. Devs can also choose to deploy to their own account during development. I'll add instructions for that in the README.

Do we have a way to generate configuration files for this stuff? Maybe through amplify CLI, itself? Anyway, these are all questions I have as an interested customer of this work. It'd be great to get into a README.

Yes...we should be able to, but it's not currently automated. Right now, I'm manually copying the config files to the S3 bucket in the build account (which is different than the AWS accounts that host the backend). The integration tests just copy the files from there before running the build . I'm currently considering a couple options:

  1. Publish the config files at the end of a successful build since those artifacts are already there as a result of using the CLI.
  2. Use the Amplify CLI before running the integration tests to pull the configuration.

Both will require some level of cross-account permissions.

Depending on how far we are now, we should also update Amplify Android's CONTRIBUTING.md so that contributors (me, you, Susie Q) can run the tests in our own dev accounts.

Yes. That should definitely make its way into that guide.

@lgtm-com
Copy link

lgtm-com bot commented Dec 30, 2020

This pull request introduces 7 alerts and fixes 3 when merging ebaaafb into 6834d2f - view on LGTM.com

new alerts:

  • 7 for Unused import

fixed alerts:

  • 3 for 'import *' may pollute namespace

@lgtm-com
Copy link

lgtm-com bot commented Dec 31, 2020

This pull request introduces 7 alerts and fixes 3 when merging c81bb18 into 6834d2f - view on LGTM.com

new alerts:

  • 7 for Unused import

fixed alerts:

  • 3 for 'import *' may pollute namespace

@lgtm-com
Copy link

lgtm-com bot commented Jan 5, 2021

This pull request introduces 7 alerts and fixes 3 when merging 6916b19 into 3bcce6b - view on LGTM.com

new alerts:

  • 7 for Unused import

fixed alerts:

  • 3 for 'import *' may pollute namespace

@lgtm-com
Copy link

lgtm-com bot commented Jan 6, 2021

This pull request introduces 7 alerts and fixes 3 when merging c4ebbd2 into 3bcce6b - view on LGTM.com

new alerts:

  • 7 for Unused import

fixed alerts:

  • 3 for 'import *' may pollute namespace

@lgtm-com
Copy link

lgtm-com bot commented Jan 6, 2021

This pull request introduces 7 alerts and fixes 3 when merging a457a28 into 3bcce6b - view on LGTM.com

new alerts:

  • 7 for Unused import

fixed alerts:

  • 3 for 'import *' may pollute namespace

@lgtm-com
Copy link

lgtm-com bot commented Jan 6, 2021

This pull request fixes 3 alerts when merging 0cdd502 into 3bcce6b - view on LGTM.com

fixed alerts:

  • 3 for 'import *' may pollute namespace

@lgtm-com
Copy link

lgtm-com bot commented Jan 29, 2021

This pull request introduces 1 alert and fixes 3 when merging 7aad6ba into 3bcce6b - view on LGTM.com

new alerts:

  • 1 for Unused import

fixed alerts:

  • 3 for 'import *' may pollute namespace

@lgtm-com
Copy link

lgtm-com bot commented Apr 30, 2021

This pull request introduces 2 alerts and fixes 5 when merging 536ca37 into f961f16 - view on LGTM.com

new alerts:

  • 1 for Unused import
  • 1 for 'import *' may pollute namespace

fixed alerts:

  • 5 for 'import *' may pollute namespace

@lgtm-com
Copy link

lgtm-com bot commented May 12, 2021

This pull request introduces 2 alerts and fixes 5 when merging 2e6597b into b962c57 - view on LGTM.com

new alerts:

  • 1 for Unused import
  • 1 for 'import *' may pollute namespace

fixed alerts:

  • 5 for 'import *' may pollute namespace

@lgtm-com
Copy link

lgtm-com bot commented May 20, 2021

This pull request introduces 2 alerts and fixes 5 when merging 5421bc4 into b962c57 - view on LGTM.com

new alerts:

  • 1 for Unused import
  • 1 for 'import *' may pollute namespace

fixed alerts:

  • 5 for 'import *' may pollute namespace

@lgtm-com
Copy link

lgtm-com bot commented Jun 18, 2021

This pull request introduces 2 alerts and fixes 5 when merging 699b872 into eab1055 - view on LGTM.com

new alerts:

  • 1 for Unused import
  • 1 for 'import *' may pollute namespace

fixed alerts:

  • 5 for 'import *' may pollute namespace

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.

2 participants