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

BF: annexrepo: Skip empty lines when expecting one output line #3682

Merged
merged 2 commits into from Sep 18, 2019

Conversation

kyleam
Copy link
Contributor

@kyleam kyleam commented Sep 16, 2019

When the git-annex version used on AppVeyor went from git-annex
7.20190731-gc131c0f0c to 7.20190912-g05bc37910,
test_update.test_multiway_merge started to fail. The failure occurs
in _run_simple_annex_command(), which asserts that it gets no more
than one line. The unexpected extra lines seem to be coming from
empty lines:

https://ci.appveyor.com/project/mih/datalad/builds/27446423#L684

_run_simple_annex_command() already filters the output lines to remove
some informational messages from git-annex. Update that condition to
remove empty lines as well.

Fixes #3675.


Note that the failing test from #3675 is skipped on AppVeyor for 0.11.x because it is incompatible with direct mode. To make sure this failure is resolved on master, I've pushed a scratch branch that sits on top of master and has the same non-empty-line condition from this PR:

https://ci.appveyor.com/project/mih/datalad/builds/27446747

(Edit: The build above passed.)

kyleam added 2 commits Sep 16, 2019
When the git-annex version used on AppVeyor went from git-annex
7.20190731-gc131c0f0c to 7.20190912-g05bc37910,
test_update.test_multiway_merge started to fail.  The failure occurs
in _run_simple_annex_command(), which asserts that it gets no more
than one line.  The unexpected extra lines seem to be coming from
empty lines:

  https://ci.appveyor.com/project/mih/datalad/builds/27446423#L684

_run_simple_annex_command() already filters the output lines to remove
some informational messages from git-annex.  Update that condition to
remove empty lines as well.

Fixes datalad#3675.
Provide more information to make issues like dataladgh-3675 easier to debug.
@codecov
Copy link

@codecov codecov bot commented Sep 16, 2019

Codecov Report

Merging #3682 into 0.11.x will increase coverage by 0.14%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           0.11.x    #3682      +/-   ##
==========================================
+ Coverage   81.09%   81.24%   +0.14%     
==========================================
  Files         256      256              
  Lines       33911    33912       +1     
==========================================
+ Hits        27500    27551      +51     
+ Misses       6411     6361      -50
Impacted Files Coverage Δ
datalad/support/annexrepo.py 57.99% <50%> (+0.47%) ⬆️
datalad/downloaders/tests/test_http.py 91.15% <0%> (-1.23%) ⬇️
datalad/support/json_py.py 95.94% <0%> (ø) ⬆️
datalad/utils.py 65.19% <0%> (+0.31%) ⬆️
datalad/interface/run.py 72.13% <0%> (+1.49%) ⬆️
datalad/interface/unlock.py 77.77% <0%> (+13.58%) ⬆️
datalad/interface/run_procedure.py 88.19% <0%> (+19.87%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5926b24...e295c9f. Read the comment docs.

@mih
Copy link
Member

@mih mih commented Sep 18, 2019

I commented on the general issue the presence of this function represents here: #3675 (comment)

This PR maintains it nature -- which seems fine to me.

@mih
Copy link
Member

@mih mih commented Sep 18, 2019

Thx @kyleam

@mih mih merged commit 60542a0 into datalad:0.11.x Sep 18, 2019
4 of 5 checks passed
@kyleam kyleam deleted the run-annex-skip-empty-line branch Sep 18, 2019
yarikoptic added a commit that referenced this issue Oct 14, 2019
0.11.8 (Oct 11, 2019) -- annex-we-are-catching-up

Fixes

- Our internal command runner failed to capture output in some cases.
  ([#3656][])
- Workaround in the tests around python in cPython >= 3.7.5 ';' in
  the filename confusing mimetypes ([#3769][]) ([#3770][])

Enhancements and new features

- Prepared for upstream changes in git-annex, including support for
  the latest git-annex
  - 7.20190912 auto-upgrades v5 repositories to v7.  ([#3648][]) ([#3682][])
  - 7.20191009 fixed treatment of (larger/smaller)than in .gitattributes ([#3765][])

- The `cfg_text2git` procedure, as well the `--text-no-annex` option
  of [create][], now configure .gitattributes so that empty files are
  stored in git rather than annex.  ([#3667][])

* tag '0.11.8': (27 commits)
  DOC: add CHANGELOG entry about mimetypes workaround, and regenerate changelog.rst
  RF: reuse fn*obscure* variables from test_archives for testing archives custom remote
  BF(TST,workaround): do not use ; in the test archive filenames
  Finalize changelog and boost version
  DOC: Adjust CHANGELOG for the fix of test
  RF(TST): use 'willgetshort' name to correctly reflect file behavior
  BF(TST): reflect the fact that since 7.20191009 file would jump from annex to git based on current size
  CHANGELOG.md: Add entry for gh-3667
  CHANGELOG.md: First batch for 0.11.8
  RF: simplify the expression for largefiles based on size
  ENH: exit with dedicated 99 exit code if installed annex is newer than -devel
  TST: known_failure_v6_or_later: Consider whether v5 is supported by git-annex
  BF(v7): gitrepo: Avoid adding files to annex
  BF: 3rdparty_analysis_workflow: Make example compatible with v6+
  ENH: annexrepo: Give more informative assertion error
  BF: annexrepo: Skip empty lines when expecting one output line
  TST: create: Adjust --text-no-annex test for aa6b8dc
  ENH: add file size rule to --text-no-annex
  TST: basic test for empty files in text2git ds
  ENH: exclude empty files from being annexed after text2git
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants