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: require argcomplete version at least 1.12.3 to test/operate correctly #6693

Merged
merged 2 commits into from
May 25, 2022

Conversation

yarikoptic
Copy link
Member

On debian stable bullseye and ubuntu 22.04 we have 1.8.1 and test_completion fails.

I will add corresponding version depend also for debian/control in debian branch.

On debian stable bullseye and ubuntu 22.04 we have 1.8.1 and test_completion
fails.
@yarikoptic yarikoptic added the semver-patch Increment the patch version when merged label May 18, 2022
yarikoptic added a commit to yarikoptic/datalad that referenced this pull request May 24, 2022
We keep getting odd fails on travis suggesting that not all tags fetched
or smth like that for PRs against maint like
datalad#6693 :

	======================================================================
	FAIL: datalad.tests.test_version.test__version__
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "/tmp/dl-miniconda-lzitvwji/lib/python3.9/site-packages/nose/case.py", line 198, in runTest
		self.test(*self.arg)
	  File "/home/travis/build/datalad/datalad/datalad/tests/test_version.py", line 61, in test__version__
		ok_startswith(__version__, changelog_version)
	  File "/home/travis/build/datalad/datalad/datalad/tests/utils.py", line 451, in ok_startswith
		ok_(s.startswith(prefix),
	AssertionError: String '0.16.2+26.g654fe57' doesn't start with '0.16.3'

to troubleshoot this and future similar problems -- show tags and git describe
output(s)
@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

Merging #6693 (a2168dd) into maint (8017e42) will decrease coverage by 0.37%.
The diff coverage is n/a.

❗ Current head a2168dd differs from pull request most recent head 4ce660d. Consider uploading reports for the commit 4ce660d to get more accurate results

@@            Coverage Diff             @@
##            maint    #6693      +/-   ##
==========================================
- Coverage   91.06%   90.68%   -0.38%     
==========================================
  Files         353      353              
  Lines       44518    44518              
==========================================
- Hits        40540    40372     -168     
- Misses       3978     4146     +168     
Impacted Files Coverage Δ
datalad/metadata/extractors/xmp.py 24.07% <0.00%> (-68.52%) ⬇️
datalad/metadata/extractors/tests/test_xmp.py 40.90% <0.00%> (-59.10%) ⬇️
datalad/metadata/tests/test_extract_metadata.py 54.05% <0.00%> (-45.95%) ⬇️
datalad/metadata/extract_metadata.py 69.44% <0.00%> (-30.56%) ⬇️
datalad/log.py 81.67% <0.00%> (-13.95%) ⬇️
datalad/cmd.py 83.07% <0.00%> (-11.03%) ⬇️
datalad/support/tests/test_sshconnector.py 91.97% <0.00%> (-6.80%) ⬇️
datalad/ui/progressbars.py 76.00% <0.00%> (-6.29%) ⬇️
datalad/runner/coreprotocols.py 94.73% <0.00%> (-5.27%) ⬇️
datalad/support/keyring_.py 90.47% <0.00%> (-4.77%) ⬇️
... and 33 more

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 8017e42...4ce660d. Read the comment docs.

Copy link
Member

@bpoldrack bpoldrack left a comment

Choose a reason for hiding this comment

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

Looks alright, but can you tell anything about those failures, @yarikoptic ? Just noticed them in #6704, too.

In principle needed only for builds against `maint`. Without it we might not have
the most recent git tag for a release in maint.  Here is further details emailed to
Travis support team:

I think that the default git clone command used by travis with --depth=50
should also allow for the  specification of the base branch .

Rationale:

in datalad project (paid plan) we were getting some periods
of time odd unittest fails suggesting that most recent git tag was
not fetched.

Reason:

1. we have two branches: master and maint. maint is the one getting
bugfixes releases cut off from, and which eventually get merged into
master.

2. travis, regardless of what is the base branch for the PR, just does a
shallow clone of the default branch, e.g. in our case:

    git clone --depth=50 https://github.com/datalad/datalad.git datalad/datalad

and that in turn fetches tags reachable from that branch, not
necessarily all most recent tags.  Then it fetches/checks out the
corresponding head or a merge head for the PR, e.g.

        git fetch origin +refs/pull/6693/merge:

which doesn't fetch any extra tags.  That results then in

        git describe

not having access to the actual most recent git tag for that PR base branch (in
our case - maint).

The most obvious solution is to disable shallow cloning, but that would add 10
seconds to our already long runs.  Ideally I should be able to adjust
aforementioned clone command to become

    git clone --depth=50 --branch="{TRAVIS_BRANCH}" https://github.com/datalad/datalad.git datalad/datalad

which seems would resolve our issue.
@yarikoptic
Copy link
Member Author

yeap -- travis doesn't fetch all the tags!!

0.01s$ git tag; echo "Describes:"; git describe; git describe --tags
0.14.8
0.15.0
0.15.1
0.15.2
0.15.3
0.15.4
0.15.5
0.15.6
0.16.0
0.16.1
0.16.2
Describes:
0.16.2-30-g38ce947
0.16.2-30-g38ce947

and looking "above" I see git clone --depth=50 https://github.com/datalad/datalad.git datalad/datalad which , while fetching the default branch master which might have not had maint merged recently indeed would lack its tag:

lena:/tmp
$> git -C datalad/datalad branch
* master

$> git -C datalad/datalad tag   
0.14.8
0.15.0
0.15.1
0.15.2
0.15.3
0.15.4
0.15.5
0.15.6
0.16.0
0.16.1
0.16.2

so -- mystery is resolved! Now need to workout a solution for it... emailed travis support, force pushed here a workaround -- doing full clone (costs us ~10 seconds :-/)

@yarikoptic
Copy link
Member Author

ok, mystery resolved and problems averted. Fails are AFAIK known on macs... one is the known test_ria_postclonecfg and another one is also something freshish git-annexy I whined about recently. Let's proceed.

@yarikoptic yarikoptic changed the title ENH: provide argcomplete version depend at least 1.12.3 BF: require argcomplete version at least 1.12.3 to test/operate correctly May 25, 2022
@yarikoptic yarikoptic merged commit 476b48d into datalad:maint May 25, 2022
@yarikoptic yarikoptic deleted the enh-argcomplete-dep branch May 31, 2022 19:57
@github-actions
Copy link

github-actions bot commented Jun 2, 2022

🚀 PR was released in 0.16.4 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released semver-patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants