Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Handle Jenkins errors #107

Merged
merged 5 commits into from
Jul 18, 2018
Merged

Conversation

spbnick
Copy link
Contributor

@spbnick spbnick commented Jul 13, 2018

This adds detection of test errors (infrastructure failures) and makes sktm ignore Jenkins builds which have them, so that baseline is not degraded and patches are held in pendingpatches, both to be rechecked on subsequent runs.

@spbnick
Copy link
Contributor Author

spbnick commented Jul 13, 2018

This is not tested yet, WIP.

@coveralls
Copy link

coveralls commented Jul 13, 2018

Pull Request Test Coverage Report for Build 376

  • 1 of 18 (5.56%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 29.061%

Changes Missing Coverage Covered Lines Changed/Added Lines %
sktm/jenkins.py 0 8 0.0%
sktm/init.py 1 10 10.0%
Totals Coverage Status
Change from base Build 373: 0.3%
Covered Lines: 318
Relevant Lines: 922

💛 - Coveralls

Remove detecting baseline failures during testing patches, as it's
confusing and difficult to support in the Jenkins pipeline. It is also
not skt's job to be operating on baselines, as they're out of its
control or knowledge. Moreover, we have no baseline failures recorded in
our database, at all.
Remove the PUBLISH_FAILURE sktm.tresult value, since it would be just an
infrastructure failure (an error), unrelated to patches themselves, no
code actually generates it, and there are no records of it occuring in
our database.
Fetch and log the data used both by baseline and by patchwork Jenkins
build handling, beforehand, in a single place, instead of for each case
separately.
Add another sktm.tresult: ERROR. It signifies that the test encountered
an error and has no valid result. This value (sktm.tresult.ERROR) should
not be stored in the database, or posted as a "check" in patchwork,
since it's not a result, but an absence of.
Consider any result coming from Jenkins, except straight SUCCESS or
UNSTABLE (with matching skt results), an error. Ignore builds with such
results, leaving patch tests in "pendingpatches", and baseline untested,
both to be retried later.

UNSTABLE is a Jenkins build result signifying some errors, which were
not fatal for the completion of the build, while FAILURE is a fatal
build error. We can consider "build" to be our test run, and test
failures not fatal for the run. It's awkward naming, but it seems to be
the best mapping to Jenkins build results.

See also http://javadoc.jenkins-ci.org/hudson/model/Result.html
@veruu
Copy link
Contributor

veruu commented Jul 18, 2018

While I didn't test it either and just checked the code, most of this is removal of unused code and cleanups and should be good to go 👍 the Jenkins part should be properly tested though

@spbnick spbnick changed the title WIP: Handle Jenkins errors Handle Jenkins errors Jul 18, 2018
@spbnick
Copy link
Contributor Author

spbnick commented Jul 18, 2018

I tested this mostly, still waiting for one job to finish, then we can merge this, and I'll deliver this to staging, along with the required pipeline changes.

@spbnick
Copy link
Contributor Author

spbnick commented Jul 18, 2018

OK, tested with the new pipeline, success and infrastructure failure (cancelled Beaker jobs), baseline and patchwork commands worked fine. @veruu, do you think this is ready to go in?

@spbnick spbnick requested a review from veruu July 18, 2018 17:13
@veruu
Copy link
Contributor

veruu commented Jul 18, 2018

I think so. And if there is something that breaks in a way we didn't expect we can fix it afterwards.

@spbnick spbnick merged commit 2404612 into cki-project:master Jul 18, 2018
@spbnick
Copy link
Contributor Author

spbnick commented Jul 18, 2018

Thank you, Veronika :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants