Commit Graph
100 Commits
Author SHA1 Message Date
Ruslan Kuprieiev 15c787f2ac innosetup: commit images 2020-06-18 23:39:33 +03:00
Ruslan Kuprieiev 6a64f86178 pre-commit: use isort seeder 2020-05-07 00:25:41 +03:00
Ruslan Kuprieiev 227dbf44d9 isort: fix config 2020-05-07 00:17:38 +03:00
Ruslan Kuprieiev 93d7b9173b tests: use --single-stage 2020-05-04 20:23:49 +03:00
Ruslan Kuprieiev 06ca3b7f82 remote: bring back manual close_pools()
We used to have this line previously, thinking that it was only a py2
issue, but it turned out that it happens on py3 as well. So bring this
line back for now.
2020-02-02 16:57:23 +02:00
Ruslan Kuprieiev 13ed7a1c32 install: fix post-checkout hook
We should skip running post-checkout hook on rebases and merges to not
accidentally break them in the middle of the process. Git doesn't
provide any native mechanisms for hooks to know whether or not this is a
rebase/merge that we are going through, but we can use
`.git/rebase-merge` existance as a marker.

Previous approach has only accounted for branches and was causing issues
when checking-out tags.

Fixes #3241
2020-01-30 02:19:13 +02:00
Ruslan Kuprieiev 230e5c86d8 config: use validate() more explicitly 2020-01-27 16:38:46 +02:00
Ruslan Kuprieiev e393e29ef5 metrics: introduce diff
This first implementation is based on existing `dvc metrics show`
functionality, but is also able to auto-detect json to properly
show diff for it.
2020-01-13 06:45:48 +02:00
Ruslan Kuprieiev ba45c9cd5b setup: get rid of py2 reqs 2020-01-08 02:16:06 +02:00
Ruslan Kuprieiev c1906436c2 rwlock: flush and fsync
It is important that we ensure that rwlocked contents are flushed to
disk, because otherwise other rwlock readers might get outdated state.

Kudos @shcheklein for catching this one.
2020-01-06 22:37:21 +02:00
Ruslan Kuprieiev 1dcce1d8b0 rwlock: check that .dvc/lock is locked
Mostly a sanity check, but we did have a potential bug in `destroy`,
whcih this PR fixes along the way.

Kudos @shcheklein for catching this one.
2020-01-06 22:34:34 +02:00
Ruslan Kuprieiev 6411a3bb32 ui: don't show exception for "Too many files" error
https://github.com/iterative/dvc.org/pull/875#discussion_r362920851

Stops showing the exception in non-verbose mode, but shows full
traceback in verbose mode.

Introducing our custom parameter `tb_only` through standard `extra`
logging parameter.
2020-01-06 01:02:59 +02:00
Ruslan Kuprieiev 97a7f582a4 dvc: remove reorder_python_imports formatter 2019-11-13 21:45:44 +02:00
Ruslan Kuprieiev e4c3dbf49b test: try using azurite 3.3.0-preview
Azurite was updated [2] to support new SAS tokens, so we no longer need
to downgrade azure-storage-blob for our tests.

[1] https://github.com/iterative/dvc/issues/2387
[2] https://github.com/Azure/Azurite/issues/250
2019-11-13 03:25:06 +02:00
Ruslan Kuprieiev add0958019 win: inno: use SuppressibleMsgBox instead of MsgBox 2019-11-09 01:47:49 +02:00
Ruslan Kuprieiev a956090d6d pyinstaller: add pywin32/win32file hook
Also added a simple test to `dvc-test` repo [1].

[1] https://github.com/iterative/dvc-test/commit/5748744fa1ebb4e265f08fedcddc66a17e8bd914

Fixes #2754
2019-11-08 22:11:17 +02:00
Ruslan Kuprieiev 1058df0f77 analytics: don't forget to convert to bool 2019-11-08 05:21:47 +02:00
Ruslan Kuprieiev 910a67b35f analytics: don't verify config from repo
Otherwise this will raise an exception from analytics worker:
```
dvc config cache.type sometypo
```
But running that same command with `--system` or `--global` flag outside
of repo won't raise that.

Also need to better handle ConfigObjError, but that is a separate issue.
2019-11-08 02:37:11 +02:00
Ruslan Kuprieiev 1af608bf64 checkout: don't cleanup links when checking out specific targets
Related to #2671
2019-11-07 13:10:16 +02:00
Ruslan Kuprieiev 21b7d1f7ec system: use logging instead of dvc.logger
A leftover from an old logger refactoring.
2019-11-06 23:24:46 +02:00
Ruslan Kuprieiev 7caf28ca11 dvcignore: don't forget to use dvcignore when collecting dvcignores
Fixes #2737
2019-11-06 01:39:31 +02:00
Ruslan Kuprieiev 95fe1578bb dvc: automatically reorder imports 2019-11-05 02:34:40 +02:00
Ruslan Kuprieiev b718b839bf system: win: use win32file for _getdirinfo
Current implementation is triggering some non-obvious gc bug, that
causes memory leaks. Using win32file simplifies the code and gets rid of
this bug.

To reproduce it, run:

```
from dvc.system import System

while True:
    System.inode(__file__)
```

and see your Windows machine run out of memory pretty quickly.
2019-11-05 01:46:21 +02:00
Ruslan Kuprieiev 4efd048796 test: try removing get_url test 2019-11-04 00:05:44 +02:00
Ruslan Kuprieiev 46391cb4f9 test: fix formatting 2019-11-03 23:47:34 +02:00
Ruslan Kuprieiev 71f8d25ab3 test: get-url: try using with mock_s3() instead of a decorator 2019-11-03 23:42:44 +02:00
Ruslan Kuprieiev c999b5d270 remove info message 2019-11-01 16:45:41 +02:00
Ruslan Kuprieiev 5c8a312002 fix order 2019-11-01 16:41:22 +02:00
Ruslan Kuprieiev 0dd4d2361e fix formatting 2019-11-01 16:40:06 +02:00
Ruslan Kuprieiev a0d364e78a version: fix warning 2019-10-22 23:21:22 +03:00
Ruslan Kuprieiev 803ffaec57 remote: local: don't auto-create directory in __init__
Imagine the scenario of shared cache. To set it up, user would do:

```
dvc config cache.dir /path
dvc config cache.shared group
```

Now, when he runs any dvc operation that involves the Repo instance,
RemoteLOCAL will also be initialized and it will currently auto-create
the directory with a regular `os.mkdir`, which is not using group
permissions. To solve that, we can't simply use `self.makdirs` instead,
as it will cause same issues if you run any dvc command before
`dvc config cache.shared group`. So what we should do is create
directories on demand, instead of creating it in advance, same as we do
in other remotes.

The change itself is pretty trivial and involved removing that `mkdir`
line, adjusting tests to not rely on cache dir existence and also
adjusting `dvc version` to not rely on cache directory existance.

Fixes #2563
2019-10-14 15:50:49 +03:00
Ruslan Kuprieiev 7ed8cea12a dvc: move local/__init__.py -> local.py
No need to keep that subdir for 1 file.
2019-10-10 23:34:02 +03:00
Ruslan Kuprieiev cba8ac7a8f dvc: load state when taking repo lock in @locked
We are always loading state when taking a repo lock, so doing it right
in @locked decorator simplifies the code for Repo methods.
2019-10-10 01:08:28 +03:00
Ruslan Kuprieiev 3b8c48793b scripts: don't include completion scripts into mac pkg
Fixes https://github.com/iterative/dvc/issues/2585
2019-10-08 16:48:36 +03:00
Ruslan Kuprieiev 41552d0af7 deb/rpm/pkg: add zsh completion scripts
Fixes #2181
2019-10-03 22:02:33 +03:00
Ruslan Kuprieiev 132de572af run: improve pyenv PATH modification criteria
https://discordapp.com/channels/485586884165107732/485596304961962003/628766062472724510

Related to #2506
2019-10-02 06:33:01 +03:00
Ruslan Kuprieiev ee976a1c1a run: make shell not load config files
Config files like `~/.zshenv`, `~/.bashenv` etc, are loaded on each
shell invocation, which might overwrite the environment breaking the
commands we are trying to wrap. To fix that, we need to provide
appropriate flags to the shell we are using to avoid loading those
configs.

Fixes #2506
2019-09-30 19:34:55 +03:00
Ruslan Kuprieiev fd14ca3269 dvc: remote: optimize imports
Decreases `time dvc --version` from ~1.4 sec to ~0.3 sec.

Related #2495
Related #2445

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-09-23 11:30:45 +03:00
Ruslan Kuprieiev 43975c8618 dvc: remove PATH prefixes appended by pyenv
Unlike PyInstaller, pyenv doesn't leave backups of original env vars
when it modifies them. If we look into the shim, pyenv and pyenv-exec,
we can figure out that the PATH is modified like this:

    PATH=$PYENV_BIN_PATH:${bin_path}:${plugin_bin}:$PATH

where

    PYENV_BIN_PATH - starts with $PYENV_ROOT, see pyenv-exec source code.
    bin_path - might not start with $PYENV_ROOT as it runs realpath on
        it, see pyenv source code.
    plugin_bin - might contain more than 1 entry, which start with
        $PYENV_ROOT, see pyenv source code.

So having this, we can make a rightful assumption about what parts of the PATH
we need to remove in order to get the original PATH.

Fixes #2506
2019-09-23 04:25:42 +03:00
Ruslan Kuprieiev 31b40816b5 daemon: use sys.argv[0] instead of -m dvc
This way dvc will actually launch the same script that it is running
from and not installed dvc module, that might not match.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-09-22 05:18:51 +03:00
Ruslan Kuprieiev 9d6ca1ef6c dvc: move repo lock from CLI to API
For the longest time we've had `repo.lock`, but were only using it from
CLI when running specific command, instead of simply properly taking it
on API operations. This patch takes care of that.
2019-09-21 05:10:06 +03:00
Ruslan Kuprieiev f0c43b4e02 path_info: don't forget to override as_posix method
Unlike original implementation [1] that uses `str()` we actually need
to use `fspath`, because we've overriden `__str__` method to return
relative paths, which will break original `as_posix`.

[1] https://github.com/python/cpython/blob/v3.7.0/Lib/pathlib.py#L692

Fixes #2483

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-09-13 04:52:03 +03:00
Ruslan Kuprieiev 384fd4cd9a test: repro: fix link types 2019-09-10 02:12:28 +03:00
Ruslan Kuprieiev ce27444dd2 scm: remove pkg install leftovers
Leftover code was causing problems when working with symlinks, because
it tried to use `realpath` on symlinks to further use it to determine
parent directory.

Fixes #2476
2019-09-09 19:43:10 +03:00
Ruslan Kuprieiev 357ce82f28 run: introduce --always-changed
This is an extension of our callback stages (no deps, so always
considered as changed) for stages with dependencies, so that these
stages could be used properly in the middle of the DAG. See attached
issue for more info.

Related to #2378
2019-09-09 18:03:28 +03:00
Ruslan Kuprieiev 60d8e8fbec erepo: fix environment before running git
Fixes #2471
2019-09-06 23:42:46 +03:00
Ruslan Kuprieiev 096a043e21 dvc: don't include gssapi
If user needs it, he can install it by himself through pip.

https://github.com/iterative/dvc/pull/2424#issuecomment-523990535

https://github.com/iterative/dvc.org/pull/582
2019-08-24 07:20:06 +03:00
Ruslan Kuprieiev 89d3ccae0d test: run: refactor signal handler tests
Current test is testing for signal handler restoration in an obscure
way. As a result, the test wasn't actually testing anything, because
KeyboardInterrupt is raised by default_int_handler, and so raising it
in a mock won't be caught by signal handlers, because they are dealing
with real singnals.

