Project

General

Profile

Actions

Bug #11502

closed

Flaky test on sdk/python/tests/test_arv_get.py

Added by Lucas Di Pentima about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
SDKs
Target version:
Story points:
-

Description

======================================================================
FAIL: test_get_collection_manifest (tests.test_arv_get.ArvadosGetTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/1/jenkins/workspace/run-tests-remainder/sdk/python/tests/test_arv_get.py", line 81, in test_get_collection_manifest
    self.assertEqual(self.col_manifest, f.read())
AssertionError: u'. 37b51d194a7513e45b56f6524f2d51f2+3+A9a83a0d33abbdec368acb632ec53e8186758bb3f@5903577a acbd18db4cc2f85cedef654fccc4a4d8+3+Ac1a9a2e550cfe57511b2e70c4dfa1d05a23b75e8@5903577a 0:3:bar.txt 3:3:foo.txt\n./subdir 73feffa4b7f6bb68e44cf984c85f6e88+3+A732d02797529f59e880374c7c91d81be527f3307@5903577a 0:3:baz.txt\n' != '. 37b51d194a7513e45b56f6524f2d51f2+3+A0d0f09d1119414a4ae7d56226f7cc79cd84b834f@5903577b acbd18db4cc2f85cedef654fccc4a4d8+3+A0afbb90b13fb7ccfd24ed7ce5923308dcd9863bb@5903577b 0:3:bar.txt 3:3:foo.txt\n./subdir 73feffa4b7f6bb68e44cf984c85f6e88+3+Aeb981cdb15a3ab7330ff42673b5acd6a92e5489a@5903577b 0:3:baz.txt\n'

Subtasks 1 (0 open1 closed)

Task #11506: Review 11502-unstripped-manifest-fixResolvedLucas Di Pentima04/14/2017Actions
Actions #1

Updated by Lucas Di Pentima about 7 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Lucas Di Pentima about 7 years ago

As Peter noted, the comparison on the test should be done with stripped manifests.

Actions #3

Updated by Lucas Di Pentima about 7 years ago

Discovered a regression on the new arv-get, when asked to retrieve a manifest using a PDH, its output was a non-stripped manifest.

Fixed the regression and the flaky test at e507e67ee - branch 11502-arvget-flaky-test

Test run: https://ci.curoverse.com/job/developer-run-tests/235/

Actions #4

Updated by Lucas Di Pentima about 7 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:cbcb0fc8c3ebc85bf81ba9d50795d62db75efa6c.

Actions #5

Updated by Peter Amstutz about 7 years ago

  • Status changed from Resolved to Feedback
Actions #6

Updated by Peter Amstutz about 7 years ago

Reviewing the old code for arv-get, the behavior was to call CollectionReader.manifest_text() which is unnormalized/unstripped regardless of whether it is by UUID or PDH.

It is a regression to change that behavior (and it seems to break crunch-job).

A --strip option might be sensible.

Actions #7

Updated by Lucas Di Pentima about 7 years ago

Updates at branch 11502-unstripped-manifest-fix - 03188ad6e
Test run: https://ci.curoverse.com/job/developer-run-tests/238/

Reverted change so that asking by PDH (and also UUID), the returned manifest includes its tokens by default
Added --strip-manifest as a new option to write manifests without tokens, as requested.
Updated & added tests.

Actions #8

Updated by Lucas Di Pentima about 7 years ago

New updated at 67ba19113
Test run: https://ci.curoverse.com/job/developer-run-tests/240/

As I've unwillingly reintroduced the flaky test, I fixed it by creating new Collection objects from the unstripped manifests, and then compared their stripped manifests to avoid race conditions.
Also made some test code cleanups.

Actions #9

Updated by Tom Clegg about 7 years ago

In test_get_collection_unstripped_manifest, how about replacing r"\+A[0-9a-f@]+" with "+Axxxxx" in both expected and actual before comparing, instead of stripping them -- that way the test would ensure arv-get really outputs an unstripped manifest.

Trailing whitespace in sdk/python/arvados/commands/get.py L90

Rest LGTM.

Actions #10

Updated by Lucas Di Pentima about 7 years ago

Updates at e7284afa8
Waiting for tests on jenkins to merge to master.

Actions #11

Updated by Lucas Di Pentima about 7 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:65e339856daf4b5c3a4a810cd3a5f1a8e386dc8c.

Actions

Also available in: Atom PDF