Skip to content

feat: CI improvements#3774

Merged
imeyer merged 1 commit intomainfrom
push-kvlntqszyxsz
Aug 11, 2025
Merged

feat: CI improvements#3774
imeyer merged 1 commit intomainfrom
push-kvlntqszyxsz

Conversation

@imeyer
Copy link
Contributor

@imeyer imeyer commented Aug 11, 2025

  • pins as many container versions as possible
  • combanitoric tests are less combanitoric
  • organize api/integration/multi_node_ratelimiting/generated/* with build tags based on the number of nodes in the workload
  • update Makefile targets
  • update prometheus config to be forward compatible with newer versions of prometheus

What does this PR do?

Fixes # (issue)

If there is not an issue for this, please create one first. This is used to tracking purposes and also helps use understand why this PR exists

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

  • Test A
  • Test B

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read Contributing Guide
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand areas
  • Ran pnpm build
  • Ran pnpm fmt
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Unkey Docs if changes were necessary

Summary by CodeRabbit

  • Chores

    • CI jobs run longer and build more reliably; streamlined steps and improved Docker build setup.
    • Monitoring improved: supports legacy metric names, enables HTTP/2, follows redirects, and adds protocol fallbacks for broader scraping compatibility.
  • Tests

    • Expanded test suite: separate unit, integration, long-running, and gated stress tests.
    • Improved test orchestration via new make targets.
    • Test generation revamped to use curated realistic and extreme scenarios with build-tag control for targeted execution.

- pins as many container versions as possible
- combanitoric tests are less combanitoric
- organize api/integration/multi_node_ratelimiting/generated/*
  with build tags based on the number of nodes in the workload
- update Makefile targets
- update prometheus config to be forward compatible with newer
  versions of prometheus
@changeset-bot
Copy link

changeset-bot bot commented Aug 11, 2025

⚠️ No Changeset found

Latest commit: a845033

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Aug 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 11, 2025 6:21pm
engineering ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 11, 2025 6:21pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 11, 2025

📝 Walkthrough

Walkthrough

In CI, timeouts and steps are adjusted: API test timeout increased; Go API job adds Docker Buildx, refactors test steps with gated stress tests. Prometheus config adds validation scheme, scrape protocols, HTTP/2, and redirect following. Go Makefile reorganizes test targets and container orchestration. Test generator switches to curated cases and adds per-case build tags.

Changes

Cohort / File(s) Summary
CI workflows
.github/workflows/job_test_api_local.yaml, .github/workflows/job_test_go_api_local.yaml
API test timeout 25→90; remove cache cleanup step. Go API job adds setup-buildx, removes job timeout, consolidates tool install, splits tests into integration and gated stress (on main/tags), sets DOCKER_BUILDKIT and COMPOSE_DOCKER_CLI_BUILD.
Prometheus config
deployment/config/prometheus.yml
Adds global metric_name_validation_scheme: legacy; adds scrape_protocols fallback list; enables HTTP/2 via http_config; enables follow_redirects in http_sd_configs.
Go build/test orchestration
go/Makefile
Reworks targets: adds test-integration, test-integration-long, test-stress; test alias to test-unit; introduces clean (replaces down); updates up to depend on pull, run detached, add ClickHouse migration retry; removes lint and test-full; fmt no longer depends on lint.
Integration test generator
go/apps/api/integration/multi_node_ratelimiting/generate_tests/main.go
Replaces looped time-based generation with two static sets (realistic, extreme); adds TestCase.BuildTag() and emits go:build lines per case; removes time usage; updates permissions literal to 0o755; revised summary output and docs text.

Sequence Diagram(s)

sequenceDiagram
  participant GA as GitHub Actions
  participant Buildx as Docker Buildx
  participant Make as make (go/)
  participant Tests as go test

  GA->>Buildx: setup-buildx
  GA->>Make: make test-integration (env: DOCKER_BUILDKIT=1, COMPOSE_DOCKER_CLI_BUILD=1)
  Make->>Make: up (pull, docker compose up -d, CH migration retry)
  Make->>Tests: go test -tags=integration ...
  Note over GA: On main/tag only
  GA->>Make: make test-stress (same env)
  Make->>Tests: go test -tags=stress,integration,integration_long ...
Loading
sequenceDiagram
  participant Gen as generate_tests/main.go
  participant FS as Filesystem

  Gen->>Gen: Build extremeEdgeCases + realisticCombinations
  loop for each TestCase
    Gen->>Gen: tag = tc.BuildTag()
    Gen->>FS: write test file with //go:build <tag> (if any)
  end
  Gen->>FS: print summary counts
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • perkinsjr
  • mcstepp
  • MichaelUnkey
  • ogzhanolguncu
  • chronark
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch push-kvlntqszyxsz

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.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 11, 2025

Thank you for following the naming conventions for pull request titles! 🙏

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

🔭 Outside diff range comments (5)
.github/workflows/job_test_api_local.yaml (1)

29-31: Pin Goose to v3.24.3 for reproducible CI and builds

We found two places installing Goose with @latest, which risks unexpected breakages. Update both to the known-good tag v3.24.3 (latest as of May 7):

• .github/workflows/job_test_api_local.yaml (around lines 29–31)
• internal/clickhouse/Dockerfile (line 4)

Example replacements:

-      - name: Install Goose
-        run: go install github.com/pressly/goose/v3/cmd/goose@latest
+      - name: Install Goose
+        run: go install github.com/pressly/goose/v3/cmd/goose@v3.24.3
- RUN go install github.com/pressly/goose/v3/cmd/goose@latest
+ RUN go install github.com/pressly/goose/v3/cmd/goose@v3.24.3
go/apps/api/integration/multi_node_ratelimiting/generate_tests/main.go (3)

69-87: Add doc comments for exported methods to meet Go doc guidelines.

Both methods are exported and currently undocumented.

-func (tc TestCase) PackageName() string {
+// PackageName returns a unique, go-safe package name for the generated test case.
+func (tc TestCase) PackageName() string {
@@
-func (tc TestCase) TestName() string {
+// TestName returns a stable test function name for the generated test case.
+func (tc TestCase) TestName() string {

133-137: Harden template parsing to fail on missing keys.

Option("missingkey=error") prevents silent template omissions.

-	tmpl, err := template.New("test").Parse(testTemplate)
+	tmpl, err := template.New("test").Option("missingkey=error").Parse(testTemplate)

153-167: Close the file via defer to avoid leaks on early panics.

Current code closes after Execute; aborts won’t close the handle.

-		file, err := os.Create(filePath)
+		file, err := os.Create(filePath)
 		if err != nil {
 			panic(err)
 		}
 
-		err = tmpl.Execute(file, tc)
+		defer func() {
+			_ = file.Close()
+		}()
+
+		err = tmpl.Execute(file, tc)
 		if err != nil {
 			panic(err)
 		}
-
-		err = file.Close()
-		if err != nil {
-			panic(err)
-		}
go/Makefile (1)

26-38: Optional: factor the ClickHouse migration loop into a dedicated target to shorten “up”.

This addresses the long body warning and improves reuse.

-up: pull
-	@docker compose -f ../deployment/docker-compose.yaml up -d planetscale mysql redis clickhouse s3 otel
-	@echo "Starting ClickHouse migrations (will retry if ClickHouse isn't ready)..."
-	@for i in {1..10}; do \
-		echo "Migration attempt $$i..."; \
-		if docker compose -f ../deployment/docker-compose.yaml run --rm clickhouse_migrator; then \
-			echo "Migrations completed successfully!"; \
-			break; \
-		else \
-			echo "Migration failed, retrying in 5 seconds..."; \
-			sleep 5; \
-		fi; \
-	done
+up: pull migrate-clickhouse
+	@docker compose -f ../deployment/docker-compose.yaml up -d planetscale mysql redis clickhouse s3 otel
+
+migrate-clickhouse:
+	@echo "Starting ClickHouse migrations (will retry if ClickHouse isn't ready)..."
+	@for i in {1..10}; do \
+		echo "Migration attempt $$i..."; \
+		if docker compose -f ../deployment/docker-compose.yaml run --rm clickhouse_migrator; then \
+			echo "Migrations completed successfully!"; \
+			break; \
+		else \
+			echo "Migration failed, retrying in 5 seconds..."; \
+			sleep 5; \
+		fi; \
+	done
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8a35311 and a845033.

⛔ Files ignored due to path filters (63)
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0005_duration000001000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0005_duration000001000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0005_duration000001000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0005_duration000060000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0005_duration000060000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0005_duration000060000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0010_duration000060000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0100_duration000001000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0100_duration000001000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0100_duration000001000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0100_duration000010000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0100_duration000010000_load01_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0100_duration000010000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0100_duration000060000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0100_duration000060000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0100_duration000060000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0100_duration000300000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes01_limit0100_duration003600000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0005_duration000001000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0005_duration000001000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0005_duration000001000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0005_duration000060000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0005_duration000060000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0005_duration000060000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0010_duration000060000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0010_duration000060000_load01_50_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0100_duration000001000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0100_duration000001000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0100_duration000001000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0100_duration000010000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0100_duration000010000_load01_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0100_duration000010000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0100_duration000060000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0100_duration000060000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0100_duration000060000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0100_duration000300000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0100_duration000300000_load01_50_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes03_limit0100_duration003600000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes05_limit0010_duration000060000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes05_limit0010_duration000060000_load01_50_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes05_limit0100_duration000010000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes05_limit0100_duration000010000_load01_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes05_limit0100_duration000010000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes05_limit0100_duration000300000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes05_limit0100_duration000300000_load01_50_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0005_duration000001000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0005_duration000001000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0005_duration000001000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0005_duration000060000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0005_duration000060000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0005_duration000060000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0005_duration003600000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0005_duration003600000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0100_duration000001000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0100_duration000001000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0100_duration000001000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0100_duration000030000_load02_00_windows005/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0100_duration000060000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0100_duration000060000_load02_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0100_duration000060000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0100_duration000300000_load01_00_windows003/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0100_duration003600000_load00_90_windows010/generated_test.go is excluded by !**/generated/**
  • go/apps/api/integration/multi_node_ratelimiting/generated/ratelimit_nodes09_limit0100_duration003600000_load10_00_windows010/generated_test.go is excluded by !**/generated/**
📒 Files selected for processing (5)
  • .github/workflows/job_test_api_local.yaml (1 hunks)
  • .github/workflows/job_test_go_api_local.yaml (1 hunks)
  • deployment/config/prometheus.yml (1 hunks)
  • go/Makefile (3 hunks)
  • go/apps/api/integration/multi_node_ratelimiting/generate_tests/main.go (6 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.go

📄 CodeRabbit Inference Engine (CLAUDE.md)

**/*.go: Follow comprehensive documentation guidelines for Go code as described in go/GO_DOCUMENTATION_GUIDELINES.md
Every public function/type in Go code must be documented
Prefer interfaces for testability in Go code
Use AIDEV-* comments for complex/important code in Go services

Files:

  • go/apps/api/integration/multi_node_ratelimiting/generate_tests/main.go
**/*.{env,js,ts,go}

📄 CodeRabbit Inference Engine (CLAUDE.md)

All environment variables must follow the format: UNKEY_<SERVICE_NAME>_VARNAME

Files:

  • go/apps/api/integration/multi_node_ratelimiting/generate_tests/main.go
🧠 Learnings (4)
📚 Learning: 2025-08-08T19:52:42.073Z
Learnt from: imeyer
PR: unkeyed/unkey#3765
File: .github/workflows/job_detect_changes.yaml:43-43
Timestamp: 2025-08-08T19:52:42.073Z
Learning: In the unkeyed/unkey repository, the workflows `.github/workflows/job_test_api_local.yaml` and `.github/workflows/job_test_go_api_local.yaml` should keep their Blacksmith self-hosted runners (blacksmith-4vcpu-ubuntu-2404 and blacksmith-8vcpu-ubuntu-2404 respectively) as these are performance-critical test jobs that require dedicated resources.

Applied to files:

  • .github/workflows/job_test_api_local.yaml
📚 Learning: 2025-08-04T07:44:39.438Z
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*_test.go : Organize Go integration tests with real dependencies

Applied to files:

  • go/Makefile
📚 Learning: 2025-07-21T18:05:58.236Z
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/Makefile : Use `make build` to test that the binary builds.

Applied to files:

  • go/Makefile
📚 Learning: 2025-08-04T07:44:39.438Z
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*_test.go : Use table-driven tests in Go

Applied to files:

  • go/apps/api/integration/multi_node_ratelimiting/generate_tests/main.go
🪛 YAMLlint (1.37.1)
deployment/config/prometheus.yml

[error] 9-9: trailing spaces

(trailing-spaces)


[error] 11-11: trailing spaces

(trailing-spaces)


[error] 13-13: trailing spaces

(trailing-spaces)


[error] 17-17: trailing spaces

(trailing-spaces)

🪛 checkmake (0.2.2)
go/Makefile

[warning] 1-1: Missing required phony target "all"

(minphony)


[warning] 26-26: Target body for "up" exceeds allowed length of 5 (12).

(maxbodylength)

⏰ 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). (4)
  • GitHub Check: Test Go API Local / Test
  • GitHub Check: Build / Build
  • GitHub Check: Test API / API Test Local
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
.github/workflows/job_test_go_api_local.yaml (1)

28-31: Ensure stress tests run on direct pushes to main
In reusable workflows called via workflow_call, github.event_name reflects the original trigger (e.g., push, pull_request). Currently the stress‐test step only runs on merge_group or tag events. If you invoke this workflow on a direct push to main, those runs will be skipped. Please verify whether any callers trigger this on push to main. If so, broaden the condition as follows:

• File: .github/workflows/job_test_go_api_local.yaml
• Step: “Run stress tests” (around lines 28–31)

-        if: github.event_name == 'merge_group' || startsWith(github.ref, 'refs/tags/')
+        if: github.event_name == 'merge_group' \
+          || startsWith(github.ref, 'refs/tags/') \
+          || (github.event_name == 'push' && github.ref == 'refs/heads/main')

If no caller ever invokes this on a push to main, you can leave the condition as is.

deployment/config/prometheus.yml (1)

1-5: Prometheus image tag already covers new config fields
Your Docker Compose uses prom/prometheus:latest, which always pulls the current stable release and includes support for:

  • metric_name_validation_scheme (added in v2.30.0)
  • scrape_protocols (added in v2.43.0)

No changes are required to enable these fields. If you need reproducible deployments, consider pinning the image to a specific version (≥ v2.43.0).

• deployment/docker-compose.yaml:242 (image: prom/prometheus:latest)

Copy link
Member

@perkinsjr perkinsjr left a comment

Choose a reason for hiding this comment

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

Looks good.

@graphite-app
Copy link

graphite-app bot commented Aug 11, 2025

Cartoon gif. Batman from Batman: The Animated Series stands in the corner of a cave and stares down at us. He gives us a thumbs up, never changing expressions during it. (Added via Giphy)

@imeyer imeyer added this pull request to the merge queue Aug 11, 2025
@graphite-app
Copy link

graphite-app bot commented Aug 11, 2025

Graphite Automations

"Post a GIF when PR approved" took an action on this PR • (08/11/25)

1 gif was posted to this PR based on Andreas Thomas's automation.

Merged via the queue into main with commit f393622 Aug 11, 2025
19 checks passed
@imeyer imeyer deleted the push-kvlntqszyxsz branch August 11, 2025 19:06
@coderabbitai coderabbitai bot mentioned this pull request Aug 15, 2025
18 tasks
@coderabbitai coderabbitai bot mentioned this pull request Sep 15, 2025
18 tasks
@coderabbitai coderabbitai bot mentioned this pull request Sep 24, 2025
18 tasks
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