Fix #2406

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-19 14:49:19 +03:00
Ruslan Kuprieiev 06d347178f remote: base: remove whitespace
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-13 02:25:15 +03:00
Ruslan Kuprieiev c308ad8a58 remote: base: don't forget about the progress bar
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-13 02:08:29 +03:00
Ruslan Kuprieiev baa548eec9 remote: base: call makedirs in move
Remotes like s3/gs/etc don't need to create dirs in advance.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-10 04:53:50 +03:00
Ruslan Kuprieiev 919a49a231 travis: windows: cache chocolatey downloads
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-10 04:16:11 +03:00
Ruslan Kuprieiev eb3b3f9f4e travis: windows: skip install stage
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-10 04:15:22 +03:00
Ruslan Kuprieiev 3f19036646 travis: osx: speedup install stage
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-10 04:15:22 +03:00
Ruslan Kuprieiev 2b36d25f49 remote: base: remove unused argument
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-09 17:10:40 +03:00
Ruslan Kuprieiev 9955f1c64f utils: merge isinstance checks
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-09 17:10:40 +03:00
Ruslan Kuprieiev 640e737570 remote: base: remove unused argument
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-09 17:10:40 +03:00
Ruslan Kuprieiev 24428e47c3 remote: local: cache_exists: match parameters from the BASE
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-09 17:10:40 +03:00
Ruslan Kuprieiev 713e288adc remote: base: checkout: remove unnecessary return
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-09 17:10:40 +03:00
Ruslan Kuprieiev b2fe3f7a71 utils: remove unnecessary else
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-09 17:10:40 +03:00
Ruslan Kuprieiev 9c5fd0c76c dvc: support group cache mode
In this mode, dvc will set appropriate file/dir permissions to support
sharing cache between different users within the same group.

Fixes #2287

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-09 17:10:40 +03:00
Ruslan Kuprieiev 5aae88b316 local: don't try to protect file if it is already protected
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-09 16:46:24 +03:00
Ruslan Kuprieiev 4dd221dab9 reproduce: properly handle --single-item case
Fix #2354

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-08-01 22:36:47 +03:00
Ruslan Kuprieiev 56b162d2d0 readme: fixed formatting 2019-07-31 21:09:46 +03:00
Ruslan Kuprieiev 3bdcaba39f travis: osx: retry brew update
Fixes #2347

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-07-31 20:49:08 +03:00
Ruslan Kuprieiev 79052ddd5c readme: fix message about the number of install options
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-07-31 20:37:30 +03:00
Ruslan Kuprieiev 5e02a90e13 version: don't skip link info and skip if there is no psutil
Fixes #2336

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-07-29 03:33:07 +03:00
Ruslan Kuprieiev 4a4ddf078c version: temporarily make psutil optional
Workaround for https://github.com/iterative/dvc/issues/2284

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-07-25 01:52:11 +03:00
Ruslan Kuprieiev 641edacef6 import-url: lock by-default
Fixes #2238

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-07-22 20:24:00 +03:00
Ruslan Kuprieiev 4a0b3a807d import: only donwload specific output
Fixes #2252

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-07-22 15:04:10 +03:00
Ruslan Kuprieiev f901ba5c10 tests: use moto pre-release
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-07-20 16:09:44 +03:00
Ruslan Kuprieiev 68bebe7944 remote: hdfs: use pyarrow and connection pool
Related to #1629

Speeds up HDFS tests significantly. E.g. ExternalHDFS test goes from 600
sec to 190sec. test_open_external[HDFS] from 160sec to 3sec.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-07-20 01:12:17 +03:00
Ruslan Kuprieiev 2013e21aaf checkout: safe_remove output if no checksum is found
Fixes #2146

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-07-05 02:59:57 +03:00
Ruslan Kuprieiev da63c0ffdc travis: enable windows build and ditch appveyor
Fixes #2176

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-07-03 21:09:23 +03:00
Ruslan Kuprieiev babc4a7f7e appveyor: require py3 to pass
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-25 04:48:51 +03:00
Ruslan Kuprieiev 1123a303bf import: require 'path' argument
`dvc import` doesn't yet support importing the whole package.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-25 01:54:32 +03:00
Ruslan Kuprieiev 2141a5ac65 import: add "beta feature" warning 2019-06-25 01:54:32 +03:00
Ruslan Kuprieiev 12c7689a74 dvc: update paramiko requirements
Fixes #2155

No longer need to explicitly ignore paramiko warnings.

Big thanks to @cowlinator for the heads-up!

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-24 00:24:06 +03:00
Ruslan Kuprieiev 9bca1c9bff dvc: use remove() instead of shutil.rmtree()
Our `remove()` is able to handle read-only files which we or git
sometimes leave behind.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-23 18:11:30 +03:00
Ruslan Kuprieiev 918ef646dc appveyor: test py2 and py3
Related to #2166

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-23 13:33:47 +03:00
Ruslan Kuprieiev e890c0558a dvc: fix help messages for get and import-url
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-22 00:50:22 +03:00
Ruslan Kuprieiev 81fd0b3415 dvc: destroy: don't remove data
Fix #1011

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-21 13:13:29 +03:00
Ruslan Kuprieiev d795cdf1ba dvc: address review from #2160
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-21 12:27:24 +03:00
Ruslan Kuprieiev 1ba8e0171d dvc: replace pkg concept with external repo
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-21 01:16:00 +03:00
Ruslan Kuprieiev be255ba4b0 http: enable progress bar
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-19 14:22:52 +03:00
Ruslan Kuprieiev d3bdca3f13 tests: use shortuuid for shorter paths
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-18 16:11:39 +03:00
Ruslan Kuprieiev 14dc0c0115 pkg: handle install/version errors
Fixes #1772

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-18 16:09:06 +03:00
Ruslan Kuprieiev 4947069c4f pkg: introduce -f|--force for pkg install
Fixes #1773

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-17 21:06:10 +03:00
Ruslan Kuprieiev 914a587123 pkg: implement dvc pkg get command
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-17 18:12:36 +03:00
Ruslan Kuprieiev 5941ace270 dvc: initial 'dvc pkg' implementation
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-17 18:12:36 +03:00
Ruslan Kuprieiev 0d330c1b9b dvc: move Updater out of Repo()
Fixes #2039

Required by #2012 to be able to fetch data through the API without
interuption from updater.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-14 00:54:36 +03:00
Ruslan Kuprieiev b1eebe2f86 diff: don't use self
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-14 00:20:56 +03:00
Ruslan Kuprieiev bfdb990b3b utils: dont use str() for dvc_walk
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-13 11:51:14 +03:00
Ruslan Kuprieiev 39a8cab49d test: fix s3 test with extra args
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-11 16:28:11 +03:00
Ruslan Kuprieiev 8ef9133194 remote: use RemoteConfig class
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-06 16:00:44 +03:00
Ruslan Kuprieiev f69836c2b3 tests: remove fixme msg
https://github.com/iterative/dvc/issues/2086

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-06 14:41:02 +03:00
Ruslan Kuprieiev 9e9e078de3 config: move logic from CLI to API
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-06 14:41:02 +03:00
Ruslan Kuprieiev 122b94129f Revert "tests: test hdfs on cron and releases"
This reverts commit 76c4755865.
2019-06-02 15:07:36 +03:00
Ruslan Kuprieiev 76c4755865 tests: test hdfs on cron and releases
Related to
https://github.com/iterative/dvc/issues/1629#issuecomment-498023424

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-02 14:44:56 +03:00
Ruslan Kuprieiev 31848d5c7f remote: support remote:// notation for push/pull/gc
Fixes #2066

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-05-29 12:54:31 +03:00