Page MenuHomeSoftware Heritage

test: Make the child process wait longer so it gets actually killed
ClosedPublic

Authored by ardumont on Jul 28 2021, 4:36 PM.

Details

Summary

Prior to this, depending on the load on jenkins, the test could be flaky and fail for
the wrong reason [1]

[1] https://jenkins.softwareheritage.org/job/DLDHG/job/tests-on-diff/263/console

Test Plan

tox ok

Also D6043 based on this is no longer failing for the wrong reason.

Diff Detail

Repository
rDLDHG Mercurial loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D6040 (id=21839)

Rebasing onto f3232bfd67...

Current branch diff-target is up to date.
Changes applied before test
commit 24022090b250cfa3059536af696f1a0b55cda39c
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 28 16:35:59 2021 +0200

    Debug hgutils flakiness

See https://jenkins.softwareheritage.org/job/DLDHG/job/tests-on-diff/264/ for more details.

Make it consistently fail... This diff is the same old behavior as the current master
which is somehow flaky but only in diffs (wth?!)

Build has FAILED

Patch application report for D6040 (id=21840)

Rebasing onto f3232bfd67...

Current branch diff-target is up to date.
Changes applied before test
commit 83e6d08c0ea8e07bd31f9b844cc81028771f9b5c
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 28 16:35:59 2021 +0200

    Debug hgutils flakiness

Link to build: https://jenkins.softwareheritage.org/job/DLDHG/job/tests-on-diff/265/
See console output for more information: https://jenkins.softwareheritage.org/job/DLDHG/job/tests-on-diff/265/console

ardumont retitled this revision from Debug hgutils flakiness to Debug hgutils flakiness 1/2.
swh/loader/mercurial/hgutil.py
163

prior to this, we waited 0.9 second instead of the 1 second the comment claimed.

vlorentz added inline comments.
swh/loader/mercurial/hgutil.py
163

Are you sure about this?

>>> len(range(10))
10
swh/loader/mercurial/hgutil.py
163

oh yeah, right, it starts at 0, i messed up ;)
fixing.

Still, the stuff fails nonetheless ;)
Thanks.

  • Print with utcnow() all around
  • revert range(11) to range(10) as before

Build has FAILED

Patch application report for D6040 (id=21843)

Rebasing onto f3232bfd67...

Current branch diff-target is up to date.
Changes applied before test
commit 566c65f47746abfc85e0e8a54025f97100ad7556
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 28 16:35:59 2021 +0200

    Debug hgutils flakiness

Link to build: https://jenkins.softwareheritage.org/job/DLDHG/job/tests-on-diff/267/
See console output for more information: https://jenkins.softwareheritage.org/job/DLDHG/job/tests-on-diff/267/console

Make the sleepy time longer

Build is green

Patch application report for D6040 (id=21845)

Rebasing onto f3232bfd67...

Current branch diff-target is up to date.
Changes applied before test
commit 519629942604d026cb515f7fe9f2e327af4c8e04
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 28 16:35:59 2021 +0200

    Debug hgutils flakiness

See https://jenkins.softwareheritage.org/job/DLDHG/job/tests-on-diff/269/ for more details.

ardumont retitled this revision from Debug hgutils flakiness 1/2 to test: Make the child process wait longer so it gets actually killed.Jul 28 2021, 5:29 PM
ardumont edited the summary of this revision. (Show Details)
ardumont edited the test plan for this revision. (Show Details)

Build is green

Patch application report for D6040 (id=21848)

Rebasing onto f3232bfd67...

Current branch diff-target is up to date.
Changes applied before test
commit 61ec738eacfd93de4cccb545dae5de8a65429ee2
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 28 16:35:59 2021 +0200

    test: Make the child process wait longer so it gets actually killed
    
    Prior to this, depending on the load on jenkins, the test could be flaky and fail for
    the wrong reason [1]
    
    [1] https://jenkins.softwareheritage.org/job/DLDHG/job/tests-on-diff/263/console

See https://jenkins.softwareheritage.org/job/DLDHG/job/tests-on-diff/272/ for more details.

ardumont edited the summary of this revision. (Show Details)
ardumont edited the test plan for this revision. (Show Details)

Revert some more unneeded changes

Build is green

Patch application report for D6040 (id=21850)

Rebasing onto f3232bfd67...

Current branch diff-target is up to date.
Changes applied before test
commit d93fa51dbd0cb2c7a9e57c3a98c6b96d0cac8d43
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 28 16:35:59 2021 +0200

    test: Make the child process wait longer so it gets actually killed
    
    Prior to this, depending on the load on jenkins, the test could be flaky and fail for
    the wrong reason [1]
    
    [1] https://jenkins.softwareheritage.org/job/DLDHG/job/tests-on-diff/263/console

See https://jenkins.softwareheritage.org/job/DLDHG/job/tests-on-diff/274/ for more details.

vlorentz added inline comments.
swh/loader/mercurial/tests/test_hgutil.py
22

not needed, it's in the closure

This revision is now accepted and ready to land.Jul 28 2021, 5:44 PM
swh/loader/mercurial/tests/test_hgutil.py
22

I never know when it is in the closure and when it's not.

How can i tell?

Drop unnecessary instruction according to suggestion.

Build is green

Patch application report for D6040 (id=21852)

Rebasing onto f3232bfd67...

Current branch diff-target is up to date.
Changes applied before test
commit cae036cac707c07dc083aa134c59fcd48e3b313c
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 28 16:35:59 2021 +0200

    test: Make the child process wait longer so it gets actually killed
    
    Prior to this, depending on the load on jenkins, the test could be flaky and fail for
    the wrong reason [1]
    
    [1] https://jenkins.softwareheritage.org/job/DLDHG/job/tests-on-diff/263/console

See https://jenkins.softwareheritage.org/job/DLDHG/job/tests-on-diff/276/ for more details.

swh/loader/mercurial/tests/test_hgutil.py
22

it's in the closure iff the name appears in the function body and the function never assigns it.

swh/loader/mercurial/tests/test_hgutil.py
22

never assigns it

that's determined statically btw, so if you do if False: sleepy_time = 42 anywhere in the function, it wouldn't be in the closure

swh/loader/mercurial/tests/test_hgutil.py
22

thanks!