Skip to content

ci: improve performance - #3203

Merged
turip merged 16 commits into
mainfrom
ci/add-caches
Aug 11, 2025
Merged

turip merged 16 commits into
mainfrom
ci/add-caches

Conversation

@turip

@turip turip commented Aug 11, 2025 •

Copy link
Copy Markdown
Member

Overview

Changes/fixes:

  • build (nix target)
    • use caching
    • consolidate all nix targets (commit hooks, flake check) into one (as they are seldom failing and take a few more seconds to execute)
  • lint
    • Dagger should use the same golangci-lint version as nix env
    • use depot dagger executors as they are quite fast at caching this workload (due to golangci-lint cache)
  • test
    • instead of dagger use nix + docker compose. This is faster as depot cannot handle caching for docker image based builds
    • e2e tests still cover the alpine target to test the final librdkafka version
  • remove CI run, as it's fully redundant with all the other runs
  • remove experiment CI runs as the E2E and CI does not benefit from dagger based runs
  • cancel previous jobs in case of a new commit being pushed
  • add actionlint.yaml for actionlint based linting (no nix or CI target as we seldom use it)

This allows for the whole CI to execute in ~2 mins except of quickstart and e2e tests.

Summary by CodeRabbit

  • CI

    • Upgraded Dagger tooling, added concurrency controls, removed experimental Dagger-based CI paths, added a cache-rebuild job, and replaced Dagger-orchestrated tests with explicit steps and service readiness handling.
    • Added Actionlint configuration with selective ignores.
  • Developer Experience

    • Added unified Makefile build/test targets and a Docker Compose service wait script.
    • Enabled dynamic build tags in editor settings.
  • Chores

    • Bumped lint/engine versions and removed an unused public package from the Nix flake.

@coderabbitai

coderabbitai Bot commented Aug 11, 2025 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Removes Dagger-based Go CI/Test entrypoints, refactors GitHub Actions to use Nix and explicit steps, bumps Dagger engine/tooling versions, adds Actionlint config, updates Makefile and editor build tags, removes a Nix package, and adds a docker-compose health-wait script.

Changes

Cohort / File(s) Summary of changes
Dagger Go CI/Test removal
.dagger/ci.go, .../.dagger/test.go
Deleted Openmeter CI and Test methods that orchestrated Dagger pipelines and multi-container test orchestration.
GitHub Actions workflows
.github/workflows/ci.yaml, .github/workflows/ci-exp.yaml, .github/workflows/pr-checks.yaml, .github/workflows/release.yaml, .github/workflows/sdk-javascript.yaml, .github/workflows/sdk-javascript-release.yaml, .github/workflows/sdk-python.yaml
Major CI refactor: add top-level concurrency, introduce cache-rebuild job, replace Dagger-driven test orchestration with Nix + docker-compose + explicit test steps, remove experimental CI workflow, and bump DAGGER_VERSION from 0.18.6 → 0.18.14 across workflows.
Actionlint config
.github/actionlint.yaml
New Actionlint config restricting checks to workflow YAMLs and ignoring two patterns (label ".*" is unknown, SC2046).
Dagger engine metadata
dagger.json
Update engineVersion from v0.18.6 → v0.18.14.
Dagger tooling versions (Go)
.dagger/versions.go
Bumped golangciLintVersion from v2.0.0 → v2.2.1.
Makefile build & test flow
Makefile
Add GO_BUILD_FLAGS, GO_TEST_FLAGS, SVIX_JWT_SECRET; add build-dir and aggregate build target; pass build flags to per-binary targets; replace dagger-driven test with local go test; add test-all to run docker-compose integration-style tests.
Editor settings
.vscode/settings.json
Add dynamic to go.buildTags (wireinject,dynamic) with comment about librdkafka.
Nix flake public package removal
flake.nix
Remove public licensei package and its overlay exposure.
Compose health-wait utility
tools/wait-for-compose.sh
Add script to wait for docker-compose services to become healthy or running, with retries and detailed per-container checks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci/add-caches

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@turip
turip force-pushed the ci/add-caches branch 2 times, most recently from 151492f to 4d6722c Compare August 11, 2025 09:41
@turip turip changed the title Ci/add caches ci: improve performance Aug 11, 2025
@turip turip added the release-note/ignore Ignore this change when generating release notes label Aug 11, 2025
@turip
turip marked this pull request as ready for review August 11, 2025 12:43
@turip
turip requested a review from a team as a code owner August 11, 2025 12:43

@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: 8

🔭 Outside diff range comments (1)
.github/workflows/sdk-javascript-release.yaml (1)

25-31: Replace deprecated ::set-output with GITHUB_OUTPUT.

set-output is deprecated; switch to GITHUB_OUTPUT for forward compatibility and to satisfy actionlint.

Apply:

-      - name: Get short SHA
-        id: get-short-sha
-        run: |
-          id=$(echo ${{github.sha}} | cut -c 1-12)
-          echo "::set-output name=id::$id"
+      - name: Get short SHA
+        id: get-short-sha
+        run: |
+          id=$(echo "${GITHUB_SHA}" | cut -c 1-12)
+          echo "id=${id}" >> "$GITHUB_OUTPUT"
🧹 Nitpick comments (4)
.vscode/settings.json (1)

27-28: Dynamic build tag addition looks good; document local deps.

Good call to include dynamic for local librdkafka. Ensure dev docs mention required system libs (e.g., librdkafka via brew/apt) so VS Code builds/tests don’t fail locally.

Confirm the contributor docs (README/development) call out installing librdkafka when dynamic is used.

.github/actionlint.yaml (1)

1-5: Actionlint config added – consider narrower ignores and CI integration.

  • SC2046 ignore can hide real issues globally; if possible, scope it to the specific workflows/steps that require it.
  • Suggest adding Actionlint to PR checks to enforce this config.

I can draft a minimal actionlint job for pr-checks.yaml if you want.

.dagger/versions.go (1)

4-4: Confirm golangci-lint version in Nix flake

The flake.nix lists golangci-lint (line 92) but doesn’t pin a version there. Please check your pinned nixpkgs (in flake.lock) to see which golangci-lint version is provided:

  • If it’s already v2.2.1, you’re all set.
  • If it’s older, add a Nix overlay to bump it to v2.2.1 —or downgrade the golangciLintVersion constant here to match.

Let me know what you find or if you need help crafting the overlay.

Makefile (1)

55-86: Build flags propagation looks correct

Passing ${GO_BUILD_FLAGS} into each go build is consistent. Consider adding -trimpath and -ldflags for reproducible builds in CI if desired.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1197d9e and b1c57c4.

