Commit Graph
6116 Commits
Author SHA1 Message Date
7fe0279c20 dvc: ignore errors on protect/set_exec (bp #5335) (#5336)
* dvc: ignore errors on protect/set_exec (#5335)

Both of these are not fatal and could safely be ignored.

Fixes #5255

(cherry picked from commit 434cd305e9)

* tests: upgrade azurite and enable loose mode

Backport of #5272

Co-authored-by: Ruslan Kuprieiev <[email protected]>
Co-authored-by: Ruslan Kuprieiev <[email protected]>
2021-01-26 04:34:27 +02:00
Ruslan Kuprieiev 9638dde4da dvc: bump to 1.11.12 1.11.12 2021-01-25 00:34:49 +02:00
Ruslan Kuprieiev c36ae73301 Revert "utils/fs: checking files ownership in 'move' (#4348) (#4832)" (#5321)
Fixes #5255

We need a proper solution for #4832, will introduce later.

This reverts commit 8e738262ad.
2021-01-24 23:22:17 +02:00
Ruslan Kuprieiev 20ee1e14b0 dvc: bump to 1.11.11 1.11.11 2021-01-21 13:08:26 +02:00
mergify[bot]andBatuhan Taskaya 6007838556 s3: Allow authentication using session token (#5240) (#5303)
* S3: Allow authentication using session token

* Add a little test

(cherry picked from commit 5374880220)

Co-authored-by: Batuhan Taskaya <[email protected]>
2021-01-21 12:50:37 +02:00
Ruslan Kuprieiev 77bc27799b dvc: bump to 1.11.10 1.11.10 2021-01-05 11:05:09 +02:00
mergify[bot]andRuslan Kuprieiev c5fd3e3cff add: handle long filenames (#5201) (#5206)
(cherry picked from commit b779a117ab)

Co-authored-by: Ruslan Kuprieiev <[email protected]>
2021-01-05 11:04:41 +02:00
Ruslan Kuprieiev 4bca30e4d6 dvc: bump to 1.11.9 1.11.9 2020-12-23 13:17:46 +02:00
mergify[bot]andPeter Rowlands 7a84c104fd lock: fix AttributeError in dvc.lock.HardlinkLock (#5152) (#5153)
(cherry picked from commit afe96974c3)

Co-authored-by: Peter Rowlands (변기호) <[email protected]>
2020-12-23 13:17:08 +02:00
mergify[bot]andSaugat Pachhai 1aa7e5dbec params/metrics diff: collect from revisions/workspace twice (bp #5121) (#5129)
(cherry picked from commit 723477ed5a)

Co-authored-by: Saugat Pachhai <[email protected]>
2020-12-18 14:22:19 +05:45
mergify[bot]andSaugat Pachhai fe0d6ec3e0 params diff: skip params dependency for vars (bp #5123) (#5127)
* Skip paramdependency for vars

Previously, `configs` which was a list of PathInfo was being used
to check if the `vars` should be skipped or not.

But, the file is stored as a string that made that check redundant
which might have caused #5117 as they were being stored twice,
once as a expanded paramdependency and next as a flattened dict
from vars, which later during `flatten`, it might have panicked
from that duplication.

* Use defaultdict

* change add_vars to collect_vars

(cherry picked from commit dcce3a31a9)

Co-authored-by: Saugat Pachhai <[email protected]>
2020-12-18 12:09:22 +05:45
Ruslan Kuprieiev a3891995e6 dvc: bump to 1.11.8 1.11.8 2020-12-16 15:05:48 +02:00
05f3eb67ce repro: simplify the logic for frozen stages (bp #5114) (#5116)
* [WIP] repro: simplify the logic for frozen stages (#5114)

Fixes #5082

(cherry picked from commit 64dfaffd7c)

# Conflicts:
#	dvc/repo/reproduce.py

* resolve conflicts

Co-authored-by: Ruslan Kuprieiev <[email protected]>
Co-authored-by: Ruslan Kuprieiev <[email protected]>
2020-12-16 15:04:57 +02:00
29db8a1a95 repro: accept multiple targets (bp #5111) (#5115)
* repro: accept multiple targets (#5111)

Currently, we iterate over targets manually in CLI, which results in a
complicated code and a DAG collection/check overhead. With this PR we
collect the DAG once, figure out all the needed targets within it and
just reproduce them in one pass.

(cherry picked from commit aec8d65791)

# Conflicts:
#	dvc/command/base.py
#	dvc/command/experiments.py
#	dvc/command/repro.py
#	tests/func/test_repro_multistage.py

* resolve conflicts

* resolve test conflicts

Co-authored-by: Ruslan Kuprieiev <[email protected]>
Co-authored-by: Ruslan Kuprieiev <[email protected]>
2020-12-16 05:17:55 +02:00
Ruslan Kuprieiev 4082757aa1 dvc: bump to 1.11.7 1.11.7 2020-12-15 19:55:12 +02:00
mergify[bot]andJoão Rafael 8a11595a93 Remove version restriction from networkx (#5110) (#5112)
(cherry picked from commit 84a3a59bc7)

Co-authored-by: João Rafael <[email protected]>
2020-12-15 19:54:25 +02:00
Ruslan Kuprieiev 60546dcd98 dvc: bump to 1.11.6 1.11.6 2020-12-14 20:24:50 +02:00
mergify[bot]andpeper0 1b4326aefd fix making too many ssh connections when pushing run cache (#4732) (#4733) (#5097)
* fix making too many ssh connections when pushing run cache (#4732)

* reformat

* generator should exit on GeneratorExit exception

* Update dvc/tree/ssh/__init__.py

* pool: close on Exception and not BaseException

Co-authored-by: Tomasz Łakota <[email protected]>
Co-authored-by: Ruslan Kuprieiev <[email protected]>
Co-authored-by: Ruslan Kuprieiev <[email protected]>
(cherry picked from commit 6e92352001)

Co-authored-by: peper0 <[email protected]>
2020-12-14 16:55:18 +02:00
Ruslan Kuprieiev 1138afe495 dvc: bump to 1.11.5 2020-12-14 13:11:06 +02:00
Ruslan Kuprieiev 7916ce4bfb cli: config: check name format (#5094)
Currently we don't handle bad name well:

```
(dvc-3.8.3) ➜  dvc git:(config-bug) ✗ dvc config section
ERROR: unexpected error - not enough values to unpack (expected 2, got 1)
```

With this PR, we check name to conform to either `remote.name.option` or
`section.option`, so we'll give a more friendly:

```
(dvc-3.8.3) ➜  dvc git:(config-bug) ✗ dvc config section
ERROR: argument name: name argument should look like remote.name.option or section.option
usage: dvc config [-h] [--global | --system | --local] [-q | -v] [-u] [-l] [name] [value]

Get or set config options.
Documentation: <https://man.dvc.org/config>

positional arguments:
  name           Option name (remote.name.option or section.option).
  value          Option value.

optional arguments:
  -h, --help     show this help message and exit
  --global       Use global config.
  --system       Use system config.
  --local        Use local config.
  -q, --quiet    Be quiet.
  -v, --verbose  Be verbose.
  -u, --unset    Unset option.
  -l, --list     List all defined config values.
```
2020-12-14 13:10:11 +02:00
Ruslan Kuprieiev c5db57900d gha: run tests on other branches 2020-12-14 12:37:06 +02:00
Ruslan Kuprieiev c9ef5d3ccb dvc: bump to 1.11.4 1.11.4 2020-12-13 02:33:04 +02:00
Ruslan Kuprieiev cd72149b5f system: _reflink_darwin: use fsencode for path (#5086)
Fixes #5083
2020-12-13 02:32:37 +02:00
Ruslan Kuprieiev 80c1f10f08 dvc: bump to 1.11.3 1.11.3 2020-12-08 18:09:48 +02:00
Saugat Pachhai 573546d824 Pin numpy for windows build (#5057) 2020-12-08 18:06:38 +02:00
Casper da Costa-Luis 41b20cd675 tidy snap release (#5016) 2020-12-02 20:21:00 +02:00
Ruslan Kuprieiev cb90bd0c8d dvc: bump to 1.11.2 1.11.2 2020-12-02 19:28:15 +02:00
Ruslan Kuprieiev 82896be988 gha: fix snap action name 2020-12-02 19:12:35 +02:00
Ruslan Kuprieiev 84ae8e02f7 snap: fix channels 2020-12-02 19:12:02 +02:00
Ruslan Kuprieiev a97d5fef72 snap: fix channel names 2020-12-02 18:56:16 +02:00
Ruslan Kuprieiev ed02ff7c30 dvc: bump to 1.11.1 1.11.1 2020-12-02 18:28:29 +02:00
Ruslan Kuprieiev 363ad46326 gha: build packages on other branches 2020-12-02 18:07:26 +02:00
Ruslan Kuprieiev 776ed1d2dd snap: publish to v1 channel 2020-12-02 18:06:08 +02:00
Ruslan Kuprieiev 2d70bc5ec4 dvc: bump to 1.11.0 1.11.0 2020-12-02 17:47:23 +02:00
Peter Rowlands (변기호) 176a23e291 experiments: store experiments in refs/exps instead of heads (#4910)
* experiments: commit to refs/exps/... instead of branch heads

* update exp show

* restore checkpoint_resume kwarg

* refactor new() to use experiments stash

* experiments: use refspecs to populate and collect executors

* experiments: use new stash and merge on exp checkout

* experiments: fix executor chdir

* experiments: update run and show

* skip checkout after reproduce

* checkpoints: use experiments refspecs

* check if workspace was stashed before applying

* exp show: unify checkpoint/standalone experiment collection

* git: move iter_refs to backend

* update for scm changes

* experiments: replace exp checkout in favor of exp apply

* git: handle rev_parse errors in resolve_commit

* update refs containing and baseline check

* fix sigint handling for checkpoints

* update checkpoint exists behavior

* fix checkpoint baseline behavior

* update tests

* experiments: update gc

* update show tests

* fix type checking errors

* update diff

* scm: add diff, describe

* experiments: generate human readable names

* exp run/resume: allow user specified exp name with -n/--name

* update tests

* experiments: add `exp branch` for promoting experiment to full branch

* fix test

* fix missing file

* experiments: explicitly close scm instances before cleaning up tmp dir
2020-12-02 21:20:57 +09:00
Ruslan Kuprieiev c884c94d61 tree: update hint about missing deps (#5005)
Related to #4997
Fixes #4987
2020-12-01 17:57:55 +02:00
Paweł Redzyński f6f18bc201 plots: make linear and scatter interactive (#4975) 2020-12-01 14:55:30 +01:00
Saugat Pachhai 3a3fa7cdde parametrization: convert bool to string as "true"/"false" (#5004)
Previously, Python's `str()` was being used that
resulted in boolean transformed into "True"/"False".

Fixes #4996
2020-12-01 16:05:18 +05:45
Saugat Pachhai 1e1a0999f6 parametrization: show interpolated vars in params diff (#5002)
* parametrization: show interpolated vars in params diff

* Add test for params.diff

* disable logging duration if feature is not enabled
2020-12-01 15:43:37 +05:45
Ruslan Kuprieiev 7f0537038c dvc: preserve desc on add/run/imp (#5003) 2020-12-01 11:52:31 +02:00
Ruslan Kuprieiev 7c45711e34 dvc: preserve comments/meta on add/imp/run (#5001) 2020-12-01 10:39:51 +02:00
Peter Rowlands (변기호) 1e52bc94a3 git: add support for working with refspecs and stashes (#4952)
* git: add support for dulwich Stash

* git: start adding support for custom refs

* git: add Stash and helper context managers for preserving
workspace state

* scm: cleanup refs/stash and add push_refspec

* tests: add tests for git refs and stash

* fix push_refspec

* tests: add tests for git push_refspec

* scm: add git fetch-refspecs

* add test for fetch refspecs

* scm: add test for git refs containing

* remove extraneous log msgs

* fix typing issues

* stash: only try to push if workspace is dirty

* update dulwich to 0.20.14

* scm: move dulwich into scm.backend

* move stash internals to backends

* scm: move git code into dvc/scm/git/... module

* git: use ABC for BaseGitBackend

* fix rebase issue

* git: fix refspec tests on windows

- git file:// URLs need posix style paths

* git: move get_refs_containing to backend

* scm: add callback for handling diverged refs during fetch
2020-12-01 16:56:50 +09:00
Artem Dudarev 38cbd998e1 dvc: more explict error during init when .dvc is ignored by git (#4978)
* dvc: more explict error during init when .dvc is ignored by git

Fixes #3738

* dvc: address PR feedback

* styling

* styling
2020-11-30 21:00:17 +02:00
Ruslan Kuprieiev 09a88b8ea6 stage: move is_cached logic to Stage.can_be_skipped (#4994)
Having that logic in `create_stage` is unnatural and also has some
side-effects for unsuspecting users. For example, it will check the
filesystem for existing dvcfile and will try to load a corresponding old
stage. I've adjusted it with minimal changes to better reflect the logic
behind it.

Pre-requisite for #4907
2020-11-30 15:11:35 +02:00
Saugat Pachhai bc1d10532a Move Repo.collect and collect_granular to Repo.stage (#4993) 2020-11-30 14:28:16 +05:45
Jorge Orpinel 56322d0a53 cmd: matching help output to docs (#4989)
* cmd: matching help output to docs
per https://github.com/iterative/dvc.org/pull/1971#pullrequestreview-538749492
and https://github.com/iterative/dvc.org/pull/1978#pullrequestreview-540445147

* fetch: simplify help text
per https://github.com/iterative/dvc.org/pull/1978#pullrequestreview-540447055
2020-11-30 09:09:11 +02:00
Saugat Pachhai f4f0554884 repro: support glob/foreach-group to run at once through CLI (#4976)
* repro: support regex/foreach-group to run at once

Fixes #4912
Fixes #4886
Fixes #4958

* Use `tree.isdir` rather than `os.path.isdir`

* Use glob rather than regex

* Update dvc/command/repro.py

* s/regex/glob

* disable glob on `collect_granular`

There's no need for a glob here

* add tests for `collect` and `collect_granular`
2020-11-27 19:13:38 +05:45
Saugat Pachhai 011bd18e9f parametrization: support loading vars partially (#4982) 2020-11-27 19:05:02 +05:45
Saugat Pachhai 6d745eb4f0 s3: use mocked s3 instead of the real one (#4968)
* s3: use mocked s3 instead of the real one

Not removing the fixtures just yet

* Update moto

Tests was failing, because of a change in `responses` package, which
`moto` was mocking. This was fixed on
https://github.com/spulec/moto/pull/3466 which is only available on
`dev122` release.

* Use mocked s3 in checkout tests
2020-11-26 11:30:43 +05:45
Saugat Pachhai 788d840e7d tests/ci: update docker image for Azurite (#4967)
`Azure` tests are flaky for some reason. When I investigated one
of the job [1], something seemed wrong with the Azurite or
the client lib.

On `AzureTree.blob_service`, we do the following to check if the
container exists:
```python
try:
    container_client.get_container_properties()
except ResourceNotFoundError:
    container_client.create_container()
```

When looking at the test log, I found out that the
`get_container_properties` was failing with
`ErrorCode:ContainerNotFound` whereas `create_container`
successively was failing with `ErrorCode:ContainerAlreadyExists`.

`create_container` is correct, but `get_container_properties` is
incorrect, as many of the Azure tests have already run successfully
before.

So, either the Azurite has/had bug or the client lib has a bug.
Anyway, we'll find out after updating the Azurite.

[1]: https://github.com/iterative/dvc/runs/1448864706#step:7:4029
2020-11-25 21:21:00 +02:00