question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Task condition doesn't accept an expression

See original GitHub issue

This is valid Pipelines YAML:

  steps:
  - task: UsePythonVersion@0
    condition: eq(variables.pypy, false)

But 143.0 gives red squigglies on the eq() part. One of the confusing features of Pipelines YAML is that condition fields can accept expressions that aren’t wrapped in $[] or ${{}}.

Since we don’t have syntax highlighting for expressions yet, the best we can do is accept a string for now.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
sk82jackcommented, Dec 11, 2018

I think I’ve run into this as well but not 100% sure so let me know if you want me to log a seperate issue.

I installed the extension and it told me my yaml was invalid because of an unexpected property jobs at the root level 2018-12-11_13-35-08

If I remove the trigger and pr sections then the error changes to an incorrect type for the condition 2018-12-11_13-35-44

So if I put the trigger and pr sections back in but change the condition to true then it validates the yaml OK. 2018-12-11_13-36-25

1reaction
vtbassmattcommented, Dec 11, 2018

Thanks @sk82jack - that looks like another example of this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure DevOps Pipeline Task Condition expands runtime ...
I have a group variable SHOULD_CONTINUE_NEXT_TASK which defines a runtime expression (see below). The variable is then used in a task as custom ......
Read more >
Expressions - Azure Pipelines | Microsoft Learn
Expressions are used to define conditions for a step, job, or stage steps: - task: ... condition: <expression>.
Read more >
SSIS Expression Tasks vs Evaluating variables as expressions
This article explores the similarities and differences between SSIS Expression Task and Evaluate variable as Expression in SQL Server ...
Read more >
Workflows Overview | Twilio
"expression" - a SQL-like conditional used for additional control to route Tasks. ... or the Task doesn't match a subsequent filter, then the...
Read more >
3 Operators, Functions, Expressions, Conditions
Oracle does not accept all forms of expressions in all parts of all SQL commands. You must use appropriate expression notation whenever expr...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found