Skip to content

Change job_name tag for testrun_name#781

Merged
yorugac merged 1 commit intomainfrom
change-tag
Apr 28, 2026
Merged

Change job_name tag for testrun_name#781
yorugac merged 1 commit intomainfrom
change-tag

Conversation

@federicotdn
Copy link
Copy Markdown
Contributor

Fixes #609.

Remove the job_name tag in test run Jobs, and add a new testrun_name tag that only contains the name without instance ID.

Copilot AI review requested due to automatic review settings April 24, 2026 13:01
@federicotdn federicotdn requested a review from yorugac as a code owner April 24, 2026 13:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the k6-operator Runner Job command-line tags to reduce metric cardinality by removing the per-segment job_name tag and replacing it with a stable testrun_name tag derived from the TestRun CR name (without the instance index), aligning with #609.

Changes:

  • Replace --tag job_name=<testrun>-<index> with --tag testrun_name=<testrun> in Runner Job command generation.
  • Update Runner Job unit tests to assert the new testrun_name tag across all command variants (quiet/noisy, paused/unpaused, Istio scuttle, cloud output, LocalFile wrapper, segmentation, PLZ).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/resources/jobs/runner.go Switches the generated k6 metric tag from job_name to testrun_name while keeping instance_id.
pkg/resources/jobs/runner_test.go Updates expected Job command arrays/strings to validate testrun_name instead of job_name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@yorugac yorugac left a comment

Choose a reason for hiding this comment

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

🙌 Thank you, @federicotdn!

@yorugac yorugac merged commit eba3637 into main Apr 28, 2026
33 checks passed
@yorugac yorugac deleted the change-tag branch April 28, 2026 05:59
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.

Change the default tag job_name to testrun_name

3 participants