chore(deps): update dependency grafana/xk6 to v1 #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.20.1->1.2.3Release Notes
grafana/xk6 (grafana/xk6)
v1.2.3Compare Source
Grafana xk6
v1.2.3is here! 🎉This small patch release focuses on improving the usability and robustness of the
xk6 lintcommand, particularly for automated testing and CI/CD pipelines, and includes several dependency updates.Changes and Improvements
xk6 lintEnhancementsbuildlinter specifically failed to function properly if the provided directory path was relative.Dependency Updates
securego/gosecfrom2.22.9to2.22.10.astral-sh/setup-uvfrom7.0.0to7.1.0.golangbase image from1.24.8-alpine3.22to1.24.9-alpine3.22v1.2.2Compare Source
Grafana xk6
v1.2.2is here! 🎉This small patch release fixes a critical issue with the exit code of the
xk6 lintcommand. This bug was introduced inv1.2.0.Bug Fix
xk6 lintExit Code: Thexk6 lintcommand now correctly returns a non-zero exit code (e.g.,1) when one or more lint checks fail. Previously, the command always returned0, making it impossible for CI/CD pipelines (like GitHub Actions) to correctly detect linting failures and fail the build.v1.2.1Compare Source
Grafana xk6
v1.2.1is here! 🎉This is a patch release focusing on several minor fixes and improvements to the
xk6 lintcommand and internal tooling for a smoother development experience.Fixes & Improvements
Consistent Environment Variable Handling:
xk6 lintnow correctly treats empty environment variables (export K6_VAR="") as if they were unset or non-existent. This ensures that environment variable logic is consistent with how CLI flags are handled, preventing unexpected overrides of default values.Tooling Clarity: The internal code generation utility,
tools/presetter, has been renamed to the more accurate and generictools/codegen. This resolves confusion, as the tool generates Go source code and documentation for checks and presets, not just presets.Smarter Validation Workflow: The
versionschecker has been disabled within thexk6 lintrun in the sharedextension-validateworkflow. Since this workflow typically runs on Pull Requests (before a release is created), checking for final version tags was causing unnecessary failures.v1.2.0Compare Source
Grafana xk6
v1.2.0is here! 🎉This release introduces a major enhancement to the
xk6 lintcommand with check presets, making it easier to validate k6 extensions for different use cases and environments. The linting system has been significantly improved with better documentation, flexible configuration options, and streamlined compliance workflows.BREAKING CHANGES
What's New
Check Presets for xk6 lint
The
xk6 lintcommand now supports presets - predefined sets of compliance checks tailored for different extension development scenarios:loose(default): Minimal preset focusing on essential quality and security checks, perfect for development environmentsstrict: Comprehensive preset for production-ready extensions with all compliance checks except official Grafana-specific onesall: Complete validation with every available check in the linting systemprivate: Tailored for private/internal extensions used within organizationscommunity: Optimized for community-maintained extensions published to public repositoriesofficial: Full compliance suite including Grafana-specific requirements like CODEOWNERS validationEnhanced Lint Command Interface
The
xk6 lintcommand has been redesigned with improved flexibility:Comprehensive Documentation Overhaul
All linting documentation has been significantly improved:
v1.1.6Compare Source
Grafana xk6
v1.1.6is here! 🎉This release focuses on essential updates to core Go modules and Docker images to enhance security, stability, and maintain compatibility.
Security and Maintenance Updates
Several dependencies have been updated to their latest patch versions, which includes critical security fixes and stability improvements.
Go Module Updates
The following Go module dependencies are updated:
github.com/go-git/go-git/v5: Updated tov5.16.3.golang.org/x/mod: Updated tov0.29.0.Docker and CI Tooling Updates
The Docker images used in the build and security processes are updated:
golang:1.24.8-alpine3.22.securego/gosecto2.22.9.Rationale
These dependency updates are crucial for maintaining the security posture of
xk6. Applying these updates was prioritized before the planned refactoring of thexk6 lintsubcommand to ensure a stable and secure foundation for future development efforts.v1.1.5Compare Source
Grafana xk6
v1.1.5is here! 🎉This is a maintenance release, with bug fixes and feature enhancements.
Changes:
Building private extensions
Previously, the
buildcommand did not work correctly with private extensions. This is because the environment variables required for git over SSH were not passed to the build library. This has now been fixed so that git over SSH works, which is crucial for building private extensions.To build an
xk6extension from a private Git repository, you need to configure your environment to handle authentication.Core Prerequisite
First, you must set the
GOPRIVATEenvironment variable. This tells the Go compiler to bypass the standard Go proxy for your repository, allowing it to access the private module directly.Method 1: Using SSH
To handle authentication in non-interactive environments like CI/CD pipelines, configure Git to use the SSH protocol instead of HTTPS. This allows for authentication with an SSH key. This command globally configures Git to rewrite any
https://github.com/URLs tossh://[email protected]/.Method 2: Using GitHub CLI
An alternative to using SSH is to leverage the GitHub CLI as a Git credential helper. In this case, Git will still access the repository over HTTPS, but it will use the GitHub CLI to handle the authentication process, eliminating the need to manually enter a password.
License Validation Aligned with Grafana Plugins Policy
The
xk6 lintcommand's license checker has been updated to align with the official Grafana Plugins policy. Previously, the checker accepted a broad range of OSI-approved licenses, which was wider than the list of licenses accepted by Grafana.With this release,
xk6 lintnow validates extension licenses against the specific list found in the Accepted licenses section of the Grafana Plugins policy. This change ensures that extensions passing thelicensecheck are compatible with Grafana Cloud's license requirements.The lint command is now functional in Docker images
The official
xk6Docker image now includes thegosecandgovulnchecktools. Previously, these tools were missing from the image, preventing thexk6 lintcommand from performing security and vulnerability checks.With this update, the
xk6 lintcommand can be used to its full extent within the Docker container, which supports automated and containerized workflows.v1.1.4Compare Source
Grafana xk6
v1.1.4is here! 🎉This release improves the
versioncommand and includes dependency updates.Improved
versioncommandPreviously, installing with
go install go.k6.io/xk6caused thexk6 versioncommand to display an incorrect version (0.0.0-next). This was due to the version being injected at build time as a linker variable by goreleaser.Now, if the version variable is not injected (such as with
go install), the version is correctly determined usingdebug.BuildInfo.v1.1.3Compare Source
Grafana xk6
v1.1.3is here! 🎉Security update: Fixed the following CVEs by updating the Docker base image to
golang:1.24.6-alpine3.22v1.1.2Compare Source
Grafana xk6
v1.1.2is here! 🎉Bug Fixes
xk6 buildcommand now correctly logs the k6 version being used. The version number is emphasized, and a warning is displayed if it's not the latest.xk6 buildnow respectsHTTP_PROXY,HTTPS_PROXY, andNO_PROXYenvironment variables, allowing it to work in proxied environments.New Feature
The
xk6 synccommand can now generate results in multiple formats:--jsonflag for standard JSON output or combine it with--compactfor unindented JSON.--markdownflag to generate a Markdown report, which is useful for changelogs.v1.1.1Compare Source
Grafana xk6
v1.1.1is here! 🎉This is a patch release that addresses a critical bug in our multi-arch Docker image, ensuring proper functionality on
arm64platforms.Bug Fix
Corrected the build process for the
linux/arm64Docker image. Previously, the image was incorrectly shippingamd64binaries, causing anexec format erroron ARM-based systems like Apple Silicon (M1/M2/M3) and AWS Graviton. The multi-arch image now contains the correct native binaries for thearm64platform and functions as expected.This resolves the issue where running
xk6on anarm64host would fail. A big thank you to @potyl for reporting this!v1.1.0Compare Source
Grafana xk6
v1.1.0is here! 🎉New Features
xk6 syncsubcommandThe
xk6 syncsubcommand synchronizes the versions of dependencies ingo.modwith those used in the k6 project. Dependencies not found in k6'sgo.modremain unchanged. Future updates may include synchronization of other files.The purpose of
xk6 syncsubcommand is to avoid dependency conflicts when building the extension with k6 (and other extensions).Inspired by the grafana/go-depsync command.
Maintenance
golang:1.24.5-alpine3.22v1.0.1Compare Source
Grafana xk6 v1.0.0 is here! 🎉
xk6 v1.0.0 marks a significant milestone, incorporating numerous features and capabilities that were gradually introduced in previous versions. These release notes are a bit different, by detailing changes implemented incrementally in anticipation of this major release.
xk6 version 1.0.0 introduces significant enhancements, effectively evolving the Custom k6 builder into a comprehensive k6 extension developer toolbox.
What's been removed in xk6 v1.0.0?
Breaking Changes
No unknown k6 commands wrapping
xk6 v1.0.0 only wraps the
k6 runcommand asxk6 run. Any other commands will no longer be automatically passed through. Previously, xk6 would forward all unrecognized commands to the dynamically built k6.Previously, the
xk6 versioncommand displayed the k6 version built during the process. Now, this command shows the xk6 version itself.No API exposed
xk6 v1.0.0 does not expose a public Go API.
A dedicated Go library (grafana/k6foundry) now exists for building k6 executables. Since xk6 utilizes this library directly, there is no benefit to adding another layer of wrapping.
What's new in xk6 v1.0.0?
Get started docs
Before getting into what's new, it's worth mentioning the new docs that help you get started with extension development.
The k6 extension development quick start guide offers a straightforward, step-by-step introduction. For a more in-depth understanding, the k6 extension development tutorial provides a practical example of extension development.
There are also two new example extensions to help users get started:
Refactored command handling
The command-line interface has been significantly refactored in xk6 v1.0.0. This overhaul introduces new commands alongside the existing
xk6 buildandxk6 run, expanding xk6's functionality. All commands support the standard--helpflag for displaying usage instructions.Print xk6 Version
The command
xk6 versionis now available and outputs the xk6 version.Create Extension
The
xk6 newcommand simplifies the creation of new k6 extensions. With a single command, you can generate a functional extension. This command utilizes the grafana/xk6-example and grafana/xk6-output-example repositories as a template for the new extension.Check Compliance
The
xk6 lintcommand verifies an extension's compliance with recommended practices by examining the source directory. When used within a git repository, it also analyzes git metadata. Compliance is assessed as a weighted percentage (0-100), derived from individual checker scores. This percentage is then translated into a compliance grade (A-F).Build logic extracted
The k6 build logic has been extracted into a dedicated go library (grafana/k6foundry). This library is used by all elements of the k6 ecosystem, including xk6.
The extraction of code into a library involved refactoring, which may introduce minor compatibility issues. These incompatibilities are actively being resolved.
Reusable GitHub workflows
xk6 offers two GitHub workflows to streamline k6 extension development:
You can find reusable workflows in the .github/workflows directory of the xk6-example repository.
Read more in xk6 workflows.
Simplified Go install
The main Go package is now located in the repository's root directory. This change simplifies the installation process using
go installand direct execution withgo run.GitHub CLI extension
The gh-xk6 extension enables the use of xk6 commands within the GitHub CLI. This can streamline xk6 installation for users who already have the GitHub CLI.
The GitHub CLI's availability by default in GitHub workflows is a significant advantage.
Homebrew formula
MacOS and Linux users can now install and manage xk6 with a dedicated Homebrew formula.
Dev Container Feature
Integrate xk6 into Development Containers by adding xk6 Feature to your Dev Containers configuration.
For developing the following extensions, Dev Containers is now the recommended environment:
Read more in Development Containers and k6.
v1.0.0Compare Source
Grafana xk6 v1.0.0 is here! 🎉
xk6 v1.0.0 marks a significant milestone, incorporating numerous features and capabilities that were gradually introduced in previous versions. These release notes are a bit different, by detailing changes implemented incrementally in anticipation of this major release.
xk6 version 1.0.0 introduces significant enhancements, effectively evolving the Custom k6 builder into a comprehensive k6 extension developer toolbox.
What's been removed in xk6 v1.0.0?
Breaking Changes
No unknown k6 commands wrapping
xk6 v1.0.0 only wraps the
k6 runcommand asxk6 run. Any other commands will no longer be automatically passed through. Previously, xk6 would forward all unrecognized commands to the dynamically built k6.Previously, the
xk6 versioncommand displayed the k6 version built during the process. Now, this command shows the xk6 version itself.No API exposed
xk6 v1.0.0 does not expose a public Go API.
A dedicated Go library (grafana/k6foundry) now exists for building k6 executables. Since xk6 utilizes this library directly, there is no benefit to adding another layer of wrapping.
What's new in xk6 v1.0.0?
Get started docs
Before getting into what's new, it's worth mentioning the new docs that help you get started with extension development.
The k6 extension development quick start guide offers a straightforward, step-by-step introduction. For a more in-depth understanding, the k6 extension development tutorial provides a practical example of extension development.
There are also two new example extensions to help users get started:
Refactored command handling
The command-line interface has been significantly refactored in xk6 v1.0.0. This overhaul introduces new commands alongside the existing
xk6 buildandxk6 run, expanding xk6's functionality. All commands support the standard--helpflag for displaying usage instructions.Print xk6 Version
The command
xk6 versionis now available and outputs the xk6 version.Create Extension
The
xk6 newcommand simplifies the creation of new k6 extensions. With a single command, you can generate a functional extension. This command utilizes the grafana/xk6-example and grafana/xk6-output-example repositories as a template for the new extension.Check Compliance
The
xk6 lintcommand verifies an extension's compliance with recommended practices by examining the source directory. When used within a git repository, it also analyzes git metadata. Compliance is assessed as a weighted percentage (0-100), derived from individual checker scores. This percentage is then translated into a compliance grade (A-F).Build logic extracted
The k6 build logic has been extracted into a dedicated go library (grafana/k6foundry). This library is used by all elements of the k6 ecosystem, including xk6.
The extraction of code into a library involved refactoring, which may introduce minor compatibility issues. These incompatibilities are actively being resolved.
Reusable GitHub workflows
xk6 offers two GitHub workflows to streamline k6 extension development:
You can find reusable workflows in the .github/workflows directory of the xk6-example repository.
Read more in xk6 workflows.
Simplified Go install
The main Go package is now located in the repository's root directory. This change simplifies the installation process using
go installand direct execution withgo run.GitHub CLI extension
The gh-xk6 extension enables the use of xk6 commands within the GitHub CLI. This can streamline xk6 installation for users who already have the GitHub CLI.
The GitHub CLI's availability by default in GitHub workflows is a significant advantage.
Homebrew formula
MacOS and Linux users can now install and manage xk6 with a dedicated Homebrew formula.
Dev Container Feature
Integrate xk6 into Development Containers by adding xk6 Feature to your Dev Containers configuration.
For developing the following extensions, Dev Containers is now the recommended environment:
Read more in Development Containers and k6.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.