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

refactor(ci): Allow region split #3708

Merged
merged 7 commits into from
Sep 25, 2023
Merged

refactor(ci): Allow region split #3708

merged 7 commits into from
Sep 25, 2023

Conversation

dnys1
Copy link
Contributor

@dnys1 dnys1 commented Sep 7, 2023

Refactors the E2E stack to allow splitting the stacks between regions. Some features are not available in eu-south-1 so we will be splitting the categories between us-west-2 (analytics, storage) and eu-south-1 (auth).

In particular this makes each category's stack a true Stack instead of a NestedStack so they can have their own region.

Before: Root (Stack) -> Category (NestedStack) -> Category Environment (NestedStack)
After: Root (Stack) -> Category (Stack) -> Category Environment (NestedStack)

This also migrates a lot of the configuration management to the backend. A Trigger runs after every deployment to upload the consolidated amplifyconfiguration.dart file. The local Dart file simply downloads the file instead of uploading it.

This also moves the GitHub OIDC and secrets management to CDK so that manual management of the secrets is no longer needed - they are updated automatically after each deployment. To protect Amplify app IDs, a custom resource pulls app IDs on deployment using hard-coded app names (which are not secret).

Overall, this provides cleaner separation of resources and improves deployment speed by a few minutes on average. It also means categories can be deployed independently again and rollbacks happen per category, not for the whole backend.

@dnys1
Copy link
Contributor Author

dnys1 commented Sep 8, 2023

See last "fixes" commit for passing workflows

@dnys1 dnys1 marked this pull request as ready for review September 8, 2023 17:31
@dnys1 dnys1 requested a review from a team as a code owner September 8, 2023 17:31
@dnys1 dnys1 added the pr:squash PR should be submitted with a sqaush commit label Sep 8, 2023
Equartey
Equartey previously approved these changes Sep 8, 2023
For testing eventual consistency issues.
@dnys1 dnys1 merged commit 6512bf6 into main Sep 25, 2023
1 check passed
@dnys1 dnys1 deleted the ci/eu-south-1 branch September 25, 2023 19:47
Equartey pushed a commit that referenced this pull request Oct 26, 2023
* refactor(ci): Allow region split

* ci(auth): Use `eu-south-1`

For testing eventual consistency issues.

* trigger ci

* test

* test

* revert eu-south-1

* Remove test
Equartey pushed a commit that referenced this pull request Oct 30, 2023
* refactor(ci): Allow region split

* ci(auth): Use `eu-south-1`

For testing eventual consistency issues.

* trigger ci

* test

* test

* revert eu-south-1

* Remove test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:squash PR should be submitted with a sqaush commit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants