acr icon indicating copy to clipboard operation
acr copied to clipboard

Run variable .Run.TaskName is not defined but documented

Open mloskot opened this issue 2 years ago • 7 comments

Describe the bug

This section in the docs lists the .Run.TaskName varaible https://docs.microsoft.com/en-us/azure/container-registry/container-registry-tasks-reference-yaml#run-variables as you can see on this screenshot

image

But the variable is not defined during task run.

Steps to reproduce the behavior:

  1. Create test.yaml
version: v1.1.0
steps:
  - cmd: |
      bash echo "XXX {{.Run.TaskName}} XXX"
  - cmd: |
      bash echo "XXX $TaskName XXX"
  - cmd: |
      bash echo "Running {{.Run.TaskName}} task {{.Run.ID}} on {{.Run.OS}} {{.Run.Architecture}}"
  1. Run the task
az acr run --registry mycr --file test.yaml .
  1. Observe the steps output does not contain any value substituted for .Run.TaskName
...
2022/08/06 09:43:25 Launching container with name: acb_step_0
XXX  XXX
2022/08/06 09:43:26 Successfully executed container: acb_step_0
2022/08/06 09:43:26 Executing step ID: acb_step_1. Timeout(sec): 600, Working directory: '', Network: 'acb_default_network'
2022/08/06 09:43:26 Launching container with name: acb_step_1
XXX  XXX
2022/08/06 09:43:26 Successfully executed container: acb_step_1
2022/08/06 09:43:26 Executing step ID: acb_step_2. Timeout(sec): 600, Working directory: '', Network: 'acb_default_network'
2022/08/06 09:43:26 Launching container with name: acb_step_2
Running  task db1p on linux amd64
2022/08/06 09:43:27 Successfully executed container: acb_step_2
...

Expected behavior

Actual .Run.TaskName value echoed.

Screenshots

image

Any relevant environment information

  • OS: Windows

image

mloskot avatar Aug 06 '22 09:08 mloskot

Hi @mloskot, apologies for the late response. Have you opened a support ticket with our team yet?

terencet-dev avatar Nov 17 '22 20:11 terencet-dev

No, I have not and I believe this issue tells it all.

mloskot avatar Nov 17 '22 20:11 mloskot

Please open a support ticket so our team can investigate this further.

terencet-dev avatar Nov 17 '22 21:11 terencet-dev

I have a different suggestion: why don't you assign this issue to someone in your team and, if that is really necessary, she can copy it to your internal ticketing system... I see no reason to repeat my work that I have already done and, I believe, I've done it quite well.

mloskot avatar Nov 18 '22 08:11 mloskot

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Oct 25 '23 01:10 github-actions[bot]

This issue has not been addressed, so please, remove the stale label.

mloskot avatar Oct 25 '23 08:10 mloskot

@leodewang are we planning to address this?

sajayantony avatar Dec 08 '23 00:12 sajayantony