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

[no-Jira] Remove Amplify caching #1210

Closed
wants to merge 1 commit into from
Closed

Conversation

canac
Copy link
Contributor

@canac canac commented Nov 22, 2024

Description

Recent PRs (likely since the Next.js 13 upgrade and the migrating to Amplify Web Compute) are deploying in preview but the changes aren't showing up in production or staging. I'm trying removing caching of .next/cache and adding caching of node_modules to match the Amplify configuration in the Next.js SSR docs.

Testing

  • Go to staging and check whether the Contact Us beacon link opens in a new tab or not. If it opens in a new tab, the latest code from staging successfully deployed.

Checklist:

  • I have given my PR a title with the format "MPDX-(JIRA#) (summary sentence max 80 chars)"
  • I have applied the appropriate labels. (Add the label "On Staging" to get the branch automatically merged into staging.)
  • I have requested a review from another person on the project

@canac canac added the Preview Environment Add this label to create an Amplify Preview label Nov 22, 2024
@canac canac requested a review from dr-bizz November 22, 2024 16:20
@canac canac self-assigned this Nov 22, 2024
Copy link
Contributor

Preview branch generated at https://remove-amplify-caching.d3dytjb8adxkk5.amplifyapp.com

Copy link
Contributor

Bundle sizes [mpdx-react]

Compared against d3c5364

No significant changes found

Copy link
Contributor

@dr-bizz dr-bizz left a comment

Choose a reason for hiding this comment

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

Let's give this a go. You are probably going to do this, but lets squash these 2 commits together.

Can you merge this into staging first?

@canac canac added the On Staging Will be merged to the staging branch by Github Actions label Nov 22, 2024
Successful deploys to Amplify weren't being deployed, so stop caching
.next/cache and start caching node_modules as recommended by
https://docs.aws.amazon.com/amplify/latest/userguide/deploy-nextjs-app.html#build-setting-detection
@canac canac force-pushed the remove-amplify-caching branch from 2b9c60c to 99a7ade Compare November 22, 2024 16:41
@canac
Copy link
Contributor Author

canac commented Nov 22, 2024

It turns out that the issue was the autogenerated Amplify redirects redirecting requests to an old CloudFront deployment. I removed them, and everything works now. This PR isn't needed.

@canac canac closed this Nov 22, 2024
@canac canac deleted the remove-amplify-caching branch December 4, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
On Staging Will be merged to the staging branch by Github Actions Preview Environment Add this label to create an Amplify Preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants