Merge ~bryce/git-ubuntu:systemd-service into git-ubuntu:master

Proposed by Bryce Harrington
Status: Merged
Approved by: Bryce Harrington
Approved revision: fd6bd79bfd11695d3f2e5aa5ac2999c71ff98e6e
Merged at revision: 2fe7dd595dd918c0ac1ddd665f1291f83b6afd5d
Proposed branch: ~bryce/git-ubuntu:systemd-service
Merge into: git-ubuntu:master
Diff against target: 252 lines (+97/-26)
6 files modified
.gitignore (+2/-0)
dev/null (+0/-8)
doc/README.testing (+3/-0)
setup.py (+3/-3)
snap-wrappers/wrappers/git-ubuntu-self-test (+86/-13)
snap/snapcraft.yaml (+3/-2)
Reviewer Review Type Date Requested Status
Robie Basak Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+374892@code.staging.launchpad.net

This proposal supersedes a proposal from 2019-10-30.

Commit message

.

Description of the change

Fixes snap build issues from prior version.

I've verified the snap passes tests and builds, and installed it locally to verify both that the needed systemd python module code is getting installed, and that git-ubuntu.import-source-packages starts up without error.

I've updated this with additional test coverage for scripts, and various other checks that would have helped spot this and other failures during CI. It attempts to invoke each script's --help parameter to verify at least it is importing its modules.

rbasak suggested splitting the test code as it's own commit separate from the systemd fixes. I've also added some codebase cleanups discussed at this morning's meeting.

The new pip3 check test already discovered a couple discrepancies of modules with versions specified in setup.py that don't match what is actually being pulled in via pip when run under Jenkins. I've updated the two versions to now match what is in Ubuntu Bionic.

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:110b7073e541d3e2fd562cfb29874edbef078a27
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/381/
Executed test runs:
    SUCCESS: VM Setup
    SUCCESS: Build
    SUCCESS: Unit Tests
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/381//rebuild

review: Approve (continuous-integration)
Revision history for this message
Robie Basak (racb) wrote : Posted in a previous version of this proposal

This looks good, thanks.

Is it possible to add a test for the failure this fixes please? I'm open on exactly what form this takes, but what I'd like is for something that causes CI to fail on the state of affairs before this fix.

I don't know if you'd like to do this using a test that calls importlib.import_module() or similar, or just some test file that runs "import" at the top level with a comment explaining why it is there.

review: Needs Fixing
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:8a2be558d674ef918707d9a1b6ff70ea553f149b
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/384/
Executed test runs:
    SUCCESS: VM Setup
    SUCCESS: Build
    FAILED: Unit Tests

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/384//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:8a2be558d674ef918707d9a1b6ff70ea553f149b
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/385/
Executed test runs:
    SUCCESS: VM Setup
    SUCCESS: Build
    FAILED: Unit Tests

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/385//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:6b9c5c455609689f673653403f6b8af3d0e0416c
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/386/
Executed test runs:
    SUCCESS: VM Setup
    SUCCESS: Build
    FAILED: Unit Tests

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/386//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Robie Basak (racb) wrote : Posted in a previous version of this proposal

I like this approach to the test problem!

I assume that it does catch the previous failure - please check that it does if you haven't already

I think we should split the test adjustments out as its own commit from the systemd stuff though - do you have an opinion on that?

Finally, it looks like failed :-/

Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2a086735268beb98574d0c825b6515753ff0f382
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/387/
Executed test runs:
    SUCCESS: VM Setup
    SUCCESS: Build
    FAILED: Unit Tests

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/387//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2a086735268beb98574d0c825b6515753ff0f382
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/388/
Executed test runs:
    SUCCESS: VM Setup
    SUCCESS: Build
    FAILED: Unit Tests

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/388//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:208c7168a9a5aa3216fd3f4d7eb3152691e7f761
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/389/
Executed test runs:
    SUCCESS: VM Setup
    SUCCESS: Build
    FAILED: Unit Tests

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/389//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:1b2af39e451a15fa89549a758826ca65f9c3c9be
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/390/
Executed test runs:
    SUCCESS: VM Setup
    FAILED: Build

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/390//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:1b2af39e451a15fa89549a758826ca65f9c3c9be
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/391/
Executed test runs:
    SUCCESS: VM Setup
    FAILED: Build

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/391//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:fd6bd79bfd11695d3f2e5aa5ac2999c71ff98e6e
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/392/
Executed test runs:
    FAILED: VM Setup

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/392//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:fd6bd79bfd11695d3f2e5aa5ac2999c71ff98e6e
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/393/
Executed test runs:
    FAILED: VM Setup

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/393//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:fd6bd79bfd11695d3f2e5aa5ac2999c71ff98e6e
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/394/
Executed test runs:
    SUCCESS: VM Setup
    SUCCESS: Build
    SUCCESS: Unit Tests
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/394//rebuild

review: Approve (continuous-integration)
Revision history for this message
Robie Basak (racb) wrote :

This looks great now. Thanks!

review: Approve
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks! And here is a run with only the test changes, excluding fixes, to show that the test does indeed catch the failure:

https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/395/console

[Pipeline] { (Unit Tests)
[Pipeline] sh
+ uvt-kvm ssh --insecure gitubuntu-ci-395 -- bash -l -c git-ubuntu.self-test
gitubuntu 0.7.4 requires systemd, which is not installed.
gitubuntu 0.7.4 has requirement keyring<16, but you have keyring 19.2.0.
gitubuntu 0.7.4 has requirement lazr.restfulclient==0.14.0, but you have lazr.restfulclient 0.14.2.
You are using pip version 9.0.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
pylint passed!
PASS (syntax) import-source-packages.py
FAIL (compilation) import-source-packages.py
PASS (syntax) source-package-walker.py
PASS (compilation) source-package-walker.py
PASS (syntax) update-repository-alias.py
PASS (compilation) update-repository-alias.py
============================= test session starts ==============================
platform linux -- Python 3.6.3, pytest-3.1.3, py-1.8.0, pluggy-0.4.0
rootdir: /tmp/ci-20191031-7Zuo8EBAFT, inifile:
plugins: cov-2.5.1
collected 260 items
...
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches