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

Turn on more CWL tests #3628

Closed
wants to merge 86 commits into from
Closed

Turn on more CWL tests #3628

wants to merge 86 commits into from

Conversation

adamnovak
Copy link
Member

@adamnovak adamnovak commented May 20, 2021

Changelog Entry

To be copied to the draft changelog by merger:

Closes #3538
Closes #3539
Closes #3540
Closes #3541

Reviewer Checklist

  • Make sure it is coming from issues/XXXX-fix-the-thing in the Toil repo, or from an external repo.
    • If it is coming from an external repo, make sure to pull it in for CI with:
      contrib/admin/test-pr otheruser theirbranchname issues/XXXX-fix-the-thing
      
    • If there is no associated issue, create one.
  • Read through the code changes. Make sure that it doesn't have:
    • Addition of trailing whitespace.
    • New variable or member names in camelCase that want to be in snake_case.
    • New functions without type hints.
    • New functions or classes without informative docstrings.
    • Changes to semantics not reflected in the relevant docstrings.
    • New or changed command line options for Toil workflows that are not reflected in docs/running/cliOptions.rst
    • New features without tests.
  • Comment on the lines of code where problems exist with a review comment. You can shift-click the line numbers in the diff to select multiple lines.
  • Finish the review with an overall description of your opinion.

Merger Checklist

  • Make sure the PR passes tests.
  • Make sure the PR has been reviewed since its last modification. If not, review it.
  • Merge with the Github "Squash and merge" feature.
    • If there are multiple authors' commits, add Co-authored-by to give credit to all contributing authors.
  • Copy its recommended changelog entry to the Draft Changelog.
  • Append the issue number in parentheses to the changelog entry.

@adamnovak
Copy link
Member Author

This is a lie; I've reproduced some of these failing with complaints about the promise-fiddling job at the end of the workflow running too soon.

@adamnovak
Copy link
Member Author

This can reproduce the issue with test 39:

FAILED=0
for TRY_NUM in {1..5} ; do
    for ITER in {1..32} ; do
        OMP_NUM_THREADS=1 TOIL_AWS_ZONE=us-west-2a TOIL_AWS_SECRET_NAME=shared-s3-credentials TOIL_APPLIANCE_SELF=quay.io/ucsc_cgl/toil:5.4.0a1-1a69dc2607c73f3b1eb707a1bab22693071c07ad-py3.6 'cwltest' '--verbose' '--tool=toil-cwl-runner' '--test=/public/home/anovak/build/toil/src/toil/test/cwl/spec_v12/conformance_tests.yaml' '--timeout=2400' '--basedir=/public/home/anovak/build/toil/src/toil/test/cwl/spec_v12' '-n=39' '-j8' '--' '--disableCaching=False' '--clean=always' '--logDebug' --setEnv OMP_NUM_THREADS '--batchSystem=kubernetes' >iter${ITER}.log 2>&1 &
    done
    
    for ITER in {1..32} ; do
        wait
        echo "Status: $?"
    done
    
    for ITER in {1..32} ; do
        grep "All tests passed" "iter${ITER}.log"
        if [[ "${?}" == "1" ]] ; then
            echo "Failure observed in iter${ITER}.log!"
            FAILED=1
            break
        fi
    done
    
    if [[ "${FAILED}" == "1" ]] ; then
        break
    fi
    echo "No failures observed in try ${TRY_NUM}"
done

You may want to hack the --quiet option in cwltoil so it actually logs at debug level.

@adamnovak
Copy link
Member Author

The failures are happening because the root CWLWorkflow job is managing to get its body run twice, which messes up all the cross-references to what promises ought to be filled in when, I think.

@adamnovak
Copy link
Member Author

I think the problem is that we have the same job (CWLWorkflow) running at the same time on Kubernetes and locally, and they are racing and generally causing trouble.

@adamnovak
Copy link
Member Author

OK, the real problem was that the Kubernetes batch system was mistaking local job 0 for a non-local job and also running it on Kubernetes, leading to races and maybe the whole-workflow-runs-twice issue?

@adamnovak adamnovak changed the title Issues/3538 turn on tests Turn on more CWL tests May 21, 2021
@adamnovak adamnovak requested review from w-gao and jonathanxu18 May 21, 2021 21:21
@adamnovak
Copy link
Member Author

adamnovak commented May 26, 2021

I've added a fix for test 56 to this; we weren't quite recursing right when exploring the CWL workflow looking for tool definitions and File objects, so we were forgetting to import files that came along as part of tool definitions instead of workflow inputs. We also seemed to be laboring under the misapprehension that we could go get them when the tool ran, which is why things worked at all for single machine.

@adamnovak
Copy link
Member Author

OK @DailyDreaming, I've addressed most of your comments and synced this up so it's the same commit as #3652.

I split out a couple of the utility functions, but I don't think it made much of a dent in the bigness of the file. We might want to pull out ToilPathMapper, ToilFsAccess, etc. into their own files.

I also still don't have unit tests for download_structure, and probably won't for the next 2 weeks. If we want to ship this sooner and we need them, someone else might need to write them. Otherwise I can write them when I get back.

@adamnovak
Copy link
Member Author

OK, I've fixed the problem that failed the tests on the last merge with the main development line, and added a test for download_structure. This should pass and is ready for re-review.

@adamnovak
Copy link
Member Author

Actually since Lon is out, I think I might just merge this when it passes, since I have addressed the comments.

@adamnovak adamnovak dismissed mr-c’s stale review July 16, 2021 01:35

This has been done.

@mr-c
Copy link
Contributor

mr-c commented Jul 17, 2021

Can this be closed now that #3652 is merged?

@mr-c mr-c closed this Jul 17, 2021
@mr-c mr-c deleted the issues/3538-turn-on-tests branch July 17, 2021 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants