Skip to content

feat: add seaweedfs unit test workflow - #1608

Merged
c-thiel merged 33 commits into
lakekeeper:mainfrom
chrislusf:seaweedfs-workflow
Jun 3, 2026
Merged

c-thiel merged 33 commits into
lakekeeper:mainfrom
chrislusf:seaweedfs-workflow

Conversation

@chrislusf

@chrislusf chrislusf commented Feb 14, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds a new GitHub Actions workflow seaweedfs.yml that runs unit tests against SeaweedFS. It builds SeaweedFS from source, starts it in mini mode with S3 enabled, creates a bucket, and runs the tests using cargo nextest.

Summary by CodeRabbit

  • Chores
    • Added an end-to-end CI workflow to run the full Rust test suite and workspace doc tests.
    • Provisions and orchestrates storage, secrets, database, and policy services for tests, with conditional cloud credential handling and fork-safe profiles.
    • Captures logs and test results, supports concurrent runs with cancel-in-progress, and triggers on pushes, pull requests, and manual dispatch.

@cla-assistant

cla-assistant Bot commented Feb 14, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Feb 14, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a GitHub Actions workflow that starts SeaweedFS (S3), Vault, Postgres, and OpenFGA; conditionally configures cloud credentials; runs DB migrations; executes cargo-nextest tests with appropriate envs; captures diagnostics; uploads JUnit artifacts; and runs workspace doctests.

Changes

SeaweedFS CI Workflow

Layer / File(s) Summary
Workflow metadata and triggers
.github/workflows/seaweedfs.yml
Defines workflow name, triggers (push/PR/dispatch), shared environment (Rust/tooling), repository permissions, and concurrency cancellation.
Test job and service containers
.github/workflows/seaweedfs.yml
Adds test job on Ubuntu and starts Vault and Postgres as GitHub Actions services with health checks and job-level env for cloud secrets.
SeaweedFS container & bucket creation
.github/workflows/seaweedfs.yml
Starts SeaweedFS with S3 enabled, polls the S3 endpoint for health (200/403), and creates a test S3 bucket via AWS CLI pointing at the local endpoint.
Conditional cloud credential setup
.github/workflows/seaweedfs.yml
Performs Azure login and writes GCS credentials file only when corresponding secrets are present.
Rust toolchain, caching, and nextest profile
.github/workflows/seaweedfs.yml
Installs/caches the specified Rust toolchain and cargo-nextest; computes NEXTEST_PROFILE depending on whether the PR is from the same repo or a fork.
DB migrations and Vault configuration
.github/workflows/seaweedfs.yml
Installs sqlx-cli, creates the Postgres database and runs migrations; installs and configures Vault (dev token, userpass, policy) and creates a test user.
Start OpenFGA
.github/workflows/seaweedfs.yml
Starts OpenFGA in Docker and exposes the HTTP endpoint for tests.
Execute cargo-nextest with environment
.github/workflows/seaweedfs.yml
Runs cargo-nextest under a retry wrapper with env for Postgres, Vault KV2, SeaweedFS S3 endpoint/bucket, OpenFGA, and optional cloud-provider secrets/options.
Logs and diagnostics
.github/workflows/seaweedfs.yml
Always dumps SeaweedFS container logs, process list, and open ports for post-run diagnostics.
Upload JUnit and run doctests
.github/workflows/seaweedfs.yml
Uploads nextest JUnit artifacts from the profile-specific output path and runs workspace-wide Rust doc tests with all features.

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub Actions
  participant Repo as Repository
  participant Seaweed as SeaweedFS
  participant Vault as Vault
  participant PG as Postgres
  participant OpenFGA as OpenFGA
  participant Cloud as Cloud Providers

  GH->>Repo: checkout repository
  GH->>Seaweed: start SeaweedFS (S3 endpoint)
  GH->>Seaweed: poll S3 health and create `tests` bucket
  GH->>Vault: start Vault container and configure auth/policy
  GH->>PG: start Postgres service and create DB
  GH->>OpenFGA: start OpenFGA Docker
  GH->>Cloud: conditional Azure login / write GCS credentials
  GH->>Repo: install Rust toolchain, cargo-nextest, sqlx-cli
  GH->>Repo: run sqlx migrations against Postgres
  GH->>Repo: run cargo-nextest with env for PG, Vault, Seaweed, OpenFGA, Cloud
  Repo-->>GH: produce JUnit results, logs, and artifacts
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • lakekeeper/lakekeeper#1333 — Adds a no-secrets Nextest profile and related profile-selection logic for forked PRs, overlapping with the nextest profile selection here.

Suggested reviewers

  • c-thiel

Poem

🐇 I hopped into CI to plant a seed,

SeaweedFS rising, buckets freed,
Vault and Postgres hum in tune,
Tests march on beneath the moon,
Pipelines nibble green—hooray indeed!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a GitHub Actions workflow for running SeaweedFS unit tests via cargo nextest.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Fix all issues with AI agents
In @.github/workflows/seaweedfs.yml:
- Around line 150-158: The "Setup vault" GitHub Actions step runs apt install
commands without non-interactive flags and can hang CI; update the commands in
that step (the two apt install invocations around "sudo apt install gpg wget"
and "sudo apt update && sudo apt install vault") to include the
assume-yes/noninteractive flags (e.g., -y or -yqq and keep
DEBIAN_FRONTEND=noninteractive) so installs won’t prompt and the runner won't
block; modify the commands referenced in the "Setup vault" step accordingly.
- Around line 59-63: The Checkout SeaweedFS step is unpinned and can break CI;
update the "Checkout SeaweedFS" job step that uses actions/checkout@v6
(repository: seaweedfs/seaweedfs, path: seaweedfs) to include a pinned ref by
adding a with: ref: "<tag-or-commit-sha>" entry (choose a stable tag or specific
commit SHA) so the workflow checks out a reproducible version instead of the
default branch HEAD.
- Around line 128-137: The "Determine nextest profile" step incorrectly checks
github.event.pull_request.head.repo.full_name which is empty on push events,
causing NEXTEST_PROFILE to default to ci_no_secrets; change the logic in that
step to first test github.event_name (or whether github.event.pull_request is
defined) and only use the pull_request fork check when the event is a
pull_request, otherwise set NEXTEST_PROFILE=ci for non-PR events (e.g., pushes
to main) so that pushes get the full "ci" profile; update references to
NEXTEST_PROFILE and the existing github.event.pull_request.head.repo.full_name
check accordingly in the Determine nextest profile step.
- Around line 220-224: Update the "Upload junit" step so it always runs and
accepts any profile directory: add the workflow conditional if: always() to the
step that uses actions/upload-artifact@v5, and change the artifact path from the
hardcoded target/nextest/ci/junit.xml to a glob like target/nextest/*/junit.xml
(or target/nextest/**/junit.xml) so junit files from ci or ci_no_secrets are
uploaded on failure as well as success.
- Around line 169-219: The Test job currently hardcodes a large env block for
seaweedFS-specific variables; refactor it to follow the project's dynamic
test-matrix pattern used by integration_test_matrix.yml and
integration_test_workflow.yml by replacing the hardcoded LAKEKEEPER_TEST__* /
AWS_* / GCS_* / R2 env entries with inputs derived from a matrix/test name
(e.g., pass a test identifier like "seaweedfs-<version>" into the shared
workflow) and map the matrix entry to the runtime envs in the shared workflow;
update the "Test" step (uses: nick-fields/retry...) to accept those
matrix-provided envs instead of hardcoding, and ensure secrets remain referenced
via ${{ secrets.* }} in the shared workflow so configuration is dynamic and
version-agnostic.
🧹 Nitpick comments (4)
.github/workflows/seaweedfs.yml (4)

29-29: Vault service image uses unpinned latest tag.

hashicorp/vault:latest can introduce unexpected breaking changes. Consider pinning to a specific version (e.g., hashicorp/vault:1.15) for reproducible CI runs.


75-82: sleep 5 is redundant given the dedicated health-check step that follows.

The next step ("Wait for SeaweedFS S3 to be healthy") already polls for up to 30 seconds. The sleep 5 adds unnecessary wall-clock time to every run. Consider removing it or reducing it to sleep 1 if you want to avoid the initial curl failure noise.


113-115: GCS credential write can break if the secret contains single quotes.

echo '${{ secrets.GCS_CREDENTIAL }}' will fail if the secret value contains literal ' characters. A heredoc is more robust.

Proposed fix
       - name: Write gcp credential to file
         if: ${{ env.GCS_CREDENTIAL != '' }}
-        run: echo '${{ secrets.GCS_CREDENTIAL }}' > /tmp/gcs.json
+        run: |
+          cat <<'EOF' > /tmp/gcs.json
+          ${{ secrets.GCS_CREDENTIAL }}
+          EOF
         shell: bash

167-167: OpenFGA container is unpinned and uses a fire-and-forget docker run.

openfga/openfga:v1.8 has no digest pin (minor risk), and there's no health check before tests start. If OpenFGA takes a moment to become ready, tests relying on it could be flaky.

Consider adding a health-check poll similar to the SeaweedFS one:

      - name: Wait for OpenFGA
        run: |
          for i in {1..15}; do
            curl -sf http://localhost:35081/healthz && exit 0
            sleep 1
          done
          echo "OpenFGA did not become healthy"
          exit 1

Comment on lines +128 to +137
- name: Determine nextest profile
run: |
if [[ "${{ github.event.pull_request.head.repo.full_name }}" == "${{ github.repository }}" ]]; then
# PR is made off this repo, so workflows have access to secrets and the entire suite
# can be run.
echo "NEXTEST_PROFILE=ci" >> $GITHUB_ENV
else
# PR is made off a fork, so secrets are not available in ci workflows.
echo "NEXTEST_PROFILE=ci_no_secrets" >> $GITHUB_ENV
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Nextest profile defaults to ci_no_secrets on push events to main.

On non-PR events (e.g., push to main), github.event.pull_request.head.repo.full_name is empty, so the condition never matches and the profile falls through to ci_no_secrets. Pushes to main have full access to secrets and should use the ci profile.

Proposed fix
       - name: Determine nextest profile
         run: |
-          if [[ "${{ github.event.pull_request.head.repo.full_name }}" == "${{ github.repository }}" ]]; then
-            # PR is made off this repo, so workflows have access to secrets and the entire suite
-            # can be run.
+          if [[ "${{ github.event_name }}" != "pull_request" || "${{ github.event.pull_request.head.repo.full_name }}" == "${{ github.repository }}" ]]; then
+            # Non-PR events (push, workflow_dispatch) have access to secrets, as do PRs from this repo.
             echo "NEXTEST_PROFILE=ci" >> $GITHUB_ENV
           else
             # PR is made off a fork, so secrets are not available in ci workflows.
             echo "NEXTEST_PROFILE=ci_no_secrets" >> $GITHUB_ENV
           fi
🤖 Prompt for AI Agents
In @.github/workflows/seaweedfs.yml around lines 128 - 137, The "Determine
nextest profile" step incorrectly checks
github.event.pull_request.head.repo.full_name which is empty on push events,
causing NEXTEST_PROFILE to default to ci_no_secrets; change the logic in that
step to first test github.event_name (or whether github.event.pull_request is
defined) and only use the pull_request fork check when the event is a
pull_request, otherwise set NEXTEST_PROFILE=ci for non-PR events (e.g., pushes
to main) so that pushes get the full "ci" profile; update references to
NEXTEST_PROFILE and the existing github.event.pull_request.head.repo.full_name
check accordingly in the Determine nextest profile step.

Comment thread .github/workflows/seaweedfs.yml Resolved
Comment thread .github/workflows/seaweedfs.yml Resolved
Comment thread .github/workflows/seaweedfs.yml Resolved
@chrislusf chrislusf changed the title ci: add seaweedfs unit test workflow feat: add seaweedfs unit test workflow Feb 14, 2026
@chrislusf
chrislusf marked this pull request as draft February 16, 2026 09:04
@c-thiel

c-thiel commented Feb 16, 2026

Copy link
Copy Markdown
Member

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Feb 16, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@c-thiel

c-thiel commented Feb 16, 2026

Copy link
Copy Markdown
Member

@chrislusf, once this is in, WDYT replacing our "examples" docker compose too (top level repo folder). I believe those have higher visibility.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @.github/workflows/seaweedfs.yml:
- Around line 192-193: The "Setup openfga" step starts OpenFGA with "docker run
-d -p 35081:8081 openfga/openfga:v1.8 run" but has no readiness check; add a
follow-up step that polls the container until OpenFGA is ready (e.g., loop with
curl against http://localhost:35081/health or an equivalent readiness endpoint,
or test TCP connectivity on port 35081) with a bounded timeout and retry
interval, and fail the job if the service doesn't become healthy in time so
downstream test steps won't run against a not-yet-ready OpenFGA.
- Around line 61-66: Replace the unstable branch pin in the GitHub Actions
checkout step for "Checkout SeaweedFS" by using a specific commit SHA (or a
release tag) instead of ref: allow-no-role-arn; update the actions/checkout@v6
step to set ref to 006a5b55468909e443ac4d81a9fcb48e5015a682 (or a released tag)
to ensure reproducible CI runs.
🧹 Nitpick comments (3)
.github/workflows/seaweedfs.yml (3)

30-31: Pin the Vault service image to a specific version.

Using hashicorp/vault:latest means any upstream release can silently break this workflow. Pin to a known-good version (e.g., hashicorp/vault:1.15) for reproducibility, consistent with the pinned Postgres image on line 43.

Proposed fix
       vault:
-        image: hashicorp/vault:latest
+        image: hashicorp/vault:1.15

139-142: Prefer env-var indirection when writing secrets to files.

Direct interpolation of ${{ secrets.GCS_CREDENTIAL }} into the shell command can break if the secret value contains characters meaningful to the shell (e.g., single quotes, backticks). Using an environment variable is more robust:

Proposed fix
       - name: Write gcp credential to file
         if: ${{ env.GCS_CREDENTIAL != '' }}
-        run: echo '${{ secrets.GCS_CREDENTIAL }}' > /tmp/gcs.json
-        shell: bash
+        run: printenv GCS_CRED > /tmp/gcs.json
+        shell: bash
+        env:
+          GCS_CRED: ${{ secrets.GCS_CREDENTIAL }}

4-11: Workflow triggers on all PRs with no path filter — consider scoping.

This workflow builds SeaweedFS from source (Go compilation) and runs the full test suite, which is expensive. Triggering on every pull_request event — including docs-only or CI-config changes — wastes runner minutes. Consider adding path filters or making it workflow_dispatch-only until it's production-ready (this is a draft PR).

Example: add path filters
   pull_request:
+    paths:
+      - 'crates/**'
+      - 'Cargo.toml'
+      - 'Cargo.lock'
+      - '.github/workflows/seaweedfs.yml'
   workflow_dispatch:

Comment thread .github/workflows/seaweedfs.yml Resolved
Comment thread .github/workflows/seaweedfs.yml Outdated
Comment on lines +192 to +193
- name: Setup openfga
run: docker run -d -p 35081:8081 openfga/openfga:v1.8 run

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Read the workflow file to see the current setup and health checks
cd /tmp && git ls-files ".github/workflows/seaweedfs.yml" 2>/dev/null || echo "File path needs verification"
cat -n .github/workflows/seaweedfs.yml | sed -n '180,220p'

Repository: lakekeeper/lakekeeper

Length of output: 174


🏁 Script executed:

# Search for health check patterns in the workflow
rg -n "healthz|health_check|healthcheck" .github/workflows/seaweedfs.yml

Repository: lakekeeper/lakekeeper

Length of output: 47


🏁 Script executed:

# Search for docker run commands to see all services and their setup
rg -n "docker run" .github/workflows/seaweedfs.yml -A 2

Repository: lakekeeper/lakekeeper

Length of output: 162


🌐 Web query:

OpenFGA health check endpoint documentation API

