Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

context variables validation - $(tasks.dagtask.status) #3681

Closed
pritidesai opened this issue Jan 12, 2021 · 0 comments · Fixed by #3691
Closed

context variables validation - $(tasks.dagtask.status) #3681

pritidesai opened this issue Jan 12, 2021 · 0 comments · Fixed by #3691
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@pritidesai
Copy link
Member

Context variable to access execution status is supported as a param value without any other params or extra string. This validation is missing from the PR #3390 that it implemented this feature. PR #3390 has documented the guidelines in pipelines.md:

`$(tasks.<pipelineTask>.status)` is instantiated and available at runtime and must be used as a param value
as is without concatenating it with any other param or string, for example, this kind of usage is not validated/supported
`task status is $(tasks.<pipelineTask>.status)`. 

Use it as a param value:
     params:
        - name: task1Status
          value: "$(tasks.task1.status)"

First, lets evaluate whether we should enforce this restriction, i.e. $(tasks.dagtask.status) can not be used with any other param or concatenated with other string.

To apply such enforcement, add validation for:

  1. A dag task with a param value set to $(tasks.dagtask.status) with or without any other param or string is prohibited (part of this validation is implemented in PR access execution status of any task in finally #3390 which includes validating dag task with param value set to $(tasks.dagtask.status) without any extra concatenation).
  2. A finally task with param value referring to $(tasks.dagtask.status) must not have any other params or string around it.

PR #3390 has implemented validating existence of dagtask in $(tasks.dagtask.status). This issue only focuses on validation (1) and (2).

@dibyom dibyom added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants