artilleryio / artillery

The complete load testing platform. Everything you need for production-grade load tests. Serverless & distributed. Load test with Playwright. Load test HTTP APIs, GraphQL, WebSocket, and more. Use any Node.js module.
https://www.artillery.io
Mozilla Public License 2.0
8.04k stars 511 forks source link

Tags not being passed to fargate tasks/containers #2697

Closed MIJOTHY-V2 closed 6 months ago

MIJOTHY-V2 commented 6 months ago

Version info:

# action version
artilleryio/action-cli@v1 (`a7d844f999d5f3603f104db9cafb981d74f02940`)
# pulled image by action
artilleryio/artillery:latest (`sha256:e084b9aae46a8aca4ed50aaa2750ca2a72a51672b7fbd3544896da0ceeadbc6e`)

Running this command:

# on GHA
run-fargate ... --tags env:dev,service:artilleryio,target_stack:my-app

I expected to see this happen:

  1. To see the run-fargate job logs output the tags
  2. The fargate task and downstream resources to be tagged with the respective tags

Instead, this happened:

  1. The job logs did emit the tags, but
  2. The fargate task and downstream resources were not tagged

image

Additional Context

These tasks are running on a pre-existing untagged cluster, but the lack of tags there is fine for us, as we mainly want to distinguish between different artillery test runs on the same cluster using tags.

Thoughts

A very brief look at some of the source seems to point to context.tags being correctly picked up by artillery, hence the job logs emitting the relevant tags

https://github.com/artilleryio/artillery/blob/af8834b355f108bfc5a189e63de365ffaa8108c4/packages/artillery/lib/platform/aws-ecs/legacy/run-cluster.js#L636-L639

but not being passed to the created AWS resources here https://github.com/artilleryio/artillery/blob/af8834b355f108bfc5a189e63de365ffaa8108c4/packages/artillery/lib/platform/aws-ecs/legacy/run-cluster.js#L1590-L1602

or here https://github.com/artilleryio/artillery/blob/af8834b355f108bfc5a189e63de365ffaa8108c4/packages/artillery/lib/platform/aws-ecs/legacy/run-cluster.js#L1634-L1660

hassy commented 6 months ago

The --tags flag is not for tagging AWS resources. It's only used by Artillery Cloud (for searching/organizing test runs)

Converting to discussion. Tagging AWS resources is a valid use-case but the flag is working as intended right now.