Skip to content

brancher: make brancher part of scm #4562

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

Closed
wants to merge 1 commit into from

Conversation

pared
Copy link
Contributor

@pared pared commented Sep 11, 2020

Thank you for the contribution - we'll try to review it as soon as possible. πŸ™

Prerequisite for #4446

In order to make plots/metrics/params diff accept any viable target, we need to make brancher repo agnostic. Considering that diff makes sense only in case of some kind of scm, it makes sense to make brancher part of scm.

@pared pared added the enhancement Enhances DVC label Sep 11, 2020
@pared pared requested review from pmrowla, skshetry and Suor September 14, 2020 15:37
@pared
Copy link
Contributor Author

pared commented Sep 14, 2020

@Suor does the viewer interact with brancher in any way? In this change I intended to unify the branches behaviour and return "workspace" instead of ""/"workspace" depending on repository status, not sure if that won't interfere with something at viewer.

@pared pared marked this pull request as ready for review September 16, 2020 12:53
@@ -17,23 +17,25 @@ def test_show_simple(tmp_dir, dvc, run_copy_metrics):
run_copy_metrics(
"metrics_t.yaml", "metrics.yaml", metrics=["metrics.yaml"],
)
assert dvc.metrics.show() == {"": {"metrics.yaml": 1.1}}
assert dvc.metrics.show() == {"workspace": {"metrics.yaml": 1.1}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking API change, people might rely on this, so normally we can't just break it like that, unless we have a very good reason.

Copy link
Contributor

@efiop efiop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is breaking our API, could you clarify the reasons to do that?

all_tags=False,
all_commits=False,
): # pylint: disable=no-self-use, unused-argument
yield "workspace", LocalTree(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to return workspace from here? It looks like it makes mess, i.e. we need to skip it later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also LocalTree has absolutely nothing to do with Base SCM

@Suor
Copy link
Contributor

Suor commented Sep 21, 2020

Another thing is a branch or tag might be named workspace. In this case on metric show that branch is indistinguishable from actual workspace.

@pared
Copy link
Contributor Author

pared commented Oct 2, 2020

Seems like starting from redesigning the brancher was wrong idea. Not only it would break the current functionality, but also the end result could be achieved in other way. Closing for now.

@pared pared closed this Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhances DVC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants