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

fix: Change defaultNextLambda removalPolicy from DESTROY to RETAIN #2420

Merged
merged 2 commits into from Apr 20, 2022
Merged

fix: Change defaultNextLambda removalPolicy from DESTROY to RETAIN #2420

merged 2 commits into from Apr 20, 2022

Conversation

jlegreid
Copy link
Contributor

@jlegreid jlegreid commented Apr 4, 2022

Issues:

As per this issue, there are times during builds where the old defaultNextLambda gets destroyed before the build has completed and incoming traffic is served a 503 error for pages that have not yet finished static generation.

Solution:

Change the removalPolicy of DESTROY on the defaultNextLambda to RETAIN, and in a separate PR, trigger a function to clean up old Lambda's after a build has completed successfully.

@slsnextbot
Copy link
Collaborator

slsnextbot commented Apr 4, 2022

Handler Size Report

No changes to handler sizes.

Base Handler Sizes (kB) (commit e7af519)

{
    "Lambda": {
        "Default Lambda": {
            "Standard": 1578,
            "Minified": 692
        },
        "Image Lambda": {
            "Standard": 1542,
            "Minified": 830
        }
    },
    "Lambda@Edge": {
        "Default Lambda": {
            "Standard": 1588,
            "Minified": 698
        },
        "Default Lambda V2": {
            "Standard": 1580,
            "Minified": 694
        },
        "API Lambda": {
            "Standard": 634,
            "Minified": 318
        },
        "Image Lambda": {
            "Standard": 1550,
            "Minified": 835
        },
        "Regeneration Lambda": {
            "Standard": 1233,
            "Minified": 566
        },
        "Regeneration Lambda V2": {
            "Standard": 1307,
            "Minified": 596
        }
    }
}

New Handler Sizes (kB) (commit 9922c1e)

{
    "Lambda": {
        "Default Lambda": {
            "Standard": 1578,
            "Minified": 692
        },
        "Image Lambda": {
            "Standard": 1542,
            "Minified": 830
        }
    },
    "Lambda@Edge": {
        "Default Lambda": {
            "Standard": 1588,
            "Minified": 698
        },
        "Default Lambda V2": {
            "Standard": 1580,
            "Minified": 694
        },
        "API Lambda": {
            "Standard": 634,
            "Minified": 318
        },
        "Image Lambda": {
            "Standard": 1550,
            "Minified": 835
        },
        "Regeneration Lambda": {
            "Standard": 1233,
            "Minified": 566
        },
        "Regeneration Lambda V2": {
            "Standard": 1307,
            "Minified": 596
        }
    }
}

@codecov
Copy link

codecov bot commented Apr 4, 2022

Codecov Report

Merging #2420 (9922c1e) into master (e7af519) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2420   +/-   ##
=======================================
  Coverage   83.59%   83.59%           
=======================================
  Files         102      102           
  Lines        3706     3706           
  Branches     1188     1188           
=======================================
  Hits         3098     3098           
  Misses        596      596           
  Partials       12       12           
Impacted Files Coverage Δ
...rless-components/nextjs-cdk-construct/src/index.ts 93.91% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7af519...9922c1e. Read the comment docs.

@dphang dphang merged commit 1baa444 into serverless-nextjs:master Apr 20, 2022
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.

None yet

3 participants