The problem/use-case that the feature addresses
Want to prevent Redis from executing scripts without a #! line.
Description of the feature
Redis should have a configurable option that would cause Redis to return an error if a legacy script without a #! line is eval'd so that scripts cannot run in a legacy compat mode.
Alternatives you've considered
Not sure there's any other option
Additional information
a usage case is if one would want a script to run equivalently on all nodes. Currently in compat mode, due to checking OOM at runtime within the script, they can run differently (i.e. one will abort) dependong on the different redis-servers. This is related to https://github.com/redis/redis/pull/11161 and https://github.com/redis/redis/pull/11159 which allows modules to OOM check scripts correctly as well as run scripts without OOM checking, if so desired. However, legacy scripts will not come up as DENY_OOM with these changes, so we would want a way to prevent their execution completely.
Comment From: madolson
I think an alternative is to introduce a proper API version to Redis. It can be configured with the HELLO command, or some other mechanism, and determines the API behavior of various commands. We could introduce it as part of Redis 8, or 7.2, and use it as a way to allow clients to opt into to API changes more broadly. I am sure as we move forward we will have to deprecate or modify more commands, and I think it would be easier to provide a single configuration for compatibility.
Comment From: oranagra
the intention behind this issue is now resolved by #11425
there could be other reasons someone would want to completely disable certain type of scripts, either legacy ones (with no shebang), or disallow / disregard the allow-oom flag.
i'm not certain if it would be a good idea to expose it as a global redis configuration, or maybe an ACL feature (only allowing certain users to use these "unsafe" scripts).
for now i rather close this issue, maybe re-open if when the another use case arises.