⛔ Files ignored due to path filters (1)
  • flake.lock is excluded by !**/*.lock
📒 Files selected for processing (16)
  • .dagger/ci.go (0 hunks)
  • .dagger/test.go (0 hunks)
  • .dagger/versions.go (1 hunks)
  • .github/actionlint.yaml (1 hunks)
  • .github/workflows/ci-exp.yaml (0 hunks)
  • .github/workflows/ci.yaml (3 hunks)
  • .github/workflows/pr-checks.yaml (1 hunks)
  • .github/workflows/release.yaml (1 hunks)
  • .github/workflows/sdk-javascript-release.yaml (1 hunks)
  • .github/workflows/sdk-javascript.yaml (1 hunks)
  • .github/workflows/sdk-python.yaml (1 hunks)
  • .vscode/settings.json (1 hunks)
  • Makefile (3 hunks)
  • dagger.json (1 hunks)
  • flake.nix (0 hunks)
  • tools/wait-for-compose.sh (1 hunks)
💤 Files with no reviewable changes (4)
  • .dagger/test.go
  • flake.nix
  • .github/workflows/ci-exp.yaml
  • .dagger/ci.go
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-03-31T11:48:09.170Z
Learnt from: chrisgacsal
PR: openmeterio/openmeter#2563
File: .dagger/versions.go:4-4
Timestamp: 2025-03-31T11:48:09.170Z
Learning: The project uses Nix for package management, and golangci-lint versions are constrained by what's available in the Nix package repository.

Applied to files:

  • .dagger/versions.go
🪛 Shellcheck (0.10.0)
tools/wait-for-compose.sh

[error] 18-18: Double quote array expansions to avoid re-splitting elements.

(SC2068)


[warning] 47-47: i appears unused. Verify use (or export if used externally).

(SC2034)

🪛 Gitleaks (8.27.2)
Makefile

4-4: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)

.github/workflows/ci.yaml

161-161: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: E2E
  • GitHub Check: Analyze (go)
🔇 Additional comments (18)
dagger.json (1)

3-3: All Dagger engine versions are in sync at v0.18.14

– dagger.json “engineVersion” is set to v0.18.14
– All workflows’ DAGGER_VERSION env vars are 0.18.14
– dagger-for-github remains pinned at commit e47aba4… (# v8.0.0), which is compatible

No stale references detected.

.github/workflows/sdk-javascript-release.yaml (1)

12-12: Aligns with dagger.json – LGTM.
No concerns with the version bump to 0.18.14.

.github/workflows/sdk-python.yaml (1)

18-18: Version bump to 0.18.14 – consistent with dagger.json.
No further changes required here.

.github/workflows/sdk-javascript.yaml (1)

16-16: Version bump to 0.18.14 – consistent and fine.
No additional issues spotted.

.github/workflows/release.yaml (1)

14-14: Release workflow aligned to 0.18.14 – LGTM.
Pinned dagger-for-github is retained; no issues.

.github/workflows/pr-checks.yaml (1)

7-9: Good use of concurrency to cancel superseded runs

The group key ${{ github.workflow }}-${{ github.ref }} is appropriate for PRs and avoids cross-workflow collisions. No further changes needed.

tools/wait-for-compose.sh (1)

48-48: Quote expansions when invoking the checker

checkServices $CONTAINER_IDS will re-split by IFS and can mis-handle empty/newline-delimited IDs. Use the array with quotes.

Apply the refactor above to populate CONTAINER_IDS as an array and invoke: checkServices "${CONTAINER_IDS[@]}".

Makefile (3)

49-51: Nice: consolidated build target

The aggregate build target is clear and speeds up CI with -j. No issues.


125-130: Test target: good quick check for Postgres

Lightweight readiness check via psql works. Note: This will fail if psql is not installed locally; acceptable for CI/dev expectations.

If you want to make it optional, guard with command -v psql >/dev/null || echo "psql not installed".


131-137: Good: end-to-end test orchestration via compose + wait script

This aligns with the new CI strategy. Once the JWT is moved out of VCS, this target will also be clean for scanners.

.github/workflows/ci.yaml (8)

12-12: DAGGER_VERSION bump looks good

0.18.14 matches other tooling updates in the PR. Keep dagger.json in sync (it appears updated in this PR).


14-16: Concurrency block is correct

This will cancel superseded runs per branch/PR without cross-workflow interference.


19-56: Cache rebuild job: solid foundation

Nix quick installer + store cache + Go module cache keys look sane. Good use of branch-scoped keys with fallbacks.


95-105: Pre-commit validation added

Good to run both standard and manual hooks. No issues.


114-118: Starting compose early to hide latency is a nice optimization

This overlaps setup time effectively.


153-156: Wait step integrates with new wait script

LGTM pending the shell fixes suggested for tools/wait-for-compose.sh.


208-208: Verify runner label syntax for Depot with additional "dagger=0.18.14"

runs-on typically accepts a single label or an array. A comma within a single string is unusual and may not match any runner.

Please confirm that depot-ubuntu-latest-8,dagger=0.18.14 is a valid single runner label in your Depot setup. If multiple labels are required by GitHub, use an array:

runs-on:
  - depot-ubuntu-latest-8
  - dagger=0.18.14

If Depot expects a single composite label, ignore this.


271-319: Quickstart: pragmatic checks

Using curl retries and exporting container logs is solid. No change requested.

Comment thread .github/workflows/ci.yaml Resolved
Comment thread .github/workflows/ci.yaml Resolved
Comment thread .github/workflows/ci.yaml Resolved
Comment thread Makefile Resolved
Comment thread Makefile Resolved
Comment thread tools/wait-for-compose.sh Resolved
Comment thread tools/wait-for-compose.sh Resolved
Comment thread tools/wait-for-compose.sh 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.

Actionable comments posted: 3

♻️ Duplicate comments (4)
Makefile (2)

6-8: Good: fixed invalid --parallel to -parallel and centralized flags

Keeps test/build flags in sync across targets.


3-4: Remove hardcoded JWT (use env/CI var instead) — leaks flagged by Gitleaks

Do not commit JWTs. Make it overridable and empty by default.

-# Docker-local svix secret, only used for testing
-SVIX_JWT_SECRET = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MjI5NzYyNzMsImV4cCI6MjAzODMzNjI3MywibmJmIjoxNzIyOTc2MjczLCJpc3MiOiJzdml4LXNlcnZlciIsInN1YiI6Im9yZ18yM3JiOFlkR3FNVDBxSXpwZ0d3ZFhmSGlyTXUifQ.PomP6JWRI62W5N4GtNdJm2h635Q5F54eij0J3BU-_Ds
+# Docker-local svix secret for tests. Provide via env or repo var/secret.
+# Example: make test-all SVIX_JWT_SECRET=... or export SVIX_JWT_SECRET before running.
+SVIX_JWT_SECRET ?=
.github/workflows/ci.yaml (2)

166-169: LGTM: correct docker compose down -v usage

Dropping service names fixes the previously noted misuse.


157-165: Remove hardcoded JWT from workflow; use repo variable/secret

Do not embed JWTs in workflows. Reference ${{ vars.SVIX_JWT_SECRET }} or ${{ secrets.SVIX_JWT_SECRET }}.

       - name: Run tests
         env:
           SVIX_HOST: localhost
-          # Dev JWT secret, non-sensitive
-          SVIX_JWT_SECRET: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MjI5NzYyNzMsImV4cCI6MjAzODMzNjI3MywibmJmIjoxNzIyOTc2MjczLCJpc3MiOiJzdml4LXNlcnZlciIsInN1YiI6Im9yZ18yM3JiOFlkR3FNVDBxSXpwZ0d3ZFhmSGlyTXUifQ.PomP6JWRI62W5N4GtNdJm2h635Q5F54eij0J3BU-_Ds
+          SVIX_JWT_SECRET: ${{ vars.SVIX_JWT_SECRET }} # or: ${{ secrets.SVIX_JWT_SECRET }}
         # count=1 is needed to force retest
         run: |
           nix develop --impure .#ci -c go test -p 128 -tags=dynamic -parallel 16 -count=1 ./...
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b1c57c4 and 418a6fc.

📒 Files selected for processing (3)
  • .github/workflows/ci.yaml (3 hunks)
  • Makefile (3 hunks)
  • tools/wait-for-compose.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • tools/wait-for-compose.sh
🧰 Additional context used
🪛 Gitleaks (8.27.2)
Makefile

4-4: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: E2E
  • GitHub Check: Quickstart
  • GitHub Check: Migration Checks
  • GitHub Check: Build
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Analyze (go)
🔇 Additional comments (8)
Makefile (1)

128-130: Test target looks good

Local postgres check via psql is clear and fails fast; test flags consistent with CI.

.github/workflows/ci.yaml (7)

12-16: LGTM: tool version bump and concurrency guard

Pinned Dagger version and cancel-in-progress reduce queue times and flakiness.


19-56: LGTM: cache-rebuild job warms Nix/Go caches on push

Good use of flake check, develop to upsert store, and keyed cache saves.


66-83: LGTM: Nix setup + Nix store restore

Pinned action SHAs and first-match restore prefixes are solid.


84-94: LGTM: go.mod cache restore

Consistent keys, branch-preferred restore keys make sense.


95-105: LGTM: unified build and commit checks

Consolidating with make -j 10 build and running pre-commit in CI aligns tooling.


114-118: LGTM: start Compose early to overlap setup

This helps shave seconds while Nix env initializes.


153-156: Verification Passed: tools/wait-for-compose.sh is Present and Executable

tools/wait-for-compose.sh exists with -rwxr-xr-x permissions and a valid #!/usr/bin/env bash shebang. No further action required.

Comment thread .github/workflows/ci.yaml Resolved
Comment thread Makefile Resolved
Comment thread Makefile Resolved
chrisgacsal
chrisgacsal previously approved these changes Aug 11, 2025

@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: 0

♻️ Duplicate comments (5)
tools/wait-for-compose.sh (2)

10-15: Fix container discovery and error message; use an array for IDs

Use an array to safely capture multiple IDs and reflect requested services in the error. This also prepares for correct, quoted argument passing downstream.

-# Get the container ID for the service
-CONTAINER_IDS=$(docker compose ps -q "$@")
-if [[ -z "$CONTAINER_IDS" ]]; then
-  echo "Error: Could not find container ids."
-  exit 1
-fi
+# Get the container IDs for the requested services
+# Preserve elements to avoid word splitting/globbing
+mapfile -t CONTAINER_IDS < <(docker compose ps -q "$@")
+if [[ ${#CONTAINER_IDS[@]} -eq 0 ]]; then
+  echo "Error: Could not find containers for services: $*"
+  exit 1
+fi

17-21: Harden quoting and guard docker inspect under set -e (SC2068)

Iterate over "$@" to avoid re-splitting, and guard all docker inspect calls so a failure won’t abort the script under set -e.

-checkServices() {
-    for CONTAINER_ID in $@; do
-        STATUS="$(docker inspect --format='{{.State.Health.Status}}' "$CONTAINER_ID" 2>/dev/null || true)"
-        SERVICE_NAME="$(docker inspect --format='{{.Name}}' "$CONTAINER_ID" 2>/dev/null | sed 's|^/||')"
+checkServices() {
+    for CONTAINER_ID in "$@"; do
+        STATUS="$(docker inspect --format='{{.State.Health.Status}}' "$CONTAINER_ID" 2>/dev/null || true)"
+        # Don’t let a failing inspect terminate the script; strip leading slash safely
+        SERVICE_NAME_RAW="$(docker inspect --format='{{.Name}}' "$CONTAINER_ID" 2>/dev/null || true)"
+        SERVICE_NAME="${SERVICE_NAME_RAW#/}"
@@
-            STATUS="$(docker inspect --format='{{.State.Status}}' "$CONTAINER_ID" 2>/dev/null)"
+            STATUS="$(docker inspect --format='{{.State.Status}}' "$CONTAINER_ID" 2>/dev/null || true)"

Also applies to: 28-29

Makefile (3)

6-9: go test flags look correct (-parallel single hyphen)

Nice fix; this matches go test semantics.


135-140: Fail fast if SVIX_JWT_SECRET is unset before running tests

Avoid surprising test failures and make the dependency explicit.

 docker compose up -d postgres svix redis
 ./tools/wait-for-compose.sh postgres svix redis
-SVIX_HOST="localhost" SVIX_JWT_SECRET="$(SVIX_JWT_SECRET)" go test ${GO_TEST_FLAGS} -count=1 ./...
+@ if [ -z "$(SVIX_JWT_SECRET)" ]; then \
+  echo "SVIX_JWT_SECRET not set; export it or pass SVIX_JWT_SECRET=..."; \
+  exit 1; \
+fi
+SVIX_HOST="localhost" SVIX_JWT_SECRET="$(SVIX_JWT_SECRET)" go test ${GO_TEST_FLAGS} -count=1 ./...

3-4: Remove hardcoded JWT; use a variable and supply via env/CI

Committing secrets (even dev-only) is unsafe and will trip scanners. Use a configurable var.

-# Docker-local svix secret, only used for testing
-SVIX_JWT_SECRET = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MjI5NzYyNzMsImV4cCI6MjAzODMzNjI3MywibmJmIjoxNzIyOTc2MjczLCJpc3MiOiJzdml4LXNlcnZlciIsInN1YiI6Im9yZ18yM3JiOFlkR3FNVDBxSXpwZ0d3ZFhmSGlyTXUifQ.PomP6JWRI62W5N4GtNdJm2h635Q5F54eij0J3BU-_Ds
+# Docker-local svix secret, only used for testing. Provide via env or repo variable.
+# Example: make test-all SVIX_JWT_SECRET=... or export SVIX_JWT_SECRET before running.
+SVIX_JWT_SECRET ?=
🧹 Nitpick comments (2)
tools/wait-for-compose.sh (1)

46-54: Pass array safely and improve timeout message

With CONTAINER_IDS captured into an array, pass it as "${CONTAINER_IDS[@]}". Also surface the requested services in the timeout for better diagnostics.

-while (( attempts > 0 )); do
-  if checkServices "${CONTAINER_IDS[@]}"; then
+while (( attempts > 0 )); do
+  if checkServices "${CONTAINER_IDS[@]}"; then
     exit 0
   fi
   sleep 2
   ((attempts--))
 done

-echo "❌ Failed to start services: timeout"
+echo "❌ Failed to start services ($*): timeout"
 exit 1

Also applies to: 56-57

Makefile (1)

132-134: Postgres readiness gate is helpful; small enhancement optional

Current check is fine. Consider printing which host/port/user/db are probed to aid debugging across envs. No action required.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 418a6fc and 352edf5.

📒 Files selected for processing (2)
  • Makefile (3 hunks)
  • tools/wait-for-compose.sh (1 hunks)
🧰 Additional context used
🪛 Gitleaks (8.27.2)
Makefile

4-4: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)

🪛 Shellcheck (0.10.0)
tools/wait-for-compose.sh

[error] 18-18: Double quote array expansions to avoid re-splitting elements.

(SC2068)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Artifacts / Benthos Collector Container image
  • GitHub Check: Migration Checks
  • GitHub Check: E2E
  • GitHub Check: Build
  • GitHub Check: Quickstart
  • GitHub Check: Test
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
Makefile (1)

49-55: Good: ensure build/ exists before emitting binaries

Adding build-dir and wiring it as an order-only prerequisite to all build-* targets is robust, especially under parallel make.

Also applies to: 57-90

@turip
turip enabled auto-merge (squash) August 11, 2025 15:18
@turip
turip merged commit b4864e6 into main Aug 11, 2025
@turip
turip deleted the ci/add-caches branch August 11, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/ignore Ignore this change when generating release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants