Skip to content

CircleCI runs colcon test directly instead of run_test_suite script #1271

Closed

Description

@ruffsl I noticed that CI is now calling colcon test directly instead of using the tools/run_test_suitescript directly. Any objections to us changing that back?

Calling colcon test hides console output so we can't tell why a test is failing in CI. It also doesn't let us run the test a few times to try to get a pass on flaky tests. Given the state of our testing right now, both those things are important.

Activity

  1. SteveMacenski commented on Oct 22, 2019

    @SteveMacenski
    Member

    Go for it

  2. ruffsl commented on Oct 23, 2019

    @ruffsl
    Member

    Is the test stdout/stderr output from the test not being saved to the colcon log directory? I really hope your not trying to use the nosie stdout of the CI step command UI to debug errors, as apposed to just clicking on the relevant atomic trace log file. That wouldn't be taking advantage of the log artifacts we take effort to save for convenience.

    Also, shouldn't the test scaffolding itself store the test printout to the junit XML files? Many of the tests are missing meta information like timing. We are invoking coloc test directly so that we can parallelize the tests using work scheduling.

    If a test is failing, then we should is the colcon filter args like --test-failed in the config to reatemp them, but only the tests that the parallel worker was tasked with.

  3. SteveMacenski commented on Oct 23, 2019

    @SteveMacenski
    Member

    @ruffsl I don't disagree with any of that, but I think more information in the terminal isn't necessarily bad. The parallelism argument is strong, so I'd want to hear about how much this slows it down, but if its not substantial, I don't have a problem with it.

    I agree the artifacts are useful for debug but sometimes just having a clear answer in the UI for small stupid errors is nice

  4. ruffsl commented on Oct 23, 2019

    @ruffsl
    Member

    Do we have any insight on why the stdout isn't being captured, I'd like to fix the root of the problem rather than a symptom.

    Also, the next Circle I web UI is receiving an update, that folds/box-windows the stdout from steps. This makes it easier to navigate steps over jobs, but will further incentivize the use of artifacts/test-results, as it can hamper reading long nosie prints.

    Quicker visibility into the failing of test should be possible via the large red fail test boxes on the top of the job UI, such that you don't even have to dig into the steps. We just have make sure the test code is reporting about itself correctly.

  5. SteveMacenski commented on Oct 23, 2019

    @SteveMacenski
    Member

    I guess what I was just saying is: I don't have a problem with it since he asked for objections. I have a workflow that uses the artifacts, but if someone likes their output another way, who am I to judge

  6. ruffsl commented on Oct 23, 2019

    @ruffsl
    Member

    It also doesn't let us run the test a few times to try to get a pass on flaky tests.

    Could we just pass the --retest-until-pass arg to colcon, so we don't break the test parallelism:

                  colcon test \
                    --packages-select ${TEST_PACKAGES} \
                    --mixin << parameters.mixins >> \
    +               --retest-until-pass 3
    $ colcon test --help
    ...
      --retest-until-pass N
                            Rerun failing tests up to N times
    

    https://github.com/ros-planning/navigation2/blob/67a92be87f8a00470313c232b1462d45379273e8/.circleci/config.yml#L142-L156

  7. ruffsl commented on Oct 23, 2019

    @ruffsl
    Member

    Do you know how the test parallelization works?

    Presently, we control test parallelization in the config by changing the parallelism key for the job. Although this is currently set to 1, I'd like to retain the ability to simply scale this up in the future as our test suite grows, thus my hestence to break the setup.

    https://github.com/ros-planning/navigation2/blob/67a92be87f8a00470313c232b1462d45379273e8/.circleci/config.yml#L375-L382

    Do the tests run concurrently in the same docker instance, or do they have separate environments? I know some our tests are sensitive to being run concurrently.

    Parallelism for a CI job is achieved by using separate containers. I also understand that some of our tests are time sensitive or subject to cross talk, thus I elected to use parallelize over containers with separate resources/loopbacks rather than simply resorting to setting --parallel-workers in colcon.

    The test split itself is done by weighting the split by historic test timing, i.e. a rolling average of time duration for each test, such that we optimize/shorten the total test time via load balancing. That's why it would be nice to fix more of the lengthier tests to correctly report their timing metadata.

    https://github.com/ros-planning/navigation2/blob/67a92be87f8a00470313c232b1462d45379273e8/.circleci/config.yml#L144-L150

  8. reopened this on Oct 23, 2019
  9. ruffsl commented on Oct 25, 2019

    @ruffsl
    Member

    With #1284 merged, is this closed?

  10. SteveMacenski commented on Oct 25, 2019

    @SteveMacenski
    Member

    I noticed travis is using the script and circleCi is not and this is the reason travis passes with the spawn robot issue, that test isn’t being run in the test suite.

    Do we want to add that, though at the moment that would make Travis fail as well.

  11. ghost closed this as completedon Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions