Skip to content

CI | Mint Integration with NooBaa #9123

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 1 commit into from
Jul 6, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
41 changes: 41 additions & 0 deletions .github/workflows/mint-nc-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

name: Mint NC Tests
on: [workflow_call]

jobs:
mint-nc-tests:
name: Mint NC Tests
runs-on: ubuntu-latest
timeout-minutes: 90
permissions:
actions: read # download-artifact
contents: read # required for actions/checkout
steps:
- name: Checkout noobaa-core
uses: actions/checkout@v4
with:
repository: 'noobaa/noobaa-core'
path: 'noobaa-core'

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: noobaa-tester
path: /tmp

- name: Load image
run: docker load --input /tmp/noobaa-tester.tar

- name: Create Mint logs directory
run: |
set -x
cd ./noobaa-core
mkdir -p logs/mint-nc-test-logs
chmod 777 logs/mint-nc-test-logs

- name: Run NC Mint tests
run: |
set -x
cd ./noobaa-core
make test-nc-mint -o tester

41 changes: 41 additions & 0 deletions .github/workflows/mint-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Mint Tests
on: [workflow_call]

jobs:
mint-tests:
name: Mint Tests
runs-on: ubuntu-latest
timeout-minutes: 90
permissions:
actions: read # download-artifact
contents: read # required for actions/checkout
steps:
- name: Checkout noobaa-core
uses: actions/checkout@v4
with:
repository: 'noobaa/noobaa-core'
path: 'noobaa-core'

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: noobaa-tester
path: /tmp

- name: Load image
run: docker load --input /tmp/noobaa-tester.tar
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify artifact path is correct.

Based on past feedback, ensure the artifact path /tmp/noobaa-tester.tar is correct. If actions/download-artifact extracts to <path>/<artifact-name>/, the path should be /tmp/noobaa-tester/noobaa-tester.tar.


🏁 Script executed:

#!/bin/bash
# Description: Check how actions/download-artifact works with the specified path

# Search for other download-artifact usage patterns in the codebase
echo "=== Searching for download-artifact usage patterns ==="
rg -A 5 -B 2 "download-artifact" .github/workflows/

echo "=== Checking for docker load patterns ==="
rg -A 2 -B 2 "docker load" .github/workflows/

Length of output: 14634


Update docker load path to include artifact directory

The actions/download-artifact step with path: /tmp will place the downloaded files under /tmp/noobaa-tester/, so the tarball ends up at /tmp/noobaa-tester/noobaa-tester.tar, not /tmp/noobaa-tester.tar.

Please update the “Load image” step in .github/workflows/mint-tests.yaml:

  • File: .github/workflows/mint-tests.yaml
    Step: “Load image” (around line 26)
- run: docker load --input /tmp/noobaa-tester.tar
+ run: docker load --input /tmp/noobaa-tester/noobaa-tester.tar

(You may also want to apply the same fix across the other workflows that use download-artifact name: noobaa-tester path: /tmp.)

🤖 Prompt for AI Agents
In .github/workflows/mint-tests.yaml at line 26, the docker load command uses an
incorrect path for the tarball file. Update the path from /tmp/noobaa-tester.tar
to /tmp/noobaa-tester/noobaa-tester.tar to match the artifact download location.
Also, check other workflows using the same artifact download path and apply the
same fix if needed.


- name: Create Mint logs directory
run: |
set -x
cd ./noobaa-core
mkdir -p logs/mint-test-logs
chmod 777 logs/mint-test-logs

- name: Run Mint tests
run: |
set -x
cd ./noobaa-core
make test-mint -o tester


8 changes: 8 additions & 0 deletions .github/workflows/run-pr-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ jobs:
needs: build-noobaa-image
uses: ./.github/workflows/warp-nc-tests.yaml

mint-tests:
needs: build-noobaa-image
uses: ./.github/workflows/mint-tests.yaml

mint-nc-tests:
needs: build-noobaa-image
uses: ./.github/workflows/mint-nc-tests.yaml
Comment on lines +44 to +50
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix YAML indentation for new jobs.

The new mint-tests and mint-nc-tests jobs have incorrect indentation. In GitHub Actions YAML, jobs should be indented with 8 spaces under the jobs: key.

Apply this diff to fix the indentation:

-  mint-tests:
-    needs: build-noobaa-image
-    uses: ./.github/workflows/mint-tests.yaml
-
-  mint-nc-tests:
-    needs: build-noobaa-image
-    uses: ./.github/workflows/mint-nc-tests.yaml
+  mint-tests:
+    needs: build-noobaa-image
+    uses: ./.github/workflows/mint-tests.yaml
+
+  mint-nc-tests:
+    needs: build-noobaa-image
+    uses: ./.github/workflows/mint-nc-tests.yaml

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 45-45: wrong indentation: expected 8 but found 4

(indentation)


[warning] 49-49: wrong indentation: expected 8 but found 4

(indentation)

🤖 Prompt for AI Agents
In .github/workflows/run-pr-tests.yaml around lines 44 to 50, the jobs
`mint-tests` and `mint-nc-tests` are incorrectly indented. To fix this, indent
both job definitions with 8 spaces under the `jobs:` key to comply with GitHub
Actions YAML syntax. Adjust the indentation of the entire job blocks
accordingly.


build-noobaa-image:
name: Build Noobaa Image
runs-on: ubuntu-latest
Expand Down
69 changes: 63 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,17 @@ ifdef testname
endif
endif

######################
# S3SELECT VARIABLES #
######################

BUILD_S3SELECT?=1
BUILD_S3SELECT_PARQUET?=0

## RPM VARIABLES
#################
# RPM VARIABLES #
#################

DATE := $(shell date +'%Y%m%d')
NOOBAA_PKG_VERSION := $(shell jq -r '.version' < ./package.json)
RPM_BASE_VERSION := noobaa-core-$(NOOBAA_PKG_VERSION)-${DATE}
Expand All @@ -96,6 +103,14 @@ endif
RPM_FULL_PATH := $(RPM_BASE_VERSION).el${CENTOS_VER}.$(ARCH_SUFFIX).rpm
install_rpm_and_deps_command := dnf install -y make && rpm -i $(RPM_FULL_PATH) && systemctl enable noobaa --now && systemctl status noobaa && systemctl stop noobaa

##################
# MINT VARIABLES #
##################

MINT_MOCK_ACCESS_KEY="aaaaaaaaaaaaaEXAMPLE"
MINT_MOCK_SECRET_KEY="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaEXAMPLE"
MINT_NOOBAA_HTTP_ENDPOINT_PORT=6001

###############
# BUILD LOCAL #
###############
Expand Down Expand Up @@ -353,6 +368,42 @@ test-nc-warp: tester
$(CONTAINER_ENGINE) run $(CPUSET) --privileged --user root --name noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX) --env "SUPPRESS_LOGS=$(SUPPRESS_LOGS)" -v $(PWD)/logs:/logs $(TESTER_TAG) "./src/test/system_tests/warp/run_nc_warp_on_test_container.sh"
.PHONY: test-nc-warp

test-mint: tester
@echo "\033[1;34mRunning mint tests with Postgres.\033[0m"
@$(call create_docker_network)
@$(call run_postgres)
@echo "\033[1;34mRunning mint tests\033[0m"
$(CONTAINER_ENGINE) run $(CPUSET) --name noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX) -dit --network noobaa-net --env "SUPPRESS_LOGS=$(SUPPRESS_LOGS)" --env "POSTGRES_HOST=coretest-postgres-$(GIT_COMMIT)-$(NAME_POSTFIX)" --env "POSTGRES_USER=noobaa" --env "DB_TYPE=postgres" --env "POSTGRES_DBNAME=coretest" -v $(PWD)/logs/mint-test-logs/:/logs $(TESTER_TAG) bash -c "./src/test/system_tests/mint/run_mint_on_test_container.sh & tail -f /dev/null"
sleep 180
$(CONTAINER_ENGINE) run --name mint-$(GIT_COMMIT)-$(NAME_POSTFIX) --network noobaa-net -v $(PWD)/logs/mint-test-logs/:/mint/log --env SERVER_ENDPOINT=noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX):$(MINT_NOOBAA_HTTP_ENDPOINT_PORT) --env ACCESS_KEY=$(MINT_MOCK_ACCESS_KEY) --env SECRET_KEY=$(MINT_MOCK_SECRET_KEY) --env ENABLE_HTTPS=0 minio/mint minio-go s3cmd
@echo "\033[1;34mPrinting noobaa configuration and logs\033[0m"
$(CONTAINER_ENGINE) logs noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX)
@echo "\033[1;34mPrinting mint results file\033[0m"
cat $(PWD)/logs/mint-test-logs/log.json
@$(call disconnect_container_from_noobaa_network, mint-$(GIT_COMMIT)-$(NAME_POSTFIX))
$(CONTAINER_ENGINE) rm mint-$(GIT_COMMIT)-$(NAME_POSTFIX)
@$(call stop_noobaa)
@$(call stop_postgres)
@$(call remove_docker_network)
.PHONY: test-mint


test-nc-mint: tester
@echo "\033[1;34mRunning mint tests on NC environment\033[0m"
@$(call create_docker_network)
$(CONTAINER_ENGINE) run $(CPUSET) --name noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX) -dit --privileged --user root --env "SUPPRESS_LOGS=$(SUPPRESS_LOGS)" --network noobaa-net -v $(PWD)/logs/mint-nc-test-logs/:/logs $(TESTER_TAG) bash -c "./src/test/system_tests/mint/run_nc_mint_on_test_container.sh; tail -f /dev/null"
sleep 15
$(CONTAINER_ENGINE) run --name mint-$(GIT_COMMIT)-$(NAME_POSTFIX) --network noobaa-net -v $(PWD)/logs/mint-nc-test-logs/:/mint/log --env RUN_ON_FAIL=0 --env SERVER_ENDPOINT=noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX):$(MINT_NOOBAA_HTTP_ENDPOINT_PORT) --env ACCESS_KEY=$(MINT_MOCK_ACCESS_KEY) --env SECRET_KEY=$(MINT_MOCK_SECRET_KEY) --env ENABLE_HTTPS=0 minio/mint minio-go s3cmd
@echo "\033[1;34mPrinting noobaa configuration and logs\033[0m"
$(CONTAINER_ENGINE) logs noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX)
@echo "\033[1;34mPrinting mint results file\033[0m"
cat $(PWD)/logs/mint-nc-test-logs/log.json
@$(call disconnect_container_from_noobaa_network, mint-$(GIT_COMMIT)-$(NAME_POSTFIX))
$(CONTAINER_ENGINE) rm mint-$(GIT_COMMIT)-$(NAME_POSTFIX)
@$(call stop_noobaa)
@$(call remove_docker_network)
.PHONY: test-nc-mint

test-nsfs-cephs3: tester
@echo "\033[1;34mRunning Ceph S3 tests on NSFS Standalone platform\033[0m"
$(CONTAINER_ENGINE) run $(CPUSET) --privileged --user root --name noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX) --env "SUPPRESS_LOGS=$(SUPPRESS_LOGS)" -v $(PWD)/logs:/logs $(TESTER_TAG) "./src/test/system_tests/ceph_s3_tests/run_ceph_nsfs_test_on_test_container.sh"
Expand Down Expand Up @@ -413,7 +464,7 @@ clean:

define stop_noobaa
@echo "\033[1;34mStopping/removing test container\033[0m"
$(CONTAINER_ENGINE) network disconnect noobaa-net noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX)
$(call disconnect_container_from_noobaa_network, noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX))
$(CONTAINER_ENGINE) stop noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX)
$(CONTAINER_ENGINE) rm noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX)
@echo "\033[1;32mRemoving test container done.\033[0m"
Expand All @@ -435,6 +486,12 @@ define remove_docker_network
@echo "\033[1;32mRemove docker network done.\033[0m"
endef

define disconnect_container_from_noobaa_network
echo "\033[1;34mDisconnect container $(1) from noobaa network\033[0m"; \
$(CONTAINER_ENGINE) network disconnect noobaa-net $(1); \
echo "\033[1;34mDisconnect container $(1) from noobaa network done.\033[0m"
endef

#########
# MONGO #
#########
Expand All @@ -447,7 +504,7 @@ endef

define stop_mongo
@echo "\033[1;34mStopping/removing Mongo container\033[0m"
$(CONTAINER_ENGINE) network disconnect noobaa-net coretest-mongo-$(GIT_COMMIT)-$(NAME_POSTFIX)
$(call disconnect_container_from_noobaa_network, coretest-mongo-$(GIT_COMMIT)-$(NAME_POSTFIX))
$(CONTAINER_ENGINE) stop coretest-mongo-$(GIT_COMMIT)-$(NAME_POSTFIX)
$(CONTAINER_ENGINE) rm coretest-mongo-$(GIT_COMMIT)-$(NAME_POSTFIX)
@echo "\033[1;32mStop mongo done.\033[0m"
Expand All @@ -467,7 +524,7 @@ endef

define stop_postgres
@echo "\033[1;34mStopping/removing Postgres container\033[0m"
$(CONTAINER_ENGINE) network disconnect noobaa-net coretest-postgres-$(GIT_COMMIT)-$(NAME_POSTFIX)
$(call disconnect_container_from_noobaa_network, coretest-postgres-$(GIT_COMMIT)-$(NAME_POSTFIX))
$(CONTAINER_ENGINE) stop coretest-postgres-$(GIT_COMMIT)-$(NAME_POSTFIX)
$(CONTAINER_ENGINE) rm coretest-postgres-$(GIT_COMMIT)-$(NAME_POSTFIX)
@echo "\033[1;32mStop postgres done.\033[0m"
Expand All @@ -487,7 +544,7 @@ endef

define stop_external_postgres
@echo "\033[1;34mStopping/removing Postgres container\033[0m"
$(CONTAINER_ENGINE) network disconnect noobaa-net ssl-pg-$(GIT_COMMIT)-$(NAME_POSTFIX)
$(call disconnect_container_from_noobaa_network, ssl-pg-$(GIT_COMMIT)-$(NAME_POSTFIX))
$(CONTAINER_ENGINE) stop ssl-pg-$(GIT_COMMIT)-$(NAME_POSTFIX)
$(CONTAINER_ENGINE) rm ssl-pg-$(GIT_COMMIT)-$(NAME_POSTFIX)
@echo "\033[1;32mStop postgres done.\033[0m"
Expand Down Expand Up @@ -518,7 +575,7 @@ define stop_blob_mock
@echo "\033[1;34mStopping blob mock server if RUN_BLOB_MOCK=$(RUN_BLOB_MOCK) is true.\033[0m"
@ if [ $(RUN_BLOB_MOCK) = true ]; then \
echo "\033[1;34mStopping tests with Blob mock.\033[0m"; \
$(CONTAINER_ENGINE) network disconnect noobaa-net blob-mock-$(GIT_COMMIT)-$(NAME_POSTFIX); \
$(call disconnect_container_from_noobaa_network, blob-mock-$(GIT_COMMIT)-$(NAME_POSTFIX)); \
$(CONTAINER_ENGINE) stop blob-mock-$(GIT_COMMIT)-$(NAME_POSTFIX); \
$(CONTAINER_ENGINE) rm blob-mock-$(GIT_COMMIT)-$(NAME_POSTFIX); \
fi
Expand Down
107 changes: 107 additions & 0 deletions docs/CI & Tests/Mint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Mint Github Action, Tests and Tool

1. [Introduction](#introduction)
2. [Mint GitHub actions](#mint-github-actions)
3. [Mint Makefile Targets](#mint-makefile-targets)
4. [Manual Mint Installation](#manual-mint-installation)



## Introduction

[Mint](https://github.com/minio/mint) is a testing framework for S3-compatible object storage systems, NooBaa CI runs Mint as correctness/benchmarking and stress tests for the NooBaa system on both containerized and Non Containerized flavors.
Following are the SDKs/tools used in correctness tests.

- awscli
- aws-sdk-go
- aws-sdk-java
- aws-sdk-java-v2
- aws-sdk-php
- aws-sdk-ruby
- healthcheck
- mc
- minio-go
- minio-java
- minio-js
- minio-py
- s3cmd
- s3select
- versioning

## Mint GitHub actions

NooBaa CI contains 2 Github actions that build, configure and run Mint. These Github actions run automatically on every PR and on every push, and can run by workflow dispatch manually.
* [Mint Tests](../../.github/workflows/mint-tests.yaml) - Based on NooBaa Tester image, runs Mint on standard NooBaa (db configuration).
* [Mint NC Tests](../../.github/workflows/mint-nc-tests.yaml) - Based on NooBaa Tester image, runs Mint on non-containerized NooBaa (ConfigFS configuration).

Our next goal is to add longer Mint runs as part of NooBaa's nightly CI process.

## Mint Makefile Targets

One can run Mint tests on NooBaa using Mint Makefile targets -
* `make test-mint` - Based on NooBaa Tester image, runs Mint on standard NooBaa (db configuration).
* `make test-nc-mint` - Based on NooBaa Tester image, runs Mint on non-containerized NooBaa (ConfigFS configuration).

The above makefile targets, build NooBaa tester image, and later deploy NooBaa (DB/ConfigFS deployments), create default account and runs the supported sdks on Mint per the deployment type.

Currently, the supported mint test frameworks are:
1. s3cmd
2. minio-go

## Manual Mint Installation

NC deployment -
1. Tab 1 - Install NooBaa
2. Tab 2 - Create a NooBaa account.
2. Tab 2 - Run Mint pointing to NooBaa endpoint -
```
docker run -e SERVER_ENDPOINT=<noobaa-endpoint-address>:<noobaa-endpoint-http-port> -e ACCESS_KEY=<pre-existing-account-access-key> -e SECRET_KEY=<pre-existing-account-secret-key> -e ENABLE_HTTPS=0 minio/mint <sdk-or-tool-name>
```

Developer notes -


To manually run a MinIO Mint container that connects to a noobaa-tester container, ensure both containers are on the same Docker network (noobaa-net).


If the noobaa-tester is already connected to noobaa-net, your Mint run command should look like this:
```
docker run -e SERVER_ENDPOINT=<noobaa-tester-container-id-or-name>:<noobaa-http-endpoint-port> -e ACCESS_KEY=<pre-existing-account-access-key> -e SECRET_KEY=<pre-existing-account-secret-key> -e ENABLE_HTTPS=0 --network noobaa-net minio/mint <sdk-or-tool-name>
```

Replace <sdk-or-tool-name> with the specific SDK or tool you want to test (e.g., aws-sdk-java, minio-go, s3cmd, etc.).

## Debugging Mint on NooBaa locally -
Running `make test-mint` will generate the following debug log files -

```bash
noobaa-core % tree logs/mint-test-logs
logs/mint-test-logs
├── log.json // contains the Mint run results
├── minio-go
│   └── error.log // contains errors coming from minio-go run
├── mint-test-logs
│   ├── backingstore1.log // contains noobaa backingstore logs
│   ├── bg.log // contains noobaa BG workers logs
│   ├── hosted_agents.log // contains noobaa hosted agents logs
│   ├── s3.log // contains noobaa endpoint logs
│   └── web.log // contains noobaa webserver logs
└── s3cmd
└── error.log // contains errors coming from s3-cmd run

```

Running `make test-nc-mint` will generate the following debug log files -

```bash
noobaa-core % tree /mint-nc-test-logs
logs/mint-nc-test-logs
├── log.json // contains the Mint run results
├── minio-go
│   └── error.log // contains errors coming from minio-go run
├── mint-nc-test-logs
│   └── nsfs.log // contains NC noobaa endpoint logs
└── s3cmd
└── error.log // contains errors coming from s3-cmd run

```
2 changes: 1 addition & 1 deletion src/endpoint/s3/s3_errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ S3Error.NoLoggingStatusForKey = Object.freeze({
});
S3Error.NoSuchBucket = Object.freeze({
code: 'NoSuchBucket',
message: 'The specified bucket does not exist.',
message: 'The specified bucket does not exist',
http_code: 404,
});
S3Error.NoSuchKey = Object.freeze({
Expand Down
Loading