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

CCM-7465: implement backend api PT.2 #260

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

Conversation

bhansell1
Copy link
Contributor

@bhansell1 bhansell1 commented Jan 13, 2025

Description

I closed the previous PR since it had over 200 items in the conversation. I've copied over the questions.

  • replaces amplify backend with our own backend-api

PT.3 will remove amplify entirely.

Context

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

… need for some reason?

Revert "CCM-7465: remove undefined from API response"

This reverts commit 33bd151.

CCM-7465: move undefined back
debug

add outputs

debug

debug

debug

debug

debug

debug

CCM-7465: create amplify_ouputs..json file instread of using process.env

CCM-7465: move .env

debug

debug

debug

debug

debug

debug

debug

debug

debug

debug

debug

debug
@@ -0,0 +1,18 @@
/*
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See Conversation.

#240 (comment)

return NextResponse.next();
}

const token = await getAccessTokenServer();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See conversation

#240 (comment)

@@ -333,7 +333,7 @@
"authorizerUri": "arn:aws:apigateway:${AWS_REGION}:lambda:path/2015-03-31/functions/${AUTHORIZER_LAMBDA_ARN}/invocations",
"authorizerCredentials": "${APIG_EXECUTION_ROLE_ARN}",
"identitySource": "method.request.header.authorization,context.resourceId,context.httpMethod",
"authorizerResultTtlInSeconds": 300
"authorizerResultTtlInSeconds": 0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@harrim91 - This is where I'm disabling the caching for now.

It was causing me issues and for the sake of getting this PR in I'll leave it disabled. It sounds like you've potentially got a fix for it in your upcoming PR?

@@ -4,9 +4,21 @@ import baseConfig from './playwright.config';
export default defineConfig({
...baseConfig,

timeout: 10_000,

timeout: 30_000, // 30 seconds in the playwright default
Copy link
Contributor Author

@bhansell1 bhansell1 Jan 13, 2025

Choose a reason for hiding this comment

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

I've increased these timeouts because creating a new sandbox the lambdas have a cold start which cause the pages to load slowly.

In some cases I've seen a page load take up to 8 seconds (this can be seen on a failed run via the traces). This seems to be combination of factors

  1. Page load (next SSR'd the page on first load takes ~2-3s)
  2. API call on a cold start takes ~3-4s

After initial loads the app seems okay but still somewhat sluggish.

@@ -84,7 +84,7 @@ test.describe('View submitted Email message template Page', () => {

await assertSkipToMainContent(props);
await assertNotifyBannerLink(props);
await assertLoginLink(props);
await assertLogoutLink(props);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've replaced all of the assertLoginLink tests in favor of adding in the assertLogoutLink. We have a ticket for negative testing CCM-7467

@@ -32,7 +32,7 @@ runs:
run: zip lines-of-code-report.json.zip lines-of-code-report.json
- name: "Upload CLOC report as an artefact"
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
Copy link
Contributor Author

Choose a reason for hiding this comment

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

GitHub was failing due to V3 being depreciated.

sandbox-set-up:
name: "Sandbox set up"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #259

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Once the above PR is merged into main I'll revert this change.

gparry333
gparry333 previously approved these changes Jan 14, 2025
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.

3 participants