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

Amplify configured for next.js is not removing always removing all services #3024

Closed
4 tasks done
fnavarrodev opened this issue Oct 6, 2022 · 4 comments
Closed
4 tasks done
Labels
archived This issue has been locked. bug Something isn't working web-previews Related to preview branches

Comments

@fnavarrodev
Copy link

Before opening, please confirm:

App Id

d28nwgksusfkk0

Region

eu-west-1

Amplify Hosting feature

Not applicable

Describe the bug

We have issues using Amplify configured as Next.js. We had an app with ID d28nwgksusfkk0 than now is deleted. I noticed that some PRs and branches after being closed still had cloudfront, s3 buckets, Lambda functions and cloudwatch log groups. This is a big problem because at some point the buckets are more than 100 and we are over quota. Also I'm not sure if we are paying more for things that we are not using. We have other apps using Amplify and we don't even see all their infrastructure(cloudfront, S3...). I think there's a bug somewhere in Amplify for Next.js and Bitbucket. Now they are 3 cloudfronts and buckets even after deleting the app. Cloudfront IDS: E3CDR1ZN4TVPC, E3VT9FDUFW0OQN, EEYQSHDEE3LX5. Let me know if you need more information.

Expected behavior

We were expecting not seeing the infrastructure services in our account, as Amplify does with other kind of apps. At least we were expecting to some of them to be deleted after branches/PRs are closed.

Reproduction steps

  1. Make a next.js app
  2. Connect previews
  3. Connect branches
  4. Close PRs
  5. Close branches

Build Settings

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - rm -rf serverles.yml
        - rm -rf .serverless
        - printf "//`node -p \"require('url').parse(process.env.NPM_REGISTRY_URL || 'https://registry.npmjs.org').host\"`/:_authToken=${NPM_TOKEN}\nregistry=${NPM_REGISTRY_URL:-https://registry.npmjs.org}\n" >> ~/.npmrc
        - npm ci
    build:
      commands:
        - npm run build
  artifacts:
    baseDirectory: .next
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*
test:
  artifacts:
    baseDirectory: cypress
    configFilePath: '**/mochawesome.json'
    files:
      - '**/*.png'
      - '**/*.mp4'
  phases:
    preTest:
      commands:
        - npm install
        - npm install start-server-and-test cypress mocha mochawesome mochawesome-merge mochawesome-report-generator --save-dev
    test:
      commands:
        - npm run build
        - >-
          npx start-test 'npm start' 3000 'npx cypress run --reporter mochawesome --reporter-options
          "reportDir=cypress/report/mochawesome-report,overwrite=false,html=false,json=true,timestamp=mmddyyyy_HHMMss"'
    postTest:
      commands:
        - npx mochawesome-merge cypress/report/mochawesome-report/mochawesome*.json > cypress/report/mochawesome.json

Additional information

We use our own serverless infrastructure for production, this is why we have a serverless.yml in our repository. I don't know if this can affect.

@ghost ghost self-assigned this Oct 6, 2022
@ghost ghost added ssr Server Side Rendering feature bug Something isn't working labels Oct 6, 2022
@ghost
Copy link

ghost commented Oct 6, 2022

Hi @fnavarrodev 👋🏽 we apologize for this inconvenience. The team is root causing this behavior and we will respond with next steps once we have done some further investigation.

@nadetastic nadetastic added web-previews Related to preview branches and removed ssr Server Side Rendering feature labels May 24, 2023
@nadetastic
Copy link
Member

@fnavarrodev following up here, this issue was recently resolved and I can confirm that the resources created for the previews should be getting deleted as well. I'll go ahead and close out this issue for now.

Thanks!

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot added the archived This issue has been locked. label May 24, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived This issue has been locked. bug Something isn't working web-previews Related to preview branches
Projects
None yet
Development

No branches or pull requests

2 participants