Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ functions:
params:
shell: "bash"
working_dir: src/go.mongodb.org/mongo-driver
add_expansions_to_env: true
script: |
${PREPARE_SHELL}
export BASE_SHA=${revision}
Expand All @@ -415,6 +416,7 @@ functions:
params:
shell: "bash"
working_dir: src/go.mongodb.org/mongo-driver
add_expansions_to_env: true
script: |
${PREPARE_SHELL}
export CONFIG=$PROJECT_DIRECTORY/.github/labeler.yml
Expand All @@ -427,6 +429,7 @@ functions:
params:
shell: "bash"
working_dir: src/go.mongodb.org/mongo-driver
add_expansions_to_env: true
script: |
${PREPARE_SHELL}
export CONFIG=$PROJECT_DIRECTORY/.github/reviewers.txt
Expand Down Expand Up @@ -932,6 +935,7 @@ tasks:
- name: pull-request-helpers
allowed_requesters: ["patch", "github_pr"]
commands:
- func: assume-test-secrets-ec2-role
- func: "add PR reviewer"
- func: "add PR labels"
- func: "create-api-report"
Expand Down Expand Up @@ -1988,11 +1992,11 @@ tasks:
params:
working_dir: src/go.mongodb.org/mongo-driver
shell: bash
add_expansions_to_env: true
env:
TEST_LAMBDA_DIRECTORY: ${PROJECT_DIRECTORY}/internal/test/faas/awslambda
LAMBDA_STACK_NAME: dbx-go-lambda
AWS_REGION: us-east-1
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
script: |
${PREPARE_SHELL}
pushd $TEST_LAMBDA_DIRECTORY/mongodb
Expand Down Expand Up @@ -2357,7 +2361,10 @@ task_groups:
setup_group:
- func: fetch-source
- func: prepare-resources
- func: assume-test-secrets-ec2-role
Copy link
Member

@vbabanin vbabanin Jun 9, 2025

Choose a reason for hiding this comment

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

[nit] Just to clarify - is assume-test-secrets-ec2-roleremoved to bump the duration to 3600? It is possible to define a variable for a function which is treated as expansions in the commands, so the duration could be parameterized in assume-test-secrets-ec2-role. Feel free to resolve - it is [nit].

Copy link
Member Author

Choose a reason for hiding this comment

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

We have a global 3600ms exec_timeout_secs. The issue was not extending the expansion with the env variables set by assuming the role. I will re-add this step.

- command: ec2.assume_role
params:
role_arn: ${LAMBDA_AWS_ROLE_ARN}
duration_seconds: 3600
- command: subprocess.exec
params:
working_dir: src/go.mongodb.org/mongo-driver
Expand All @@ -2375,6 +2382,7 @@ task_groups:
params:
working_dir: src/go.mongodb.org/mongo-driver
binary: bash
add_expansions_to_env: true
env:
LAMBDA_STACK_NAME: dbx-go-lambda
AWS_REGION: us-east-1
Expand Down
14 changes: 0 additions & 14 deletions internal/test/faas/awslambda/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,6 @@ Resources:
Variables:
MONGODB_URI: !Ref MongoDbUri

ApplicationResourceGroup:
Copy link
Member Author

Choose a reason for hiding this comment

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

Resolves GODRIVER-3557.

Type: AWS::ResourceGroups::Group
Properties:
Name:
Fn::Sub: ApplicationInsights-SAM-${AWS::StackName}
ResourceQuery:
Type: CLOUDFORMATION_STACK_1_0
ApplicationInsightsMonitoring:
Type: AWS::ApplicationInsights::Application
Properties:
ResourceGroupName:
Ref: ApplicationResourceGroup
AutoConfigurationEnabled: 'true'

Outputs:
MongoDBApi:
Description: "API Gateway endpoint URL for Prod stage for MongoDB function"
Expand Down
Loading