acr
acr copied to clipboard
Updating task values doesn't work
Issue I'm unable to update the values in a scheduled task.
To Reproduce
- Create a trivial task such as:
az acr task create \
--cmd "$Registry/hello-world:latest" \
--name <random-task-name> \
--registry <your-registry> \
--resource-group <your-resource-group> \
--schedule "*/3 * * * *" \
--context /dev/null
- Update that task:
az acr task update -n <random-task-name> -r <your-registry> --set 'foo=bar'
Expected behavior The output of the update should display the newly set value. That is, step.values[] should display it.
...
"step": {
...
"values" : [
{
"isSecret": false,
"name": "foo",
"value": "bar"
}
]
...
}
- OS: Windows/WSL2
- Azure CLI: 2.15.1
- Docker version: 19.03.13, build 4484c46d9d
The above acr task create
command created a context-less encoded task. There are some limits in CLI command to update encoded task. But I agree we should fix it.
For now, you can rerun "az acr task create" with the additional --set
parameters to update the task.
A related issue https://github.com/Azure/acr/issues/313
/cc: @rosanch @jaysterp
@northtyphoon Bin, the solution that I came up with is to update the step
with EncodedTaskStep
if we are only updating the value of an EncodedTask.
Will there be some scenario in which user created an encoded task, but later change to a FileTask and would like to change the values in the step?
Closing as this has been inactive. Please open a support ticket with our team for assistance.