You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @rotten, the desc key is actually not allowed under a variable with experiments disabled or TASK_X_MAP_VARIABLES=2. The only key allowed here is sh (plus map, ref, yaml and json if you have the experiment enabled). The reason you are getting this error since 3.37.0 is because our error checking has been improved. This is expected behaviour.
Note that you will not get an error with TASK_X_MAP_VARIABLES=1, but this is because map variables are allowed to be defined directly on a variable in this experiment and so you can use any key you like. However, this is not recommended for giving your variable a description unless you intend to use that value in your task somehow.
Your solution of using a YAML comment (# ...) is the correct way to do this.
Sidenote: because the schema is different in the two different experiments and JSON schemas can't read environment variables, we're unable to have more detailed error handing in our schema definition since we don't know if you have an experiment enabled or not. Otherwise, this problem would be more obvious...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Since this one tripped us up, I figured I'd mention it here to save others a few minutes of research.
We do not explicitly set the experimental maps variables as described here: https://taskfile.dev/experiments/map-variables/ and instead rely on the default task behavior.
With earlier versions of
taskthis worked:Unfortunately you end up with an error like this with version 3.37.0 and 3.37.1
task: line 12: maps cannot be assigned to variablesThe fix is fairly simple, remove the description and turn it into a comment:
Setting
TASK_X_MAP_VARIABLES=2works similarly to the default, but you still have to remove thedesc:line with this new version of task.This change is backwards compatible, so it won't break your colleagues still on v3.36
All reactions