Snapcraft travis runs with "tests triggered by OLS" are failing

Bug #1672788 reported by Daniel Manrique
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Leo Arias

Bug Description

https://travis-ci.org/snapcore/snapcraft/jobs/210968966

Reading state information... Done

2 packages can be upgraded. Run 'apt list --upgradable' to see them.

sh: 1: sudo: not found

The command "docker run -e TEST_USER_PASSWORD=$TEST_USER_PASSWORD -e TEST_STORE=$TEST_STORE -e TEST_USER_EMAIL=$TEST_USER_EMAIL -v $(pwd):$(pwd) -t ubuntu:xenial sh -c "export LC_ALL=en_US.UTF-8 && locale-gen en_US.UTF-8 && apt update && cd $(pwd) && $DEPENDENCIES && ./runtests.sh $TEST_SUITE"" exited with 127.

Further up I see DEPENDENCIES defined as such, and I think this is the offending sudo invocation:

Setting environment variables from .travis.yml

$ export TEST_USER_PASSWORD=[secure]

$ export CHECK_CLA=1

$ export DEPENDENCIES="sudo apt install -y python-launchpadlib"

This comes from .travis.yml line 21 which specifies "sudo apt install" where I think it should be sudoless.

Tags: store tests
Revision history for this message
Leo Arias (elopio) wrote :

Thanks for the report Daniel. Can you point me to your script that triggers this?
It shouldn't run the CHECK_CLA at all.

Changed in snapcraft:
status: New → Confirmed
importance: Undecided → High
tags: added: store tests
Changed in snapcraft:
assignee: nobody → Leo Arias (elopio)
Revision history for this message
Daniel Manrique (roadmr) wrote :

Here it is, I obfuscated anything looking like credentials or e-mail addresses but otherwise it's exactly what I used:

https://pastebin.canonical.com/182463/

Revision history for this message
Leo Arias (elopio) wrote :

Thanks Daniel.
I'm not sure how to remove the CLA from the matrix. I added it that way to save a few minutes by not launching the docker container, but I think it will have to get it back.

Revision history for this message
Leo Arias (elopio) wrote :
Revision history for this message
Daniel Manrique (roadmr) wrote :

Thanks!

Does my script need any changes?

Revision history for this message
Leo Arias (elopio) wrote :

I think that by pure luck, it doesn't.
Why don't you push it to our tools directory, so we can update it in sync with .travis.yml?
You'll just have to add to arguments for user and password, I think.

Changed in snapcraft:
status: Confirmed → Fix Committed
milestone: none → 2.28
Changed in snapcraft:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.