Description
When running distributed load tests via artillery run-aci, Artillery Cloud dashboard consistently shows 0 workers during and after test execution. All other metrics (response times, status codes, VU counts, per-endpoint breakdowns) are reported correctly. Only the worker count metadata is missing.
Artillery Version: 2.0.29 (latest)
Steps to Reproduce
- Configure Azure ACI with service principal + storage account
- Run:
npx artillery run-aci \
--count 5 \
--region uaenorth \
--record \
--key "$ARTILLERY_CLOUD_API_KEY" \
tests/my-test.yml
- Open the Run URL in Artillery Cloud dashboard
Expected: Dashboard shows 5 workers
Actual: Dashboard shows 0 workers (metrics are correctly aggregated)
Evidence
Three test runs all show 0 workers despite successful completion:
| Test |
--count |
VUs Completed |
Workers Shown |
| Health Check |
1 |
20 |
0 |
| Broker API |
5 |
16,950 |
0 |
| Identity API |
3 |
5,130 |
0 |
Root Cause Analysis
Investigation of the source code identified two issues:
1. WORKER_ID env var mismatch (lib/platform/az/aci.js + lib/platform/cloud/cloud.js)
The ACI platform sets WORKER_ID_OVERRIDE on containers, but the Cloud plugin checks for WORKER_ID:
// aci.js - sets WORKER_ID_OVERRIDE
{ name: 'WORKER_ID_OVERRIDE', value: workerId }
// cloud.js - checks WORKER_ID
const enabledInCloudWorker =
typeof process.env.WORKER_ID !== 'undefined' &&
typeof process.env.ARTILLERY_CLOUD_API_KEY !== 'undefined';
The bash wrapper script (loadgen-worker) converts WORKER_ID_OVERRIDE to WORKER_ID, but this happens after Node.js has already evaluated process.env.WORKER_ID as undefined. Workers never register with Artillery Cloud.
2. Missing worker count in ACI metadata (lib/platform/az/aci.js)
The ACI platform emits metadata without the count field:
// aci.js (lines 355-362) - no count field
const metadata = { region: this.region, platformConfig: { memory, cpu } };
While run.js correctly includes it:
// run.js - includes count
metadata: { count: runnerOpts.count || Number(flags.count), ... }
Suggested Fix
Fix 1: Add WORKER_ID alongside WORKER_ID_OVERRIDE in container env vars:
{ name: 'WORKER_ID', value: workerId }
Fix 2: Include count in ACI metadata:
const metadata = { region: this.region, count: this.count, platformConfig: { memory, cpu } };
Environment
- Node.js: v25.3.0
- OS: Linux (Ubuntu)
- Azure Region: UAE North
- ACI containers provisioned successfully, metrics aggregation works correctly
Related Issues
Description
When running distributed load tests via
artillery run-aci, Artillery Cloud dashboard consistently shows 0 workers during and after test execution. All other metrics (response times, status codes, VU counts, per-endpoint breakdowns) are reported correctly. Only the worker count metadata is missing.Artillery Version: 2.0.29 (latest)
Steps to Reproduce
npx artillery run-aci \ --count 5 \ --region uaenorth \ --record \ --key "$ARTILLERY_CLOUD_API_KEY" \ tests/my-test.ymlExpected: Dashboard shows 5 workers
Actual: Dashboard shows 0 workers (metrics are correctly aggregated)
Evidence
Three test runs all show 0 workers despite successful completion:
Root Cause Analysis
Investigation of the source code identified two issues:
1. WORKER_ID env var mismatch (
lib/platform/az/aci.js+lib/platform/cloud/cloud.js)The ACI platform sets
WORKER_ID_OVERRIDEon containers, but the Cloud plugin checks forWORKER_ID:The bash wrapper script (
loadgen-worker) convertsWORKER_ID_OVERRIDEtoWORKER_ID, but this happens after Node.js has already evaluatedprocess.env.WORKER_IDasundefined. Workers never register with Artillery Cloud.2. Missing worker count in ACI metadata (
lib/platform/az/aci.js)The ACI platform emits metadata without the
countfield:While
run.jscorrectly includes it:Suggested Fix
Fix 1: Add
WORKER_IDalongsideWORKER_ID_OVERRIDEin container env vars:Fix 2: Include
countin ACI metadata:Environment
Related Issues