Skip to content

feat: enhance load test workflow with improved environment handling a…#16

Merged
DanielPopoola merged 1 commit into
masterfrom
go-version
Apr 12, 2026
Merged

feat: enhance load test workflow with improved environment handling a…#16
DanielPopoola merged 1 commit into
masterfrom
go-version

Conversation

@DanielPopoola
Copy link
Copy Markdown
Owner

@DanielPopoola DanielPopoola commented Apr 12, 2026

…nd Prometheus integration

Summary by CodeRabbit

  • Chores
    • Improved load test workflow orchestration to ensure cleanup occurs after test completion
    • Enhanced load test observability by adding metrics collection and remote monitoring integration

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 12, 2026

📝 Walkthrough

Walkthrough

The load testing workflow is updated to reorganize job execution sequencing and integrate Prometheus remote-write monitoring. The teardown job now executes after tests complete rather than after server deployment, and k6 load tests are configured to emit metrics to a Prometheus remote-write endpoint with trend statistics and scenario tagging.

Changes

Cohort / File(s) Summary
Load Testing Workflow Configuration
.github/workflows/loadtest.yml
Reordered job dependencies so teardown executes after load test completion instead of after server deployment. Added k6 Prometheus remote-write output with trend stats and scenario tags. Configured environment variables for remote-write endpoint and credentials. Removed commented code and adjusted whitespace.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Jobs hop in sequence, neat and spry,
Deploy, then test beneath the sky,
With Prometheus watching metrics glow,
Then teardown cleans, and off we go! 🎯📊

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main changes: enhancement of the load test workflow with improved environment handling and Prometheus integration, which aligns with the raw summary showing k6 Prometheus configuration and environment variable updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch go-version

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.

Copy link
Copy Markdown
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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/loadtest.yml:
- Around line 91-98: The workflow uses the experimental Prometheus RW output
(--out experimental-prometheus-rw) but does not pin the k6 version; update the
setup-k6-action step (the action that installs k6) to include the k6-version
input (for example k6-version: '0.49.0') so the installed k6 is deterministic
and won’t break changes to outputs or env handling; locate the setup-k6-action
block in the workflow and add the k6-version field to the action inputs.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: fa1eee7c-6506-40ac-9cea-ca2e67005c40

📥 Commits

Reviewing files that changed from the base of the PR and between f472dbb and 14f747f.

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

Comment on lines +91 to +98
--out experimental-prometheus-rw \
--tag scenario=${{ inputs.scenario }} \
$SCRIPT
env:
K6_PROMETHEUS_RW_SERVER_URL: https://api.tulcanvcm.com/prometheus/api/v1/write
K6_PROMETHEUS_RW_TREND_STATS: p(50),p(90),p(95),p(99),max,min
K6_PROMETHEUS_RW_USERNAME: k6
K6_PROMETHEUS_RW_PASSWORD: ${{ secrets.PROMETHEUS_REMOTE_WRITE_PASSWORD }}
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

🧩 Analysis chain

🌐 Web query:

For grafana/setup-k6-action@v1, what is the exact input to pin the k6 version? Also, in the latest k6 docs, is --out experimental-prometheus-rwstill valid, and areK6_PROMETHEUS_RW_SERVER_URL, K6_PROMETHEUS_RW_USERNAME, K6_PROMETHEUS_RW_PASSWORD, and K6_PROMETHEUS_RW_TREND_STATS the correct env vars for remote write auth and trend stats?

💡 Result:

For grafana/setup-k6-action@v1, the exact input to pin the k6 version is k6-version with a string value like '0.49.0'. In the latest k6 docs, --out experimental-prometheus-rw is still valid (experimental but actively maintained as of 2026). The env vars K6_PROMETHEUS_RW_SERVER_URL, K6_PROMETHEUS_RW_USERNAME, K6_PROMETHEUS_RW_PASSWORD, and K6_PROMETHEUS_RW_TREND_STATS are correct for remote write auth and trend stats.

Citations:


Pin k6 version in the setup-k6-action step.
The workflow relies on --out experimental-prometheus-rw, but the setup action currently installs the latest available k6 version. This can cause unexpected breakage if k6 changes the output format or environment variable behavior. Use the k6-version input (e.g., k6-version: '0.49.0') in the setup-k6-action step to ensure consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/loadtest.yml around lines 91 - 98, The workflow uses the
experimental Prometheus RW output (--out experimental-prometheus-rw) but does
not pin the k6 version; update the setup-k6-action step (the action that
installs k6) to include the k6-version input (for example k6-version: '0.49.0')
so the installed k6 is deterministic and won’t break changes to outputs or env
handling; locate the setup-k6-action block in the workflow and add the
k6-version field to the action inputs.

@DanielPopoola DanielPopoola merged commit e7bfae4 into master Apr 12, 2026
5 checks passed
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.

1 participant