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

repro: introduce --continue-on-error #9705

Closed
wants to merge 5 commits into from

Conversation

skshetry
Copy link
Member

@skshetry skshetry commented Jul 4, 2023

Fixes #8647 and #7292.

TODO:

  • Tests
  • How to get rid of an extra newline at the end?

This PR might change the execution order.

graph TD
6-->2
7-->2
3-->1
4-->3
5-->3
2-->1
Loading

If you have a graph like this, the execution order would have been: [4,5,3,6,7,2,1].
It's a valid topological ordering.

But with this PR, we'll do order based on degree, so, zero-degree nodes 4,5,6,7 will get processed first, then 3 and 2 will be processed and then 1. i.e. [4,5,6,7,3,2,1].
Which is still a valid topological ordering.

I think the new logic makes it simpler for implementing --continue-on-error, and allows easier parallelization in the future.

@skshetry skshetry requested review from dberenbaum and a team July 4, 2023 16:42
@skshetry skshetry added feature is a feature A: pipelines Related to the pipelines feature labels Jul 4, 2023
@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Patch coverage: 69.62% and project coverage change: -0.07 ⚠️

Comparison is base (63de16c) 90.53% compared to head (1189a68) 90.47%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9705      +/-   ##
==========================================
- Coverage   90.53%   90.47%   -0.07%     
==========================================
  Files         480      480              
  Lines       36421    36480      +59     
  Branches     5232     5243      +11     
==========================================
+ Hits        32975    33005      +30     
- Misses       2855     2880      +25     
- Partials      591      595       +4     
Impacted Files Coverage Δ
tests/unit/command/test_repro.py 100.00% <ø> (ø)
dvc/repo/reproduce.py 82.26% <68.83%> (-16.50%) ⬇️
dvc/commands/repro.py 100.00% <100.00%> (ø)
dvc/exceptions.py 93.70% <100.00%> (-0.09%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dberenbaum
Copy link
Collaborator

@skshetry Do you need QA? Product-wise, LGTM except for the long flag name, but I don't have any better ideas for it.

@skshetry
Copy link
Member Author

skshetry commented Jul 6, 2023

@skshetry Do you need QA? Product-wise, LGTM except for the long flag name, but I don't have any better ideas for it.

yeah, make has -i/--ignore-errors and --keep-going/-k, which I am leaning towards.

I am still not sure about this PR. I do like the simplicity this execution order provides in terms of implementation, I prefer the existing execution order that tries to execute a subtree before moving on to the next one.

@skshetry
Copy link
Member Author

skshetry commented Jul 7, 2023

Closing in favour of #9712.

@skshetry skshetry closed this Jul 7, 2023
@skshetry skshetry deleted the continue-on-error branch July 7, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: pipelines Related to the pipelines feature feature is a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Continue running non-dependent stages after stage failure
2 participants