Azure-devops-docs: Distinguish between variables that are available at runtime only or available at both parsetime and runtime

Created on 5 Mar 2020  Â·  4Comments  Â·  Source: MicrosoftDocs/azure-devops-docs

The expressions page states:

Another common use of expressions is in defining variables. Expressions can be evaluated at compile time or at run time. Compile-time expressions can be used anywhere; runtime expressions are more limited.

It continues:

The difference between these syntaxes is primarily what context is available. In a parse time expression, you have access to parameters and statically-defined variables. In a runtime expression, you have access to more variables but no parameters.

This page does not distinguish between variables that are only available at runtime and variables that are available at both parse and runtime. Unfortunately, this makes determining if we can use specific variables in template expressions a time consuming guess and check effort. See #4073, #7170, and #5279 where people have struggled with problems that may be alleviated by my request for additional documentation.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri1 devops-cicd-builtech devopprod doc-bug stale-issue

Most helpful comment

Adding to this, it appears that variables defined outside of the YAML (so they can be passed from the CLI) are not available at parse time (i.e. available via ${{}} syntax), even though it feels like they should be.

After spending days working through variable/parameter issues, the various syntaxes for referencing them, and about 1000 github/stackoverflow issues... I feel pretty strongly that this is a Hot Mess (tm). You're all doing a great job on the pipelines stuff, but someone really needs to take a step back and look at how variables and parameters interact, their scope/lifetime, and how the syntaxes interact. The level of confusion out here in user land points to a deeper issue than just documentation. There are so many sharp edges that it feels like there are some architectural issues that need addressing. It shouldn't be this complicated.

All 4 comments

Adding to this, it appears that variables defined outside of the YAML (so they can be passed from the CLI) are not available at parse time (i.e. available via ${{}} syntax), even though it feels like they should be.

After spending days working through variable/parameter issues, the various syntaxes for referencing them, and about 1000 github/stackoverflow issues... I feel pretty strongly that this is a Hot Mess (tm). You're all doing a great job on the pipelines stuff, but someone really needs to take a step back and look at how variables and parameters interact, their scope/lifetime, and how the syntaxes interact. The level of confusion out here in user land points to a deeper issue than just documentation. There are so many sharp edges that it feels like there are some architectural issues that need addressing. It shouldn't be this complicated.

This issue hasn't been updated in more than 180 days, so we've closed it. If you feel the issue is still relevant and needs fixed, please reopen it and we'll take another look. We appreciate your feedback and apologize for any inconvenience.

@juliakm , can you please reopen. This continues to be a problem. See #8062 for another example of someone having similar problems with this theme (with fewer upvotes)

Julia added this to the predefined variables tables a while back. You may have to scroll the table a bit to see the column.

Was this page helpful?
0 / 5 - 0 ratings