-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Deprecate experimental/redis module #5237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
"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"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" 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/
There was a problem hiding this comment.
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.
internal/js/jsmodules.go
Outdated
} | ||
|
||
type warnExperimentalModule struct { | ||
once *sync.Once |
There was a problem hiding this comment.
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:
once *sync.Once | |
once sync.Once |
a698359
to
ee47ef6
Compare
return &warnExperimentalModule{ | ||
msg: msg, | ||
base: base, | ||
once: sync.Once{}, |
There was a problem hiding this comment.
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"), |
There was a problem hiding this comment.
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.
What?
It deprecates the
k6/experiemental/redis
, and it encourages to migrate tok6/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.