Page MenuHomePhabricator

phabricator-jessie-diffs fails with "echo : No such file or directory"
Closed, ResolvedPublic

Description

Something's still wrong with integration-slave-jessie-1001:

08:59:42 + echo 'Got exit code 1 from PY_COLORS=1 tox -v'
08:59:42 + tox --version
08:59:42 ++ ' >> log/phab_comment.log
08:59:42         tail -10 log/stdout.log >> log/phab_comment.log
08:59:42         echo '
08:59:42 /tmp/jenkins8105632489456413334.sh: line 28:  >> log/phab_comment.log
08:59:42         tail -10 log/stdout.log >> log/phab_comment.log
08:59:42         echo : No such file or directory
08:59:42 + echo ''
08:59:42 + exit 1
08:59:42 Build step 'Execute shell' marked build as failure

https://integration.wikimedia.org/ci/job/phabricator-jessie-diffs/1026/console

Event Timeline

Gilles created this task.Mar 14 2018, 10:21 AM

From the Jenkins job:

set +e
if [ -f 'tox.ini' ]; then
    echo 'Found tox.ini, running tox -v:'
    set -o pipefail
    # run pretest command, if any:
    tox -l | tee "log/stdout.log"
    TEST_EXIT_CODE=$?
    WHAT_FAILED="tox -l"
    # if pretest succeeded, run test command:
    if [ $TEST_EXIT_CODE -eq 0 ]; then
        PY_COLORS=1 tox -v | tee "log/stdout.log"
        TEST_EXIT_CODE=$?
        WHAT_FAILED="PY_COLORS=1 tox -v"
    fi
    # if either command failed, log the details
    if [ $TEST_EXIT_CODE -gt 0 ]; then
        # log the error and exit cleanly to continue other build steps
        COMMENT="|{icon times-circle color=red}|tox -v|[[$BUILD_URL | Build Details]]|"
        echo "$COMMENT" >> log/.phabricator_comment
        echo "== tox -v log ==" >> log/phab_comment.log
        echo "Got exit code $TEST_EXIT_CODE from $WHAT_FAILED" >> log/phab_comment.log
        tox --version >> log/phab_comment.log
        echo "```" >> log/phab_comment.log
        tail -10 log/stdout.log >> log/phab_comment.log
        echo "```" >> log/phab_comment.log
        exit $TEST_EXIT_CODE
    fi
fi

Looks like the issue is:

echo "```"

It should use single quotes.

I fixed the quotes and a couple of other issues with the job so that jenkins bot will actually comment with something useful in phabricator now ( D1008#20191, for example )

It looks like flake8 is failing:

flake8 runtests: commands[0] | flake8
  /srv/jenkins-workspace/workspace/phabricator-jessie-diffs$ /srv/jenkins-workspace/workspace/phabricator-jessie-diffs/.tox/flake8/bin/flake8 
./wikimedia_thumbor/loader/video/__init__.py:86:17: E201 whitespace after '['
./wikimedia_thumbor/loader/video/__init__.py:86:39: E202 whitespace before ']'
ERROR: InvocationError: '/srv/jenkins-workspace/workspace/phabricator-jessie-diffs/.tox/flake8/bin/flake8'
py27 create: /srv/jenkins-workspace/workspace/phabricator-jessie-diffs/.tox/py27

I'm not sure what InvocationError is all about but the two lint errors in __init__.py look legit?

mmodell triaged this task as Medium priority.Mar 21 2018, 11:25 PM
Gilles closed this task as Resolved.Mar 22 2018, 8:29 AM