Skip to content

Conversation

codebien
Copy link
Contributor

@codebien codebien commented Oct 9, 2025

What?

It deprecates the k6/experiemental/redis, and it encourages to migrate to k6/x/redis resolved via automatic extension resolution.

The intention is to remove fully the module in one of the future releases. It has to be defined if it will be directly in v1.x or in v2.x.

Why?

As part of the experimental process we decided to not keep redis client builtin in the k6 core binary. Instead, we want to keep it as an official extension and benefit of automatic extension resolution.

@codebien codebien self-assigned this Oct 9, 2025
@codebien codebien temporarily deployed to azure-trusted-signing October 9, 2025 15:49 — with GitHub Actions Inactive
@codebien codebien temporarily deployed to azure-trusted-signing October 9, 2025 15:51 — with GitHub Actions Inactive
@codebien codebien temporarily deployed to azure-trusted-signing October 13, 2025 12:33 — with GitHub Actions Inactive
@codebien codebien temporarily deployed to azure-trusted-signing October 13, 2025 12:35 — with GitHub Actions Inactive
@codebien codebien marked this pull request as ready for review October 13, 2025 13:38
@codebien codebien requested a review from a team as a code owner October 13, 2025 13:38
@codebien codebien requested review from inancgumus and oleiade and removed request for a team October 13, 2025 13:38
"k6/experimental/redis": newWarnExperimentalModule(redis.New(),
"k6/experimental/redis has been deprecated and will be removed in future versions."+
" Please migrate to the new version by changing your import to 'k6/x/redis'."+
" Read more here: https://grafana.com/docs/k6/latest/javascript-api/k6-x/redis"),
Copy link
Contributor Author

@codebien codebien Oct 13, 2025

Choose a reason for hiding this comment

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

Suggested change
" Read more here: https://grafana.com/docs/k6/latest/javascript-api/k6-x/redis"),
" Read more here: https://grafana.com/docs/k6/latest/javascript-api/redis"),

This is an invented path. For now, we aren't hosting any documentation of official extensions on grafana.com/docs. I guess we don't want to drop the documentation for redis from the official docs so we need to find a new home for it.

The current experiemental documentation is here https://grafana.com/docs/k6/latest/javascript-api/k6-experimental/redis/

Copy link
Contributor

Choose a reason for hiding this comment

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

This aligns with the approach I took with the dns extension's docs so far.

In xk6-dns, I used: docs/sources/k6/next/javascript-api/k6-x-dns/_index.md as a format, because my preferred approach was to treat extensions as first class citizens in the docs. Not distinguish them from modules. Simply adding a common "admonition" (I think that's how they're called, at the top mentioning that the following module is an extension (as users need to know, but it concretely doesn't change much to their usage in practice).

I wouldn't mind putting it in a separate folder like you're doing here though.

inancgumus
inancgumus previously approved these changes Oct 13, 2025
}

type warnExperimentalModule struct {
once *sync.Once
Copy link
Contributor

Choose a reason for hiding this comment

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

We can get rid of the initialization code in newWarnExperimentalModule() if we make this a non-pointer:

Suggested change
once *sync.Once
once sync.Once

oleiade
oleiade previously approved these changes Oct 13, 2025
@codebien codebien added this to the v1.4.0 milestone Oct 13, 2025
@codebien codebien dismissed stale reviews from oleiade and inancgumus via a698359 October 13, 2025 15:56
@codebien codebien temporarily deployed to azure-trusted-signing October 13, 2025 16:02 — with GitHub Actions Inactive
@codebien codebien temporarily deployed to azure-trusted-signing October 13, 2025 16:04 — with GitHub Actions Inactive
return &warnExperimentalModule{
msg: msg,
base: base,
once: sync.Once{},
Copy link
Contributor

@inancgumus inancgumus Oct 13, 2025

Choose a reason for hiding this comment

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

We can remove this now (line 121) 🎉

"k6/experimental/redis": newWarnExperimentalModule(redis.New(),
"k6/experimental/redis has been deprecated and will be removed in future versions."+
" Please migrate to the new version by changing your import to 'k6/x/redis'."+
" Read more here: https://grafana.com/docs/k6/latest/javascript-api/k6-x/redis"),
Copy link
Contributor

Choose a reason for hiding this comment

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

This aligns with the approach I took with the dns extension's docs so far.

In xk6-dns, I used: docs/sources/k6/next/javascript-api/k6-x-dns/_index.md as a format, because my preferred approach was to treat extensions as first class citizens in the docs. Not distinguish them from modules. Simply adding a common "admonition" (I think that's how they're called, at the top mentioning that the following module is an extension (as users need to know, but it concretely doesn't change much to their usage in practice).

I wouldn't mind putting it in a separate folder like you're doing here though.

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.

3 participants