From 2009156bf5ed5654774c2466f930cbb4e71e6f64 Mon Sep 17 00:00:00 2001 From: Tosone Date: Sat, 26 Sep 2026 13:06:35 +0800 Subject: [PATCH] ci: replace Minio with rs3 and make E2E CI run Run the self-hosted rs3 service instead of Minio in test.yml and swap the local helper script, Makefile helm values, and AGENTS.md notes accordingly. Fix the E2E workflow (refs #426): it only triggered on the `main` branch, which does not exist in this repository, so the job never ran. Trigger it on `dev` for both push and pull_request like test.yml, build the image via the consolidated `make docker-build`, bump the checkout/setup-go actions, drop the hosted-toolcache cleanup, and refresh the E2E tooling to k6 v2.3.0 and skopeo v1.24.1. Repair the image startup path as well: start nginx with an explicit /etc/nginx/nginx.conf and a /dev/stderr error log so the non-root user does not touch the compiled-in log path, create /etc/sigma with mode 0755 before copying config.yaml (COPY --chmod made the directory non-traversable), and disable redis in the shipped default config since cache, locker and work queue are inmemory. --- .github/workflows/e2e.yml | 26 ++++++----------- .github/workflows/gh-pages.yml | 1 - .github/workflows/image-build.yml | 3 -- .github/workflows/lint.yml | 3 -- .github/workflows/local-build.yml | 4 +-- .github/workflows/test.yml | 26 ++++++++++++----- AGENTS.md | 2 +- Makefile | 2 +- build/Dockerfile | 3 +- build/entrypoint | 2 +- conf/config.yaml | 4 ++- conf/default.conf.template | 1 + go.mod | 21 +++++++------- go.sum | 48 +++++++++++++++---------------- scripts/run_all.sh | 4 +-- scripts/run_minio.sh | 17 ----------- scripts/run_rs3.sh | 21 ++++++++++++++ 17 files changed, 95 insertions(+), 93 deletions(-) delete mode 100755 scripts/run_minio.sh create mode 100755 scripts/run_rs3.sh diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 29080cff..795882a7 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -4,38 +4,29 @@ name: E2E CI on: push: branches: - - main - - gh-readonly-queue/main/* + - dev pull_request: branches: - - main + - dev jobs: e2e-test: name: e2e-test - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - - name: Delete huge unnecessary folders, and clean apt cache - run: | - rm -rf /opt/hostedtoolcache - rm -rf /usr/share/dotnet - rm -rf /opt/ghc - rm -rf "$AGENT_TOOLSDIRECTORY" - sudo apt-get clean - shell: bash - name: Checkout branch - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 0 lfs: true - name: Setup golang - uses: actions/setup-go@v5 + uses: actions/setup-go@v7 with: go-version: "1.27" cache: false - name: Build latest skopeo run: | - git clone --depth 1 --branch v1.15.0 https://github.com/containers/skopeo.git + git clone --depth 1 --branch v1.24.1 https://github.com/containers/skopeo.git cd skopeo DISABLE_CGO=1 make bin/skopeo sudo cp ./bin/skopeo /usr/bin/skopeo @@ -50,8 +41,7 @@ jobs: echo $DOCKER_HOST docker buildx create --use - make docker-build-builder-local dockerfile-local - docker buildx build -f build/all.alpine.Dockerfile --build-arg WITH_TRIVY_DB=true --platform linux/amd64 --progress plain --output type=docker,dest=- -t sigma:latest . | docker load + make docker-build REPOSITORY=sigma TAG=latest DOCKER_PLATFORMS=linux/amd64 - name: Run sigma run: | docker run --name sigma -v /var/run/docker.sock:/var/run/docker.sock -d -p 3000:3000 sigma:latest @@ -60,6 +50,6 @@ jobs: - name: Test push and e2e with k6 run: | ./e2e/push.sh - curl https://github.com/grafana/k6/releases/download/v0.46.0/k6-v0.46.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1 + curl https://github.com/grafana/k6/releases/download/v2.3.0/k6-v2.3.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1 ./k6 run e2e/sc.js docker logs sigma diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index e56e9d93..1fce5a15 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -4,7 +4,6 @@ name: Deploy Docs Website on: push: branches: - - main - dev # Allows you to run this workflow manually from the Actions tab diff --git a/.github/workflows/image-build.yml b/.github/workflows/image-build.yml index 840e8ef1..55743f22 100644 --- a/.github/workflows/image-build.yml +++ b/.github/workflows/image-build.yml @@ -4,9 +4,6 @@ name: Image CI on: push: branches: - - main - - gh-readonly-queue/main/* - - release-* - dev tags: - "v*" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 272d3a37..048ecf54 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,12 +4,9 @@ name: Lint CI on: push: branches: - - main - - gh-readonly-queue/main/* - dev pull_request: branches: - - main - dev jobs: diff --git a/.github/workflows/local-build.yml b/.github/workflows/local-build.yml index fabda7bc..72505a8e 100644 --- a/.github/workflows/local-build.yml +++ b/.github/workflows/local-build.yml @@ -4,12 +4,10 @@ name: Build CI on: push: branches: - - main - - gh-readonly-queue/main/* - dev pull_request: branches: - - main + - dev jobs: local-build: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 63631136..62fdbe8e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,12 +4,9 @@ name: Test CI on: push: branches: - - main - - gh-readonly-queue/main/* - dev pull_request: branches: - - main - dev jobs: @@ -40,6 +37,25 @@ jobs: ports: - 5432:5432 options: --health-cmd="pg_isready -U sigma -d sigma || exit 1" --health-interval=10s --health-timeout=5s --health-retries=10 + rs3: + image: ghcr.io/go-sigma/rs3:latest + env: + RS3_HOST: 0.0.0.0 + RS3_PORT: 9000 + RS3_DATA_DIR: /var/lib/rs3/data + RS3_ACCESS_KEY: sigma + RS3_SECRET_KEY: sigma-sigma + RS3_ENDPOINT: http://127.0.0.1:9000 + ports: + - 9000:9000 + entrypoint: /bin/sh + command: '-c "mkdir -p /var/lib/rs3/data/sigma && exec rs3"' + options: >- + --health-cmd "curl --fail http://127.0.0.1:${RS3_PORT}/readyz || exit 1" + --health-interval 30s + --health-timeout 3s + --health-start-period 5s + --health-retries 3 steps: - name: Checkout branch uses: actions/checkout@v7 @@ -73,10 +89,6 @@ jobs: cd web bun install --frozen-lockfile bun run build - - name: Setup minio - run: | - ./scripts/run_minio.sh - sleep 5 - name: Cache go modules uses: actions/cache@v6 with: diff --git a/AGENTS.md b/AGENTS.md index 2d8ba555..2a515d92 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -287,7 +287,7 @@ Directory rules: ## CI Workflows (`.github/workflows/`) - **lint.yml**: Go 1.27 + Bun web build + golangci-lint v2.12.2 + hadolint on `build/Dockerfile`. Triggers on `main`/`dev` PRs. -- **test.yml**: Go 1.27 + Bun web build; runs application tests on PostgreSQL and database tests on `sqlite3`, `turso`, `postgresql`, and `mysql`. Uses MySQL 8.0, Postgres 15, Redis 7, and Minio services. Uploads coverage to Coveralls. +- **test.yml**: Go 1.27 + Bun web build; runs application tests on PostgreSQL and database tests on `sqlite3`, `turso`, `postgresql`, and `mysql`. Uses MySQL 8.0, Postgres 15, Redis 7, and rs3 services. Uploads coverage to Coveralls. - **e2e.yml**, **image-build.yml**, **gh-pages.yml**, **codeql.yml**: end-to-end, image build, docs deploy, security scan. ## Important Files diff --git a/Makefile b/Makefile index abd5928d..482be36a 100644 --- a/Makefile +++ b/Makefile @@ -129,7 +129,7 @@ kube_install: ## Install sigma on Kubernetes using Helm --set mysql.auth.rootPassword=$(RANDOM_PASSWORD) \ --set mysql.auth.password=$(RANDOM_PASSWORD) \ --set redis.auth.password=$(RANDOM_PASSWORD) \ - --set minio.secretKey=$(RANDOM_PASSWORD) \ + --set rs3.s3.sk=$(RANDOM_PASSWORD) \ --kubeconfig $(KUBECONFIG) .PHONY: kube_uninstall diff --git a/build/Dockerfile b/build/Dockerfile index f52a8c42..532cd843 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -144,7 +144,8 @@ ARG USE_MIRROR=false RUN set -eux && \ if [ "$USE_MIRROR" = true ]; then sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories; fi && \ - apk add --no-cache ca-certificates mailcap nginx tini + apk add --no-cache ca-certificates mailcap nginx tini && \ + install -d -m 0755 /etc/sigma COPY --chmod=0755 ./build/entrypoint /usr/local/bin/sigma-server-entrypoint COPY --chmod=0644 ./conf/default.conf.template /etc/nginx/nginx.conf diff --git a/build/entrypoint b/build/entrypoint index e6582f1b..febddd18 100644 --- a/build/entrypoint +++ b/build/entrypoint @@ -5,5 +5,5 @@ if [ "$#" -gt 0 ]; then exec "$@" fi -nginx -c /etc/nginx/nginx.conf +nginx -e /dev/stderr -c /etc/nginx/nginx.conf exec sigma server --config=/etc/sigma/config.yaml diff --git a/conf/config.yaml b/conf/config.yaml index 425e26a8..15788be0 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -33,7 +33,9 @@ database: redis: # Redis is enabled when any of url / addrs / masterName is non-empty. # Leave all empty to disable redis (inmemory cache/locker/workqueue must be used instead). - url: redis://:sigma@localhost:6379/0 + # The default standalone config uses inmemory cache/locker/workqueue, so redis stays disabled here. + # Enable it by setting url (or addrs/masterName) and switching cache/locker/workqueue to redis. + url: addrs: [] username: "" password: "" diff --git a/conf/default.conf.template b/conf/default.conf.template index 09c9c5fd..9ef57891 100644 --- a/conf/default.conf.template +++ b/conf/default.conf.template @@ -1,3 +1,4 @@ +error_log /dev/stderr warn; pid /tmp/nginx.pid; worker_processes auto; diff --git a/go.mod b/go.mod index c4d600b4..3c627ecb 100644 --- a/go.mod +++ b/go.mod @@ -190,13 +190,14 @@ require ( github.com/cloudwego/base64x v0.1.7 // indirect github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 // indirect github.com/containerd/cgroups/v3 v3.1.3 // indirect - github.com/containerd/containerd/api v1.11.1 // indirect - github.com/containerd/containerd/v2 v2.3.5 // indirect + github.com/containerd/containerd/api v1.12.0 // indirect + github.com/containerd/containerd/v2 v2.4.1 // indirect github.com/containerd/continuity v0.5.0 // indirect github.com/containerd/errdefs v1.0.0 // indirect github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/containerd/fifo v1.1.0 // indirect - github.com/containerd/log v0.1.0 // indirect + github.com/containerd/log v0.2.0 // indirect + github.com/containerd/log/otel v0.1.0 // indirect github.com/containerd/platforms v1.0.0-rc.5 // indirect github.com/containerd/plugin v1.1.0 // indirect github.com/containerd/stargz-snapshotter/estargz v0.18.2 // indirect @@ -233,7 +234,7 @@ require ( github.com/felixge/httpsnoop v1.1.0 // indirect github.com/fsnotify/fsnotify v1.10.1 // indirect github.com/fsouza/go-dockerclient v1.13.2 // indirect - github.com/fxamacker/cbor/v2 v2.9.1 // indirect + github.com/fxamacker/cbor/v2 v2.9.4 // indirect github.com/gabriel-vasile/mimetype v1.4.15 // indirect github.com/gin-contrib/sse v1.1.2 // indirect github.com/github/go-spdx/v2 v2.7.0 // indirect @@ -246,7 +247,7 @@ require ( github.com/go-git/go-billy/v5 v5.9.1 // indirect github.com/go-git/go-billy/v6 v6.0.0-alpha.2 // indirect github.com/go-git/go-git/v5 v5.19.2 // indirect - github.com/go-jose/go-jose/v4 v4.1.4 // indirect + github.com/go-jose/go-jose/v4 v4.1.5 // indirect github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/analysis v0.25.5 // indirect @@ -335,7 +336,7 @@ require ( github.com/jtolds/gls v4.20.0+incompatible // indirect github.com/kastenhq/goversion v0.0.0-20230811215019-93b2f8823953 // indirect github.com/kevinburke/ssh_config v1.6.0 // indirect - github.com/klauspost/compress v1.19.2 // indirect + github.com/klauspost/compress v1.20.0 // indirect github.com/klauspost/cpuid/v2 v2.4.0 // indirect github.com/klauspost/pgzip v1.2.6 // indirect github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f // indirect @@ -376,7 +377,7 @@ require ( github.com/moby/sys/sequential v0.7.0 // indirect github.com/moby/sys/signal v0.7.1 // indirect github.com/moby/sys/user v0.4.1 // indirect - github.com/moby/sys/userns v0.2.0 // indirect + github.com/moby/sys/userns v0.2.1 // indirect github.com/moby/term v0.5.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect @@ -441,7 +442,7 @@ require ( github.com/sigstore/sigstore v1.10.8 // indirect github.com/sigstore/sigstore-go v1.2.2 // indirect github.com/sigstore/timestamp-authority/v2 v2.1.2 // indirect - github.com/sirupsen/logrus v1.10.1 // indirect + github.com/sirupsen/logrus v1.10.2 // indirect github.com/skeema/knownhosts v1.3.2 // indirect github.com/smallnest/ringbuffer v0.0.0-20241116012123-461381446e3d // indirect github.com/smallstep/pkcs7 v0.2.1 // indirect @@ -498,7 +499,7 @@ require ( go.mongodb.org/mongo-driver/v2 v2.9.0 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/detectors/gcp v1.44.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.71.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0 // indirect go.opentelemetry.io/otel/metric v1.46.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.46.0 // indirect @@ -527,7 +528,7 @@ require ( gonum.org/v1/gonum v0.17.0 // indirect google.golang.org/api v0.292.0 // indirect google.golang.org/genproto v0.0.0-20260724162435-b2f20204f0df // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260825221802-da73d73af1c5 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260831171406-18b4a7587f8a // indirect google.golang.org/grpc v1.83.2 // indirect google.golang.org/protobuf v1.36.12 // indirect diff --git a/go.sum b/go.sum index 9ab66ed9..48531fe6 100644 --- a/go.sum +++ b/go.sum @@ -245,8 +245,6 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.3 h1:bON1rJf67 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.3/go.mod h1:c5BBpjJcQXpfeq9iASyVKA3T6vX6B6LEXY4mL/gklDY= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.20.3 h1:L8vIOxylma91TcR96NFTEC07G3JDwSl+CvK2b+IODms= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.20.3/go.mod h1:fmPIZQzTExYuBNWFyi1P7IoDjvskgphXqK1yObMzusM= -github.com/aws/aws-sdk-go-v2/service/kms v1.55.0 h1:uB8ymkVosyourmGXCZHyWhJ4wuKA4xq3ii2dVMPtBZY= -github.com/aws/aws-sdk-go-v2/service/kms v1.55.0/go.mod h1:rK4RITSY/qJw3qVJ7p19fceOWuvrisqqOChFkX05n5I= github.com/aws/aws-sdk-go-v2/service/kms v1.61.0 h1:Ux0dqd8Pj64DcFk/HLtPyaDgwv6M6GhipSAsMd9YxbM= github.com/aws/aws-sdk-go-v2/service/kms v1.61.0/go.mod h1:/eZ9xj8IZyb7fj+/t3HO7x89X+7Vn+gCDDbQ2NHCVtM= github.com/aws/aws-sdk-go-v2/service/s3 v1.113.1 h1:cFHmwLxZPvtoAlo79MboURL2+7b0TMHycnrcf5VZNXk= @@ -373,10 +371,10 @@ github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb h1:EDmT6Q9Zs+SbUo github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb/go.mod h1:ZjrT6AXHbDs86ZSdt/osfBi5qfexBrKUdONk989Wnk4= github.com/containerd/cgroups/v3 v3.1.3 h1:eUNflyMddm18+yrDmZPn3jI7C5hJ9ahABE5q6dyLYXQ= github.com/containerd/cgroups/v3 v3.1.3/go.mod h1:PKZ2AcWmSBsY/tJUVhtS/rluX0b1uq1GmPO1ElCmbOw= -github.com/containerd/containerd/api v1.11.1 h1:h8nfoDW9+fNsC/9TwiAHj8B1GzXKtR4eFtkhi/X5RLU= -github.com/containerd/containerd/api v1.11.1/go.mod h1:CaQFRu+N1MtbgL6JDOJLUB1hCKESU1lD6MuTJhgtdlw= -github.com/containerd/containerd/v2 v2.3.5 h1:9MYlI81gUcOZ0WsCkSMtvOU7rTR3hqAoa2eCzhoLlkA= -github.com/containerd/containerd/v2 v2.3.5/go.mod h1:RXDyLPaI3zoO7dFdAW9/54W4cix+z3A6larieufC9mg= +github.com/containerd/containerd/api v1.12.0 h1:kuQm82SbDrCuO4n7hf2L8zsBtZLuympyq5X/VotfX2A= +github.com/containerd/containerd/api v1.12.0/go.mod h1:EBcSzoi9Vl18cdODaXUCskf3D2NT8lsSXeZJnU5jIUc= +github.com/containerd/containerd/v2 v2.4.1 h1:DUx/ZJN7cEu0WuzHClDB+68H/bqMEH5pWoEjf0ae4hc= +github.com/containerd/containerd/v2 v2.4.1/go.mod h1:vgLdtvl3prFk1d3ZVqQcsDD5Q9IKM+vAIdU54U85w+I= github.com/containerd/continuity v0.5.0 h1:7a85HZpCSs+1Zps0Ee3DPSuAWY+0SJM1JNM51nlEVDg= github.com/containerd/continuity v0.5.0/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE= github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= @@ -385,8 +383,10 @@ github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151X github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY= github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o= -github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= -github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/log v0.2.0 h1:BewD/umNgVnoczglOpX8eRMyEy5t5iPlu5AIpnWDONc= +github.com/containerd/log v0.2.0/go.mod h1:/M7L7CXKcPTfNC74XzaK+5H5KbO5+4lJVpuVI6vRLoM= +github.com/containerd/log/otel v0.1.0 h1:Az5rFFo0+c4v2yC8ROR63sWsZpKl/vhtUnUhqLSpE6U= +github.com/containerd/log/otel v0.1.0/go.mod h1:65C5iYF2xIQByCyxzoO2KKKK1+/tGxD4XqhdlrTtvzE= github.com/containerd/platforms v1.0.0-rc.5 h1:vXd569rDrz8LeMXzAnBsy6LADV5YtsD8oyaRarxdmSU= github.com/containerd/platforms v1.0.0-rc.5/go.mod h1:lKlMXyLybmBedS/JJm11uDofzI8L2v0J2ZbYvNsbq1A= github.com/containerd/plugin v1.1.0 h1:O+7lczNJVMy8rz0YNx3xGB8tTf5qY4i5abF041Ew19U= @@ -504,8 +504,8 @@ github.com/envoyproxy/protoc-gen-validate v1.3.3 h1:MVQghNeW+LZcmXe7SY1V36Z+WFMD github.com/envoyproxy/protoc-gen-validate v1.3.3/go.mod h1:TsndJ/ngyIdQRhMcVVGDDHINPLWB7C82oDArY51KfB0= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= -github.com/erofs/go-erofs v0.3.0 h1:o/W5ABAA3sHYl97WL93dacKEfeDpJhdFf3c2snAti7I= -github.com/erofs/go-erofs v0.3.0/go.mod h1:XkSeN9MHszGd4+3gcEjadJLYHCQpWzJ7/8yznzMuzJs= +github.com/erofs/go-erofs v0.3.1 h1:Sux82Jq9yvyYhIoLgSHDp741p/+370HsOj9dAh1+VVs= +github.com/erofs/go-erofs v0.3.1/go.mod h1:XkSeN9MHszGd4+3gcEjadJLYHCQpWzJ7/8yznzMuzJs= github.com/facebookincubator/flog v0.0.0-20190930132826-d2511d0ce33c/go.mod h1:QGzNH9ujQ2ZUr/CjDGZGWeDAVStrWNjHeEcjJL96Nuk= github.com/facebookincubator/nvdtools v0.1.5 h1:jbmDT1nd6+k+rlvKhnkgMokrCAzHoASWE5LtHbX2qFQ= github.com/facebookincubator/nvdtools v0.1.5/go.mod h1:Kh55SAWnjckS96TBSrXI99KrEKH4iB0OJby3N8GRJO4= @@ -532,8 +532,8 @@ github.com/fsnotify/fsnotify v1.10.1 h1:b0/UzAf9yR5rhf3RPm9gf3ehBPpf0oZKIjtpKrx5 github.com/fsnotify/fsnotify v1.10.1/go.mod h1:TLheqan6HD6GBK6PrDWyDPBaEV8LspOxvPSjC+bVfgo= github.com/fsouza/go-dockerclient v1.13.2 h1:u+jAOuR9TZ3PAx2pdHA+ALt1ZZhS8Qx+A4d964IqXtw= github.com/fsouza/go-dockerclient v1.13.2/go.mod h1:SJu2b0vfcF8sbsWs9VVG03iEjsogvo7JADvsi2wVYAI= -github.com/fxamacker/cbor/v2 v2.9.1 h1:2rWm8B193Ll4VdjsJY28jxs70IdDsHRWgQYAI80+rMQ= -github.com/fxamacker/cbor/v2 v2.9.1/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/fxamacker/cbor/v2 v2.9.4 h1:xwjVlxEMR3S605oUlgBjKLTTeGFciYPGYCtF/35LKGo= +github.com/fxamacker/cbor/v2 v2.9.4/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/gabriel-vasile/mimetype v1.4.15 h1:05iP/CYtZ/w455R/KZM6rZ5ieAdh99UPtd+d3YzLmaI= github.com/gabriel-vasile/mimetype v1.4.15/go.mod h1:azpTcoLcDZRNgFou5j+APrqQx9HqVPWa6ijYQIIVswQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -582,8 +582,8 @@ github.com/go-git/go-git/v6 v6.0.0-alpha.5/go.mod h1:3IjhiZnM+uBmUrOGSeqrJpsmi4V github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA= -github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= +github.com/go-jose/go-jose/v4 v4.1.5 h1:RjgjO2LOtWOJKUC5wpwY9LR3B3vwVAz6JS2YHfYU6eA= +github.com/go-jose/go-jose/v4 v4.1.5/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= @@ -1025,8 +1025,8 @@ github.com/kevinburke/ssh_config v1.6.0/go.mod h1:q2RIzfka+BXARoNexmF9gkxEX7Dmvb github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.19.2 h1:hMRETovs/pu/dVWN7zIT1PGG8t509MwT6bO7XSi26R8= -github.com/klauspost/compress v1.19.2/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= +github.com/klauspost/compress v1.20.0 h1:a3C1ke2ohxFymNlb2HWAHjDeKCI90scRskErZkR0ezA= +github.com/klauspost/compress v1.20.0/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.4.0 h1:S6Hrbc7+ywsr0r+RLapfGBHfyefhCTwEh3A0tV913Dw= github.com/klauspost/cpuid/v2 v2.4.0/go.mod h1:19jmZ9mjzoF//ddRSUsv0zfBTJWh3QJh9FNxZTMrGxU= @@ -1174,8 +1174,8 @@ github.com/moby/sys/signal v0.7.1 h1:PrQxdvxcGijdo6UXXo/lU/TvHUWyPhj7UOpSo8tuvk0 github.com/moby/sys/signal v0.7.1/go.mod h1:Se1VGehYokAkrSQwL4tDzHvETwUZlnY7S5XtQ50mQp8= github.com/moby/sys/user v0.4.1 h1:RgjRlaDKi/Xmyrz4t8lyzXT6v2ooFeO/7xtchmhVWE0= github.com/moby/sys/user v0.4.1/go.mod h1:E9QsW5WRe1kUAf7kW8hXKwu1uhsZEAdPLYHYSDudF4Y= -github.com/moby/sys/userns v0.2.0 h1:nEtDtp7NCV/6dutSklNe8FrENPwFdc4mXnZqC/JWgXM= -github.com/moby/sys/userns v0.2.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= +github.com/moby/sys/userns v0.2.1 h1:4OvdM7BcPkASbuouHsbW3aeMJSFlYDldBRnXVZhaRk8= +github.com/moby/sys/userns v0.2.1/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1426,8 +1426,8 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.10.1 h1:xi4336Zh11WpU14fXR6I67V3yaTPQYwRx2WEtHbRg4Q= -github.com/sirupsen/logrus v1.10.1/go.mod h1:vsQHnG7xzNsxk3NrwboUiWPnIC3dmbjcGPykD7+tiHk= +github.com/sirupsen/logrus v1.10.2 h1:G2SED73/qrAu6YwbdxOD6peLkCBI3z7L+ykJFTXJBBo= +github.com/sirupsen/logrus v1.10.2/go.mod h1:SLEg8TqYulVKKfIGHldVp2K2aYz2DKSVBq4g/H5bR7Q= github.com/skeema/knownhosts v1.3.2 h1:EDL9mgf4NzwMXCTfaxSD/o/a5fxDw/xL9nkU28JjdBg= github.com/skeema/knownhosts v1.3.2/go.mod h1:bEg3iQAuw+jyiw+484wwFJoKSLwcfd7fqRy+N0QTiow= github.com/smallnest/ringbuffer v0.0.0-20241116012123-461381446e3d h1:3VwvTjiRPA7cqtgOWddEL+JrcijMlXUmj99c/6YyZoY= @@ -1647,8 +1647,8 @@ go.opentelemetry.io/contrib/detectors/gcp v1.44.0 h1:NmLfL734pJhM0JKaYd2Y28+nY9d go.opentelemetry.io/contrib/detectors/gcp v1.44.0/go.mod h1:tNAsgd8avTGke1+MndXlU5Cru4PQ9Ai/cCNWQv/ZJ/s= go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.71.0 h1:TMTU0sQyqsF1QU+/Q4LAZlLOx1L3FJDbk5N2RVB1nx4= go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.71.0/go.mod h1:QzTELfxkj/tFEZSD22OPPwLet5nIPmcdmZPeISk4C8M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0 h1:oECp5f+hN7nkwjU/8BxQ/q23bGPb8FIrD839owX222E= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0/go.mod h1:DqEFwLumhzMBDQv9PcWbyoDxHI/4lAk6CM4nJBH39sc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.71.0 h1:B2h3uqicet1CT2N5TOFhS+Gq++9i0/CLmaxvhmhtP5s= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.71.0/go.mod h1:dylvB+ZiiwMvsDij9O84Uy7SijLgHMX4mbkncds+4Sw= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.70.0 h1:aVgLpGksz0vjoe6OynycqX8daNOAxJx5ZEhJXIXOVIU= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.70.0/go.mod h1:kmJlX6WuTrAH1fOCSbPJFrSnUagB8c3SY3E87It3JD8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.71.0 h1:3g7B90UzBltIDKq1/5mrTGxTnOFDV0ICOhLoxiZ8jlg= @@ -2215,8 +2215,8 @@ google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20260724162435-b2f20204f0df h1:A7u56ilVtWR3CySHErsWAsimNwD4FoX9KWd8SUCn6vc= google.golang.org/genproto v0.0.0-20260724162435-b2f20204f0df/go.mod h1:4RPHZcXMGptb7aRZb+M43xI7ixmjEtASEf2VtOOBZbU= -google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688 h1:ax2KzoSRIZU/M0cIxri3pKxy99vniH1PVxWC6si/eZI= -google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688/go.mod h1:1RJ9BQGyNdZwkGc1eTqkErfRZ6RJyYPHZo73BZ1vQqI= +google.golang.org/genproto/googleapis/api v0.0.0-20260825221802-da73d73af1c5 h1:izFU9hz7aeLI/Mi1J0991ae+xcwRLr7hTqWnB/9aIIU= +google.golang.org/genproto/googleapis/api v0.0.0-20260825221802-da73d73af1c5/go.mod h1:3LhxRw4YYkf+ylAfgaY9JlVLFKhokkCV8duhLLe7+t0= google.golang.org/genproto/googleapis/rpc v0.0.0-20260831171406-18b4a7587f8a h1:3Dnd1cDaZlB68lziofO+bJXpjOy8UfRv8Unt+yH8tQ4= google.golang.org/genproto/googleapis/rpc v0.0.0-20260831171406-18b4a7587f8a/go.mod h1:DjtHYE8FKJLivXcBEjGwndXfIC23G0VpXiXKqG179uA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= diff --git a/scripts/run_all.sh b/scripts/run_all.sh index 9e84a799..bc32d7f5 100755 --- a/scripts/run_all.sh +++ b/scripts/run_all.sh @@ -2,8 +2,8 @@ SCRIPT_DIR=$(dirname "$0") -echo "Starting minio..." -"$SCRIPT_DIR/run_minio.sh" +echo "Starting rs3..." +"$SCRIPT_DIR/run_rs3.sh" echo "Starting redis..." "$SCRIPT_DIR/run_redis.sh" diff --git a/scripts/run_minio.sh b/scripts/run_minio.sh deleted file mode 100755 index 0c1de2ff..00000000 --- a/scripts/run_minio.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -DOCKER=${DOCKER:-docker} - -"$DOCKER" run -p 9000:9000 -p 9001:9001 \ - --name sigma-minio \ - -e MINIO_ROOT_USER=sigma \ - -e MINIO_ROOT_PASSWORD=sigma-sigma \ - -e MINIO_REGION_NAME=cn-north-1 \ - --rm -d \ - --entrypoint "" \ - --health-cmd "mc ready local || exit 1" \ - --health-interval 10s \ - --health-timeout 5s \ - --health-retries 10 \ - quay.io/minio/minio:RELEASE.2024-11-07T00-52-20Z \ - sh -c 'mkdir -p /data/sigma && minio server /data --console-address ":9001"' diff --git a/scripts/run_rs3.sh b/scripts/run_rs3.sh new file mode 100755 index 00000000..fcd89b5c --- /dev/null +++ b/scripts/run_rs3.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +DOCKER=${DOCKER:-docker} + +"$DOCKER" run -p 9000:9000 \ + --name sigma-rs3 \ + -e RS3_HOST=0.0.0.0 \ + -e RS3_PORT=9000 \ + -e RS3_DATA_DIR=/var/lib/rs3/data \ + -e RS3_ACCESS_KEY=sigma \ + -e RS3_SECRET_KEY=sigma-sigma \ + -e RS3_ENDPOINT=http://127.0.0.1:9000 \ + --rm -d \ + --entrypoint "" \ + --health-cmd 'curl --fail "http://127.0.0.1:${RS3_PORT}/readyz" || exit 1' \ + --health-interval 30s \ + --health-timeout 3s \ + --health-start-period 5s \ + --health-retries 3 \ + ghcr.io/go-sigma/rs3:latest \ + sh -c 'mkdir -p /var/lib/rs3/data/sigma && exec rs3'