Skip to content

Update k6 from v1.5.0 to v2.0.0 #314

Description

@moko-poi

Description

The solution currently uses k6 v1.5.0, but k6 v2.0.0 has been released as the new major stable version. Upgrading would give users access to the latest features, performance improvements, and security fixes, and keep the solution aligned with the upstream k6 ecosystem.

Current State

  • k6 version in use: v1.5.0
  • Single source of truth: k6.json
    {
      "version": "1.5.0",
      "download": {
        "binary": "https://github.com/grafana/k6/releases/download/v{version}/k6-v{version}-linux-{arch}.tar.gz",
        "checksums": "https://github.com/grafana/k6/releases/download/v{version}/k6-v{version}-checksums.txt"
      }
    }
  • The version is read dynamically in deployment/ecr/distributed-load-testing-on-aws-load-tester/load-test.sh (the script resolves the download URL, downloads the tarball, validates the checksum, and extracts the binary). There are no other hardcoded k6 version references.

Proposed Change

  • k6 target version: v2.0.0
  • The download URL templates in k6.json do not need to change. The v2.0.0 release publishes the exact same asset naming the templates expect:
    • k6-v2.0.0-linux-amd64.tar.gz
    • k6-v2.0.0-linux-arm64.tar.gz
    • k6-v2.0.0-checksums.txt

Changes Required

  1. Bump the version in k6.json:
    - "version": "1.5.0",
    + "version": "2.0.0",
  2. Verify Taurus (bzt) k6 executor compatibility with k6 v2.0 (see below).
  3. Run the existing k6 sample scenarios (.js and .ts, single file and zip) end-to-end and confirm kpi.csv / results.xml are still produced and parsed correctly.
  4. Update documentation/CHANGELOG if appropriate.

Compatibility Considerations

The solution invokes k6 indirectly through Taurus (bzt), not via direct k6 run calls. A repo-wide search confirms the solution does not directly use any of the features removed in v2.0 (externally-controlled executor, --no-summary, --summary-mode=legacy, k6 login, options.ext.loadimpact, k6/experimental/redis, K6_BINARY_PROVISIONING, K6_ENABLE_COMMUNITY_EXTENSIONS).

Items worth validating because they could affect the Taurus integration:

  • externally-controlled executor removed. Confirm the bundled Taurus version does not generate a k6 config that relies on it for ramp-up/concurrency control.
  • --no-summary removed → --summary-mode=disabled; --summary-mode=legacy removed. Confirm Taurus does not pass any of the removed summary flags to k6.
  • HTTP API server no longer auto-starts (now requires --address / K6_ADDRESS). Confirm nothing in the pipeline depends on the k6 REST API being available by default.
  • Non-threshold aborts now exit with code 97 instead of 0. Relevant only for k6 cloud runs (not used here), but worth keeping in mind for the bzt exit-code handling in load-test.sh.
  • Go module path changed (go.k6.io/k6go.k6.io/k6/v2). Only relevant if custom k6 extensions are built; the solution downloads the official prebuilt binary, so this should not apply.

References

Additional Context

This is a follow-up to the previous k6 upgrade (#284) and complements the TypeScript test support added in #282/#283, keeping the solution on the latest stable k6 major version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions