Skip to content

chore: merge from master #4131

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

Merged
merged 15 commits into from
Aug 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
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
6 changes: 3 additions & 3 deletions .github/workflows/autoupdate-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Find JIRA ticket
id: find
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: mongodb/apix-action/find-jira@3024080388613583e3bd119bfb1ab4b4dbf43c42
uses: mongodb/apix-action/find-jira@222db38e5893a57f26bd156999713aa98a55b92c
with:
token: ${{ secrets.JIRA_API_TOKEN }}
jql: project = CLOUDP and summary ~ "Bump Atlas GO SDK to '${{ steps.version.outputs.VERSION }}'"
Expand All @@ -40,7 +40,7 @@ jobs:
run: |
echo "JIRA_KEY=${{steps.find.outputs.issue-key}}" >> "$GITHUB_ENV"
- name: Create JIRA ticket
uses: mongodb/apix-action/create-jira@3024080388613583e3bd119bfb1ab4b4dbf43c42
uses: mongodb/apix-action/create-jira@222db38e5893a57f26bd156999713aa98a55b92c
id: create
if: (steps.verify-changed-files.outputs.files_changed == 'true') && (steps.find.outputs.found == 'false')
with:
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
- name: set Apix Bot token
if: steps.verify-changed-files.outputs.files_changed == 'true'
id: app-token
uses: mongodb/apix-action/token@3024080388613583e3bd119bfb1ab4b4dbf43c42
uses: mongodb/apix-action/token@222db38e5893a57f26bd156999713aa98a55b92c
with:
app-id: ${{ secrets.APIXBOT_APP_ID }}
private-key: ${{ secrets.APIXBOT_APP_PEM }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/autoupdate-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Find JIRA ticket
id: find
if: env.FILES_CHANGED == 'true'
uses: mongodb/apix-action/find-jira@3024080388613583e3bd119bfb1ab4b4dbf43c42
uses: mongodb/apix-action/find-jira@222db38e5893a57f26bd156999713aa98a55b92c
with:
token: ${{ secrets.JIRA_API_TOKEN }}
jql: project = CLOUDP AND status NOT IN (Closed, Resolved) AND summary ~ "Update Autogenerated Commands"
Expand All @@ -39,7 +39,7 @@ jobs:
run: |
echo "JIRA_KEY=${{steps.find.outputs.issue-key}}" >> "$GITHUB_ENV"
- name: Create JIRA ticket
uses: mongodb/apix-action/create-jira@3024080388613583e3bd119bfb1ab4b4dbf43c42
uses: mongodb/apix-action/create-jira@222db38e5893a57f26bd156999713aa98a55b92c
id: create
if: (env.FILES_CHANGED == 'true') && (steps.find.outputs.found == 'false')
with:
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
- name: set Apix Bot token
if: env.FILES_CHANGED == 'true'
id: app-token
uses: mongodb/apix-action/token@3024080388613583e3bd119bfb1ab4b4dbf43c42
uses: mongodb/apix-action/token@222db38e5893a57f26bd156999713aa98a55b92c
with:
app-id: ${{ secrets.APIXBOT_APP_ID }}
private-key: ${{ secrets.APIXBOT_APP_PEM }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/close-jira.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
JIRA_KEY=$(gh pr view "$URL" --comments | grep 'was created for internal tracking' | grep -oE 'CLOUDP-[0-9]+' | head -1)
echo "JIRA_KEY=$JIRA_KEY" >> "$GITHUB_ENV"
- name: Close JIRA ticket
uses: mongodb/apix-action/transition-jira@v8
uses: mongodb/apix-action/transition-jira@v12
with:
token: ${{ secrets.JIRA_API_TOKEN }}
issue-key: ${{ env.JIRA_KEY }}
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/code-health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
go install github.com/mattn/[email protected]
- run: make unit-test
- name: Send coverage
if: matrix.os == 'ubuntu-latest'
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: goveralls -parallel -coverprofile="$COVERAGE" -ignore=test/* -service=github
Expand Down Expand Up @@ -316,8 +317,6 @@ jobs:
config: ${{ vars.PERMISSIONS_CONFIG }}
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
Expand All @@ -327,11 +326,18 @@ jobs:
go install github.com/mattn/[email protected]
- name: set Apix Bot token
id: app-token
uses: mongodb/apix-action/token@3024080388613583e3bd119bfb1ab4b4dbf43c42
uses: mongodb/apix-action/token@222db38e5893a57f26bd156999713aa98a55b92c
with:
app-id: ${{ secrets.APIXBOT_APP_ID }}
private-key: ${{ secrets.APIXBOT_APP_PEM }}
- run: make e2e-test-snapshots
- run: |
set +e
make e2e-test-snapshots
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
echo "::error::Snapshot tests failed, consider adding label 'update-snapshots' to re-generate them"
fi
exit $EXIT_CODE
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
TEST_CMD: gotestsum --junitfile e2e-tests.xml --format standard-verbose --
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependabot-create-jira-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fetch-depth: 2
- name: set Apix Bot token
id: app-token
uses: mongodb/apix-action/token@3024080388613583e3bd119bfb1ab4b4dbf43c42
uses: mongodb/apix-action/token@222db38e5893a57f26bd156999713aa98a55b92c
with:
app-id: ${{ secrets.APIXBOT_APP_ID }}
private-key: ${{ secrets.APIXBOT_APP_PEM }}
Expand All @@ -40,7 +40,7 @@ jobs:
echo "JIRA_TEAM=$JIRA_TEAM"
echo "assigned_team=$JIRA_TEAM" >> "${GITHUB_OUTPUT}"
- name: Create JIRA ticket
uses: mongodb/apix-action/create-jira@v8
uses: mongodb/apix-action/create-jira@v12
id: create
with:
token: ${{ secrets.JIRA_API_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-update-purls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
config: ${{ vars.PERMISSIONS_CONFIG }}
- name: Set Apix Bot token
id: app-token
uses: mongodb/apix-action/token@3024080388613583e3bd119bfb1ab4b4dbf43c42
uses: mongodb/apix-action/token@222db38e5893a57f26bd156999713aa98a55b92c
with:
app-id: ${{ secrets.APIXBOT_APP_ID }}
private-key: ${{ secrets.APIXBOT_APP_PEM }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
username: "${{ secrets.DOCKERHUB_USER }}"
password: "${{ secrets.DOCKERHUB_SECRET }}"
- name: Install Cosign
uses: sigstore/cosign-installer@398d4b0eeef1380460a10c8013a76f728fb906ac
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159
with:
cosign-release: 'v2.2.3'
- name: Verify Signature Docker Image
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
username: "${{ secrets.QUAY_USER }}"
password: "${{ secrets.QUAY_TOKEN }}"
- name: Install Cosign
uses: sigstore/cosign-installer@398d4b0eeef1380460a10c8013a76f728fb906ac
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159
with:
cosign-release: 'v2.2.3'
- name: Verify Signature Quay Image
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
with:
config: ${{ vars.PERMISSIONS_CONFIG }}
- name: Create JIRA ticket
uses: mongodb/apix-action/create-jira@v8
uses: mongodb/apix-action/create-jira@v12
id: create
with:
token: ${{ secrets.JIRA_API_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
if echo "$labels" | grep -q "need-doc-review"; then
echo "review_needed=true" >> "$GITHUB_ENV"
fi
- uses: marocchino/sticky-pull-request-comment@d2ad0de260ae8b0235ce059e63f2949ba9e05943
- uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405
id: append_comment
if: env.review_needed == 'true'
with:
Expand Down
108 changes: 54 additions & 54 deletions .github/workflows/update-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,53 +13,53 @@ jobs:
strategy:
fail-fast: false
matrix:
tags:
- atlas,autogeneration
- atlas,backup,compliancepolicy
- atlas,backup,flex
- atlas,backup,exports,buckets
- atlas,backup,exports,jobs
- atlas,backup,restores
- atlas,backup,schedule
- atlas,backup,snapshot
- atlas,clusters,file
- atlas,clusters,flags
- atlas,clusters,flex
- atlas,clusters,m0
- atlas,clusters,sharded
- atlas,clusters,upgrade
- atlas,datafederation,db
- atlas,datafederation,privatenetwork
- atlas,datafederation,querylimits
# - atlas,decrypt # requires live calls to GCP/AWS/Azure
# - atlas,deployments,atlasclusters # one assertion connects to DB (needs live mode)
# - atlas,deployments,local,auth,deprecated # needs docker to run
# - atlas,deployments,local,auth,new # needs docker to run
# - atlas,deployments,local,nocli # needs docker to run
# - atlas,deployments,local,noauth # needs docker to run
- atlas,generic
- atlas,interactive
- atlas,ldap
- atlas,livemigrations
- atlas,logs
- atlas,metrics
- atlas,networking
- atlas,onlinearchive
- atlas,performanceAdvisor
- atlas,plugin,install
- atlas,plugin,run
- atlas,plugin,uninstall
- atlas,plugin,update
- atlas,processes
- atlas,search
- atlas,search_nodes
- atlas,serverless,instance
- atlas,streams
- atlas,streams_with_cluster
- atlas,clusters,iss
packages:
- atlas/autogeneration
- atlas/backup/compliancepolicy
- atlas/backup/flex
- atlas/backup/exports/buckets
- atlas/backup/exports/jobs
- atlas/backup/restores
- atlas/backup/schedule
- atlas/backup/snapshot
- atlas/clusters/file
- atlas/clusters/flags
- atlas/clusters/flex
- atlas/clusters/m0
- atlas/clusters/sharded
- atlas/clusters/upgrade
- atlas/datafederation/db
- atlas/datafederation/privatenetwork
- atlas/datafederation/querylimits
- atlas/decrypt
- atlas/deployments/atlasclusters
- atlas/deployments/local/auth/deprecated
- atlas/deployments/local/auth/new
- atlas/deployments/local/nocli
- atlas/deployments/local/noauth
- atlas/generic
- atlas/interactive
- atlas/ldap
- atlas/livemigrations
- atlas/logs
- atlas/metrics
- atlas/networking
- atlas/onlinearchive
- atlas/performanceAdvisor
- atlas/plugin/install
- atlas/plugin/run
- atlas/plugin/uninstall
- atlas/plugin/update
- atlas/processes
- atlas/search
- atlas/search_nodes
- atlas/serverless/instance
- atlas/streams
- atlas/streams_with_cluster
- atlas/clusters/iss
- atlas/iam
- brew
- config
- atlas,iam
- kubernetes
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
Expand All @@ -78,7 +78,7 @@ jobs:
- run: make e2e-test
env:
TEST_CMD: gotestsum --junitfile e2e-tests.xml --format standard-verbose --
E2E_TAGS: ${{ matrix.tags }}
E2E_TEST_PACKAGES: ./test/e2e/{{ matrix.packages }}/...
MONGODB_ATLAS_ORG_ID: ${{ secrets.MONGODB_ATLAS_ORG_ID }}
MONGODB_ATLAS_PROJECT_ID: ${{ secrets.MONGODB_ATLAS_PROJECT_ID }}
MONGODB_ATLAS_PUBLIC_API_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_API_KEY }}
Expand All @@ -101,13 +101,14 @@ jobs:
E2E_TIMEOUT: 3h
- name: set artifact name
if: always()
id: set-artifact-name
run: |
echo "NAME=snapshots_${{ matrix.tags }}" | sed "s|,|_|g" >> "$GITHUB_ENV"
echo "NAME=snapshots_${{ matrix.packages }}" | sed "s|/|_|g" >> "$GITHUB_OUTPUT"
- name: upload artifact
if: always()
uses: actions/[email protected]
with:
name: ${{ env.NAME }}
name: ${{ steps.set-artifact-name.outputs.NAME }}
path: test/e2e/testdata/.snapshots
include-hidden-files: true
- name: Test Summary
Expand Down Expand Up @@ -135,7 +136,7 @@ jobs:
- run: make e2e-test
env:
TEST_CMD: gotestsum --junitfile e2e-tests.xml --format standard-verbose --
E2E_TAGS: atlas,cleanup
E2E_TEST_PACKAGES: ./test/internal/...
MONGODB_ATLAS_ORG_ID: ${{ secrets.MONGODB_ATLAS_ORG_ID }}
MONGODB_ATLAS_PROJECT_ID: ${{ secrets.MONGODB_ATLAS_PROJECT_ID }}
MONGODB_ATLAS_PUBLIC_API_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_API_KEY }}
Expand All @@ -154,7 +155,6 @@ jobs:
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
E2E_TIMEOUT: 3h
E2E_TEST_PACKAGES: ./test/internal..
- name: Test Summary
if: always()
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86
Expand All @@ -167,7 +167,7 @@ jobs:
steps:
- name: set Apix Bot token
id: app-token
uses: mongodb/apix-action/token@3024080388613583e3bd119bfb1ab4b4dbf43c42
uses: mongodb/apix-action/token@222db38e5893a57f26bd156999713aa98a55b92c
with:
app-id: ${{ secrets.APIXBOT_APP_ID }}
private-key: ${{ secrets.APIXBOT_APP_PEM }}
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
merge-multiple: true
- name: Find JIRA ticket
id: find
uses: mongodb/apix-action/find-jira@3024080388613583e3bd119bfb1ab4b4dbf43c42
uses: mongodb/apix-action/find-jira@222db38e5893a57f26bd156999713aa98a55b92c
with:
token: ${{ secrets.JIRA_API_TOKEN }}
jql: project = CLOUDP AND status NOT IN (Closed, Resolved) AND summary ~ "Update Test Snapshots"
Expand All @@ -221,7 +221,7 @@ jobs:
run: |
echo "JIRA_KEY=${{steps.find.outputs.issue-key}}" >> "$GITHUB_ENV"
- name: Create JIRA ticket
uses: mongodb/apix-action/create-jira@3024080388613583e3bd119bfb1ab4b4dbf43c42
uses: mongodb/apix-action/create-jira@222db38e5893a57f26bd156999713aa98a55b92c
id: create
if: steps.find.outputs.found == 'false'
with:
Expand Down Expand Up @@ -256,7 +256,7 @@ jobs:
echo "JIRA_KEY=${{steps.create.outputs.issue-key}}" >> "$GITHUB_ENV"
- name: set Apix Bot token
id: app-token
uses: mongodb/apix-action/token@3024080388613583e3bd119bfb1ab4b4dbf43c42
uses: mongodb/apix-action/token@222db38e5893a57f26bd156999713aa98a55b92c
with:
app-id: ${{ secrets.APIXBOT_APP_ID }}
private-key: ${{ secrets.APIXBOT_APP_PEM }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-ssdlc-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
config: ${{ vars.PERMISSIONS_CONFIG }}
- name: set Apix Bot token
id: app-token
uses: mongodb/apix-action/token@3024080388613583e3bd119bfb1ab4b4dbf43c42
uses: mongodb/apix-action/token@222db38e5893a57f26bd156999713aa98a55b92c
with:
app-id: ${{ secrets.APIXBOT_APP_ID }}
private-key: ${{ secrets.APIXBOT_APP_PEM }}
Expand Down
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
version: "2"
run:
build-tags:
- e2e
modules-download-mode: readonly
tests: true
linters:
Expand Down
18 changes: 1 addition & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,8 @@ The following is a short list of commands that can be run in the root of the pro
- Run `make` to see a list of available targets.
- Run `make test` to run all unit tests.
- Run `make lint` to validate against our linting rules.
- Run `E2E_TAGS=e2e,atlas make e2e-test` will run end-to-end tests against an Atlas instance,
- Run `make e2e-test` will run end-to-end tests,
please make sure to have set `MCLI_*` variables pointing to that instance.
- Run `E2E_TAGS=cloudmanager,remote,generic make e2e-test` will run end-to-end tests against a Cloud Manager instance.<br />
Please remember to: (a) have a running automation agent, and (b) set MCLI\_\* variables to point to your Cloud Manager instance.
- Run `make build` to generate a local binary in the `./bin` folder.

We provide a git pre-commit hook to format and check the code, to install it run `make link-git-hooks`.
Expand All @@ -80,18 +78,6 @@ We provide a git pre-commit hook to format and check the code, to install it run
We use [mockgen](go.uber.org/mock) to handle mocking in our unit tests.
If you need a new mock please update or add the `//go:generate` instruction to the appropriate file.

#### Compilation in VSCode

Please add the following line to your `.vscode/settings.json` file :
```json
{
"go.buildTags": "e2e",
"go.testTags": "e2e"
}
```

This will enable compilation for unit and end-to-end tests.

#### Debugging in VSCode

To debug in VSCode, you must create a debug configuration for the command with the required arguments.
Expand Down Expand Up @@ -138,8 +124,6 @@ Review and replace the atlas settings.

```json
{
"go.buildTags": "e2e",
"go.testTags": "e2e",
"go.testEnvVars": {
"ATLAS_E2E_BINARY": "${workspaceFolder}/bin/atlas",
"UPDATE_SNAPSHOTS": "skip",
Expand Down
Loading
Loading