Skip to content

Commit

Permalink
fern-bot: increase timeout and memory and shallow clone (#902)
Browse files Browse the repository at this point in the history
  • Loading branch information
armandobelardo authored May 22, 2024
1 parent fbffba5 commit 1634547
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions servers/fern-bot/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ provider:
runtime: nodejs18.x
deploymentMethod: direct
region: "us-east-1"
# 900 second timeout, e.g. 15 minutes
timeout: 900
# 10GB memory
memorySize: 10240
environment:
AWS_NODEJS_CONNECTION_REUSE_ENABLED: "1"
NODE_OPTIONS: "--enable-source-maps --stack-trace-limit=1000"
Expand All @@ -20,6 +24,8 @@ provider:
REPO_TO_RUN_ON: ${env:REPO_TO_RUN_ON, 'OMIT'}
functions:
updateOpenApiSpec:
# 10GB storage
ephemeralStorageSize: 10240
handler: "src/functions/oas-cron/updateOpenApiSpec.handler"
# Adding a layer to have git available in the lambda
# https://github.com/lambci/git-lambda-layer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async function updateOpenApiSpecInternal(

const authedCloneUrl = repository.clone_url.replace("https://", `https://x-access-token:${installationToken}@`);
// Clone the repo to fullRepoPath and update the branch
await git.clone(authedCloneUrl, ".");
await git.clone(authedCloneUrl, ".", ["--depth", "1"]);
// Configure git to show the app as the committer
await git.addConfig("user.name", fernBotLoginName);
await git.addConfig("user.email", `${fernBotLoginId}+${fernBotLoginName}@users.noreply.github.com`);
Expand Down

0 comments on commit 1634547

Please sign in to comment.