💡 Result:

OpenFGA exposes a built-in health check via:

  • HTTP: GET /healthz (e.g., curl -X GET $FGA_API_URL/healthz) which returns JSON like {"status":"SERVING"} (status can be UNKNOWN, SERVING, NOT_SERVING, or SERVICE_UNKNOWN).
  • gRPC: grpc.health.v1.Health/Check (commonly probed with grpcurl).
    Both are wired to datastore connectivity/testing. [1]

Sources
[1] OpenFGA docs — “Configuring OpenFGA” (Health check section) (openfga.dev)

Citations:


🏁 Script executed:

# Search for seaweedfs.yml in the repository
fd -name "seaweedfs.yml" -o -name "*workflow*" | head -20

Repository: lakekeeper/lakekeeper

Length of output: 295


🏁 Script executed:

# List all files in .github directory
fd . .github 2>/dev/null | head -30

Repository: lakekeeper/lakekeeper

Length of output: 669


🏁 Script executed:

# Read the workflow file around lines 180-220
cat -n .github/workflows/seaweedfs.yml | sed -n '180,220p'

Repository: lakekeeper/lakekeeper

Length of output: 2641


🏁 Script executed:

# Search for all health check patterns in the workflow
rg -n "health" .github/workflows/seaweedfs.yml -i -B 1 -A 1

Repository: lakekeeper/lakekeeper

Length of output: 967


🏁 Script executed:

# Search for all docker run commands to see service setup patterns
rg -n "docker run" .github/workflows/seaweedfs.yml -B 1 -A 2

Repository: lakekeeper/lakekeeper

Length of output: 194


No health/readiness check after starting OpenFGA.

All other services in this workflow (Vault, Postgres, SeaweedFS) have health checks, but OpenFGA is started with docker run -d and immediately assumed ready. This can cause flaky test failures if OpenFGA hasn't finished starting when the test step begins.

Proposed fix — add a readiness probe
      - name: Setup openfga
-        run: docker run -d -p 35081:8081 openfga/openfga:v1.8 run
+        run: |
+          docker run -d -p 35081:8081 openfga/openfga:v1.8 run
+          for i in {1..30}; do
+            if curl -sf http://localhost:35081/healthz > /dev/null 2>&1; then
+              echo "OpenFGA is ready"
+              break
+            fi
+            echo "Waiting for OpenFGA..."
+            sleep 1
+          done
🤖 Prompt for AI Agents
In @.github/workflows/seaweedfs.yml around lines 192 - 193, The "Setup openfga"
step starts OpenFGA with "docker run -d -p 35081:8081 openfga/openfga:v1.8 run"
but has no readiness check; add a follow-up step that polls the container until
OpenFGA is ready (e.g., loop with curl against http://localhost:35081/health or
an equivalent readiness endpoint, or test TCP connectivity on port 35081) with a
bounded timeout and retry interval, and fail the job if the service doesn't
become healthy in time so downstream test steps won't run against a
not-yet-ready OpenFGA.

@chrislusf
chrislusf marked this pull request as ready for review February 17, 2026 08:11

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/seaweedfs.yml (2)

31-31: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Pin the Vault service image (and the Vault CLI) to a specific, tested version instead of hashicorp/vault:latest.

.github/workflows/seaweedfs.yml uses hashicorp/vault:latest for the vault service, but later runs vault ... commands after installing the CLI via sudo apt ... apt install vault. Pin the service to an explicit tag/digest and align the installed CLI to the same release line (the repo already pins hashicorp/vault:1.21.4 in unittests.yml).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/seaweedfs.yml at line 31, Replace the unpinned Vault
service image "image: hashicorp/vault:latest" with a specific tested tag (e.g.
"hashicorp/vault:1.21.4") and ensure the workflow step that installs the Vault
CLI uses the matching release line (pin the apt package or installation to
1.21.4) so the running service image and installed CLI are the same version;
update any references to "vault" in the job that run vault ... commands to rely
on the pinned version.

95-100: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Set an AWS region for aws s3api create-bucket

The Create SeaweedFS Bucket step provides credentials but no AWS_REGION/AWS_DEFAULT_REGION (or --region). With the AWS CLI, this can still cause You must specify a region even when using --endpoint-url to an S3-compatible server. Add AWS_REGION/AWS_DEFAULT_REGION or pass --region (matching whatever region your later S3 calls use).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/seaweedfs.yml around lines 95 - 100, The Create SeaweedFS
Bucket step is missing a region, causing the AWS CLI to fail; update the env or
command in that step by adding an AWS_REGION or AWS_DEFAULT_REGION environment
variable (e.g., AWS_REGION: us-east-1) or by appending --region <region> to the
aws s3api create-bucket command so the aws s3api create-bucket --bucket tests
--endpoint-url http://127.0.0.1:8333 call has an explicit region; ensure the
chosen region matches the region used by any later S3 calls.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/seaweedfs.yml:
- Around line 61-66: Replace the floating image tag in the "Start SeaweedFS
Docker Container" docker run step by pinning chrislusf/seaweedfs:latest to a
fixed tag or immutable digest (e.g., chrislusf/seaweedfs:<specific-tag> or
chrislusf/seaweedfs@sha256:<digest>) so CI uses a reproducible SeaweedFS
revision; update the image reference in that docker run command and, if
desirable, add a comment noting the chosen tag/digest or alternatively add
workflow steps to build SeaweedFS from source before running the container.

---

Outside diff comments:
In @.github/workflows/seaweedfs.yml:
- Line 31: Replace the unpinned Vault service image "image:
hashicorp/vault:latest" with a specific tested tag (e.g.
"hashicorp/vault:1.21.4") and ensure the workflow step that installs the Vault
CLI uses the matching release line (pin the apt package or installation to
1.21.4) so the running service image and installed CLI are the same version;
update any references to "vault" in the job that run vault ... commands to rely
on the pinned version.
- Around line 95-100: The Create SeaweedFS Bucket step is missing a region,
causing the AWS CLI to fail; update the env or command in that step by adding an
AWS_REGION or AWS_DEFAULT_REGION environment variable (e.g., AWS_REGION:
us-east-1) or by appending --region <region> to the aws s3api create-bucket
command so the aws s3api create-bucket --bucket tests --endpoint-url
http://127.0.0.1:8333 call has an explicit region; ensure the chosen region
matches the region used by any later S3 calls.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9407c9f4-5924-49ab-9b7f-ae3ece5d082e

📥 Commits

Reviewing files that changed from the base of the PR and between 2cf46a8 and 318c898.

📒 Files selected for processing (1)
  • .github/workflows/seaweedfs.yml

Comment thread .github/workflows/seaweedfs.yml Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/seaweedfs.yml (1)

153-167: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Missing -y flag on apt install will hang the CI runner.

Lines 157 and 161 run apt install without the -y flag. In a non-interactive CI environment, apt will wait for confirmation and the step will hang until timeout. Line 145 correctly uses -yqq, but these lines do not.

Note: A past review comment flagged this issue and was marked as addressed, but the fix appears incomplete.

Proposed fix
       - name: Setup vault
         run: |
           export VAULT_ADDR=http://localhost:8200
           export DEBIAN_FRONTEND=noninteractive
-          sudo apt update && sudo apt install gpg wget
+          sudo apt-get update && sudo apt-get install -yqq gpg wget --no-install-recommends
           wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
           gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint
           echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
-          sudo apt update && sudo apt install vault
+          sudo apt-get update && sudo apt-get install -yqq vault --no-install-recommends
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/seaweedfs.yml around lines 153 - 167, The CI step that
sets up Vault runs two apt installs without automatic confirmation: the commands
"sudo apt update && sudo apt install gpg wget" and "sudo apt update && sudo apt
install vault" should include the noninteractive install flag (e.g., -y or -yqq)
so they don't prompt and hang; update those invocations in the "Setup vault"
step to "sudo apt update && sudo apt install -y gpg wget" and "sudo apt update
&& sudo apt install -y vault" (or use -yqq for quieter output) while keeping
DEBIAN_FRONTEND=noninteractive.
🧹 Nitpick comments (1)
.github/workflows/seaweedfs.yml (1)

119-125: 💤 Low value

Consider disabling default caching to mitigate cache-poisoning risk.

The actions-rust-lang/setup-rust-toolchain action enables caching by default. In fork PRs with write access to the cache, a malicious actor could potentially poison the cache. You can disable caching by setting cache: false if this is a concern.

However, the risk is relatively low for Rust dependency caches, and this pattern is commonly used. The action is already pinned to a SHA, which is good.

Optional: Disable caching
       - name: Setup Rust toolchain and cache
         uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1
         with:
           toolchain: ${{ env.RUST_TOOLCHAIN }}
+          cache: false
         env:
           RUST_CACHE_KEY_OS: rust-${{ env.RUST_TOOLCHAIN }}-cache-ubuntu-24.04
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/seaweedfs.yml around lines 119 - 125, The GitHub Actions
step using actions-rust-lang/setup-rust-toolchain currently uses default
caching; to mitigate cache-poisoning risk, update that step (the step
referencing
actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6)
to explicitly disable caching by adding cache: false under with:, e.g. add a
cache: false entry alongside toolchain: ${{ env.RUST_TOOLCHAIN }} so the action
will not enable its default cache behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/seaweedfs.yml:
- Around line 153-167: The CI step that sets up Vault runs two apt installs
without automatic confirmation: the commands "sudo apt update && sudo apt
install gpg wget" and "sudo apt update && sudo apt install vault" should include
the noninteractive install flag (e.g., -y or -yqq) so they don't prompt and
hang; update those invocations in the "Setup vault" step to "sudo apt update &&
sudo apt install -y gpg wget" and "sudo apt update && sudo apt install -y vault"
(or use -yqq for quieter output) while keeping DEBIAN_FRONTEND=noninteractive.

---

Nitpick comments:
In @.github/workflows/seaweedfs.yml:
- Around line 119-125: The GitHub Actions step using
actions-rust-lang/setup-rust-toolchain currently uses default caching; to
mitigate cache-poisoning risk, update that step (the step referencing
actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6)
to explicitly disable caching by adding cache: false under with:, e.g. add a
cache: false entry alongside toolchain: ${{ env.RUST_TOOLCHAIN }} so the action
will not enable its default cache behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d3693e95-108d-4be2-b90f-51ad3ca27e4a

📥 Commits

Reviewing files that changed from the base of the PR and between 318c898 and 8b878de.

📒 Files selected for processing (1)
  • .github/workflows/seaweedfs.yml

chrislusf added 8 commits June 2, 2026 07:58
Replace floating latest/loosely-pinned tags with hashicorp/vault:1.21.4
(+ --cap-add IPC_LOCK required by recent images), openfga/openfga:v1.14,
and chrislusf/seaweedfs:4.31 for reproducible runs.
Pin checkout (+ persist-credentials: false), azure/login, setup-rust-toolchain
(with explicit toolchain), install-action, and nick-fields/retry to commit
SHAs, matching the rest of the workflows.
The aws CLI requires a region even against an S3-compatible endpoint.
The AWS S3 tests read LAKEKEEPER_TEST__AWS_* env vars; the bare AWS_S3_*
names (and secret names) were never picked up.
Pin upload-artifact, run on always() so results are captured on failure, and
read from the selected NEXTEST_PROFILE dir (ci or ci_no_secrets).
The polling loop already waits for S3 readiness.
@chrislusf
chrislusf force-pushed the seaweedfs-workflow branch from 8b878de to 5426b8f Compare June 2, 2026 15:00
Add -yqq --no-install-recommends so the Setup vault step never waits on an
install confirmation prompt, matching the Migrate database step's style.
@chrislusf

Copy link
Copy Markdown
Contributor Author

@chrislusf, once this is in, WDYT replacing our "examples" docker compose too (top level repo folder). I believe those have higher visibility.

@c-thiel That'll be great! Appreciate it!

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

✅ PR Title Formatted Correctly

The title of this PR match the correct format. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants