Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
669e669
Remove old compilecheck test
RafaelCenzano Dec 4, 2025
d0d0045
Extract go versions into bash script
RafaelCenzano Dec 5, 2025
ce0bb58
inline go script and run go mod commands in container
RafaelCenzano Dec 5, 2025
dc99892
create Go 1.19 compilecheck
RafaelCenzano Dec 8, 2025
f523a71
Set CodeQL Go version to 1.25.0
RafaelCenzano Dec 9, 2025
aae2e31
Call tasks directly instead of through Taskfile
RafaelCenzano Dec 9, 2025
53192c1
add TODO for future ticket GODRIVER-3723
RafaelCenzano Dec 9, 2025
d9739fd
Remove uneeded compiling for each arch
RafaelCenzano Dec 9, 2025
eebe058
Copilot Suggestions
RafaelCenzano Dec 10, 2025
76252c2
clean up how the test is run/called
RafaelCenzano Dec 10, 2025
9ce3b58
Increase build compilation types
RafaelCenzano Dec 11, 2025
4f0f191
Remove uneeded architectures test as it is included in compile test
RafaelCenzano Dec 11, 2025
3b5384f
install libmongocrypt in container for build tags
RafaelCenzano Dec 11, 2025
2876500
try to correct issue with libmongocrypt
RafaelCenzano Dec 11, 2025
2f2741a
try to correct issue with build
RafaelCenzano Dec 12, 2025
46f7fb5
Redo the libmongocrypt implementation using the same setup as the Tas…
RafaelCenzano Dec 12, 2025
e04053f
try to capture dep in a different way
RafaelCenzano Dec 12, 2025
4c2c5ec
run install step for libmongocrypt
RafaelCenzano Dec 12, 2025
64e14ec
Update container creation
RafaelCenzano Dec 15, 2025
36247d2
Fix how tests are called
RafaelCenzano Dec 15, 2025
ae9a44e
Update dockerfile to use go 1.25 base
RafaelCenzano Dec 16, 2025
25360a6
Include inline main go file to test compilation as an import
RafaelCenzano Dec 16, 2025
3090403
Tweaks to fix the test
RafaelCenzano Dec 17, 2025
01e2f05
check output of go mod tidy
RafaelCenzano Dec 17, 2025
dab69c0
Parallelize
RafaelCenzano Dec 17, 2025
41c8316
Fix the erroneous runOnRequirements CSFLE disabled check in mtest. (#…
matthewdale Dec 10, 2025
cc99ff8
Skip snapshot sessions tests that require the new getSnapshotTime op.…
matthewdale Dec 11, 2025
6dc01a9
GODRIVER-3659 Add optin setting to await MinPoolSize population (#2258)
prestonvasquez Dec 12, 2025
66275a5
GODRIVER-3690 Add ErrorCodesFrom to the mongo package (#2241)
prestonvasquez Dec 16, 2025
474da0f
GODRIVER-3486 Support auto encryption in unified tests. (#2240)
qingyang-hu Dec 16, 2025
d243498
resolve go.mod issue
RafaelCenzano Dec 17, 2025
990c738
Address comments
RafaelCenzano Dec 18, 2025
411d243
Bump actions/upload-artifact from 5.0.0 to 6.0.0 in the actions group…
dependabot[bot] Dec 18, 2025
30721a2
Skip buggy handshake metadata test. (#2270)
matthewdale Dec 18, 2025
08217ae
Make architectures subtests
RafaelCenzano Dec 18, 2025
7cd1211
Pin to amd64 architecture
RafaelCenzano Dec 19, 2025
44acf46
Make improvements based off comments
RafaelCenzano Dec 19, 2025
6e1d31d
Merge branch 'master' into GODRIVER-3573
RafaelCenzano Dec 22, 2025
fefbb99
Remove package sudo
RafaelCenzano Dec 22, 2025
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
19 changes: 17 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.25.0"
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
Expand All @@ -40,8 +44,19 @@ jobs:
build-mode: manual
- name: Install Taskfile support
uses: arduino/setup-task@v2
- shell: bash
run: task build
- name: Install libmongocrypt
run: task install-libmongocrypt
- name: Build (CodeQL-instrumented)
shell: bash
env:
GOTOOLCHAIN: local
run: |
# TODO(GODRIVER-3723): Run using taskfile targets.
go build ./...
Copy link
Member

Choose a reason for hiding this comment

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

[blocking] We need to include the libmongocrypt task before building:

task install-libmongocrypt

If this doesn't work, try running the script manually:

bash etc/install-libmongocrypt.sh
test -d install || test -d /cygdrive/c/libmongocrypt/bin

If we have to do the latter, we should remove taskfile support:

      - name: Install Taskfile support
        uses: arduino/setup-task@v2

go build ${BUILD_TAGS} ./...
go test -short ${BUILD_TAGS} -run ^$$ ./...

go test -v ./internal/test/compilecheck -run '^TestCompileCheck/go:1\.19$'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ bin
internal/cmd/faas/awslambda/.aws-sam
internal/cmd/faas/awslambda/events/event.json

# Ignore compiled binaries from the compilecheck
internal/cmd/compilecheck/compilecheck
internal/cmd/compilecheck/compilecheck.so

# Ignore api report files
api-report.md
api-report.txt
Expand Down
39 changes: 15 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dockerfile for Go Driver local development.

# Build libmongocrypt in a separate build stage.
FROM artifactory.corp.mongodb.com/dockerhub/ubuntu:20.04 as libmongocrypt
FROM --platform=linux/amd64 golang:1.25.5-trixie AS libmongocrypt

RUN apt-get -qq update && \
apt-get -qqy install --no-install-recommends \
Expand All @@ -10,16 +10,19 @@ RUN apt-get -qq update && \
curl \
build-essential \
libssl-dev \
python
pkg-config \
python3 \
python3-packaging \
python-is-python3 && \
rm -rf /var/lib/apt/lists/*

COPY etc/install-libmongocrypt.sh /root/install-libmongocrypt.sh
RUN cd /root && bash ./install-libmongocrypt.sh


# Copy in the files from the libmongocrypt build stage.
FROM artifactory.corp.mongodb.com/dockerhub/ubuntu:20.04
# Final dev image (already has Go 1.25.x).
FROM --platform=linux/amd64 golang:1.25.5-trixie

# Install common deps.
RUN export DEBIAN_FRONTEND=noninteractive && \
export TZ=Etc/UTC && \
apt-get -qq update && \
Expand All @@ -28,35 +31,23 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
ca-certificates \
curl \
wget \
sudo \
tzdata \
ca-certificates \
pkg-config \
software-properties-common \
gpg \
apt-utils \
libc6-dev \
gcc \
make && \
sudo update-ca-certificates && \
rm -rf /var/lib/apt/lists/*

# Install golang from the golang-backports ppa.
RUN export DEBIAN_FRONTEND=noninteractive && \
export TZ=Etc/UTC && \
export LC_ALL=C.UTF-8 && \
sudo -E apt-add-repository "ppa:longsleep/golang-backports" && \
apt-get -qq update --option Acquire::Retries=100 --option Acquire::http::Timeout="60" && \
apt-get -qqy install --option Acquire::Retries=100 --option Acquire::http::Timeout="60" --no-install-recommends golang-go && \
make \
libkrb5-dev && \
update-ca-certificates && \
rm -rf /var/lib/apt/lists/*

# Install taskfile
RUN go install github.com/go-task/task/v3/cmd/task@latest

COPY ./etc/docker_entry.sh /root/docker_entry.sh

COPY etc/docker_entry.sh /root/docker_entry.sh
COPY --from=libmongocrypt /root/install /root/install

ENV DOCKER_RUNNING=true
# Copy the Go driver source for local development and compile checks.
COPY . /mongo-go-driver

ENV DOCKER_RUNNING=true
ENTRYPOINT ["/bin/bash", "/root/docker_entry.sh"]
16 changes: 6 additions & 10 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,15 @@ tasks:
- go build ./...
- go build ${BUILD_TAGS} ./...
- task: build-tests
- task: build-compile-check
- task: cross-compile
- task: compilecheck-119
build-tests: go test -short ${BUILD_TAGS} -run ^$$ ./...
build-compile-check: bash etc/compile_check.sh
compilecheck-119:
dir: internal/test/compilecheck
cmds:
- go mod download
- GOTOOLCHAIN=auto go test -v -run '^TestCompileCheck/go:1\.19$'
build-compile-check-all: bash etc/run-compile-check-test.sh
build-aws-ecs-test: go test -c ./internal/test/aws -o aws.testbin
cross-compile:
- GOOS=linux GOARCH=386 go build ./...
- GOOS=linux GOARCH=arm go build ./...
- GOOS=linux GOARCH=arm64 go build ./...
- GOOS=linux GOARCH=amd64 go build ./...
- GOOS=linux GOARCH=ppc64le go build ./...
- GOOS=linux GOARCH=s390x go build ./...
check-fmt:
deps: [install-lll]
cmds:
Expand Down
48 changes: 0 additions & 48 deletions etc/compile_check.sh

This file was deleted.

4 changes: 2 additions & 2 deletions etc/run-compile-check-test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env bash
# run-compile-check-test
# Run compile check tests.
# Run compile check tests for all supported Go versions.
set -eu
set +x

echo "Running internal/test/compilecheck"
pushd internal/test/compilecheck
GOWORK=off go test -timeout 30m -v ./... >>../../../test.suite
go test -timeout 30m -v ./... >>../../../test.suite
popd
1 change: 0 additions & 1 deletion go.work
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use (
./examples/_logger/zap
./examples/_logger/zerolog
./internal/cmd/benchmark
./internal/cmd/compilecheck
./internal/cmd/faas/awslambda/mongodb
./internal/test/compilecheck
./internal/test/goleak
Expand Down
20 changes: 0 additions & 20 deletions internal/cmd/compilecheck/go.mod

This file was deleted.

42 changes: 0 additions & 42 deletions internal/cmd/compilecheck/go.sum

This file was deleted.

5 changes: 0 additions & 5 deletions internal/cmd/compilecheck/go.work

This file was deleted.

24 changes: 0 additions & 24 deletions internal/cmd/compilecheck/main.go

This file was deleted.

Loading
Loading