Azure / acr

Azure Container Registry samples, troubleshooting tips and references
https://aka.ms/acr
Other
164 stars 112 forks source link

Run variable .Run.TaskName is not defined but documented #638

Open mloskot opened 2 years ago

mloskot commented 2 years ago

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

image

terencet-dev commented 1 year ago

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

mloskot commented 1 year ago

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

terencet-dev commented 1 year ago

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

mloskot commented 1 year ago

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.

github-actions[bot] commented 11 months ago

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.

mloskot commented 11 months ago

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

sajayantony commented 9 months ago

@leodewang are we planning to address this?