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

parse: parse target correctly for generated stages #4961

Merged
merged 1 commit into from
Nov 25, 2020

Conversation

skshetry
Copy link
Member

@skshetry skshetry commented Nov 25, 2020

Even the title says correctly, this is done to support stages that was generated using a complex data, which is not officially supported.

eg:

stages:
  build:
    foreach:
      - level: 15
      - level: 25
      - level: 35
    do:
      cmd: echo ${item.level}

Here, the list has dict inside which is something that's not supported officially. This will generate stages having name similar to the
build@{'level': 15}, which works, but the dvc repro <stage> fails as the target parser looks for : to differentiate between file path and the stage name (eg: we support running single stage via dvc repro ../dvc.yaml:build2).

Though, I have to say, the parsing is getting complex. :(

Fixes #4957

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

@skshetry skshetry added enhancement Enhances DVC A: templating Related to the templating feature labels Nov 25, 2020
@skshetry skshetry added this to In progress in DVC 17 November - 1 December 2020 via automation Nov 25, 2020
@skshetry skshetry self-assigned this Nov 25, 2020
@skshetry skshetry merged commit 1294450 into iterative:master Nov 25, 2020
DVC 17 November - 1 December 2020 automation moved this from In progress to Done Nov 25, 2020
@skshetry skshetry deleted the parse-target-properly branch November 25, 2020 10:28
@jorgeorpinel
Copy link
Contributor

Hey @skshetry your PR descriptions are pretty good, they explain what you're developing. Do you have a wiki or something that concentrates all of these explanations for the vars and loops in dvc.yaml? We need to start drafting the docs thig month AFAIK. Thanks

@skshetry
Copy link
Member Author

skshetry commented Dec 5, 2020

@jorgeorpinel, all of these are documented in the https://github.com/iterative/dvc/wiki/Parametrization.
All, except set, are official features.

@jorgeorpinel
Copy link
Contributor

Purrrfect 🐱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: templating Related to the templating feature enhancement Enhances DVC
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

stage name incorrectly parsed with parametrization for dict
3 participants