Skip to content

feat: add ncu-ci cigtm <jobid> #454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 9, 2020
Merged

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Jul 4, 2020

Refs #352.

Adds ncu-ci cigtm <jobid>.

Ideally i'll end up adding functionality to compare two CITGM runs, e.g. ncu-ci cigtm <job1id> <job2id> but i think it'll be easier to get this reviewed and merged if it's less massive.

Todo:

  • Tests
  • Formatting
  • Documentation
Example Markdown Output
# CITGM Data for [2400](https://ci.nodejs.org/job/citgm-smoker/2400/)

## Statistics for job [2400](https://ci.nodejs.org/job/citgm-smoker/2400/)

|  FAILED  |  SKIPPED  |  PASSED  |  TOTAL  |
| -------- | --------- | -------- | ------- |
| 21       | 233       | 594      | 848     |

## Failures in job [2400](https://ci.nodejs.org/job/citgm-smoker/2400/)

### [debian9-64](https://ci.nodejs.org/job/citgm-smoker/nodes=debian9-64/2400/)

* coffeescript-v2.5.1
* through2-v4.0.2

### [rhel7-s390x](https://ci.nodejs.org/job/citgm-smoker/nodes=rhel7-s390x/2400/)

* through2-v4.0.2

### [fedora-latest-x64](https://ci.nodejs.org/job/citgm-smoker/nodes=fedora-latest-x64/2400/)

* coffeescript-v2.5.1
* through2-v4.0.2

### [ubuntu1604-64](https://ci.nodejs.org/job/citgm-smoker/nodes=ubuntu1604-64/2400/)

* coffeescript-v2.5.1
* through2-v4.0.2

### [osx1014](https://ci.nodejs.org/job/citgm-smoker/nodes=osx1014/2400/)

* acorn-v7.3.1
* coffeescript-v2.5.1
* clinic-v6.0.2
* ember-cli-v3.19.0
* semver-v7.3.2
* watchify-v3.11.1

### [ubuntu1804-64](https://ci.nodejs.org/job/citgm-smoker/nodes=ubuntu1804-64/2400/)

* coffeescript-v2.5.1
* through2-v4.0.2

### [fedora-last-latest-x64](https://ci.nodejs.org/job/citgm-smoker/nodes=fedora-last-latest-x64/2400/)

* coffeescript-v2.5.1
* through2-v4.0.2

### [centos7-ppcle](https://ci.nodejs.org/job/citgm-smoker/nodes=centos7-ppcle/2400/)

* coffeescript-v2.5.1
* clinic-v6.0.2
* torrent-stream-v1.2.0
* through2-v4.0.2
Example JSON Output
{
  "source": "https://github.com/nodejs/node/pull/34093/",
  "upstream": "https://ci.nodejs.org/job/citgm-smoker/2400/",
  "passed": 594,
  "total": 848,
  "skipped": 233,
  "failed": 21,
  "debian9-64": {
    "url": "https://ci.nodejs.org/job/citgm-smoker/nodes=debian9-64/2400/",
    "modules": [
      {
        "name": "coffeescript-v2.5.1",
        "status": "FAILED"
      },
      {
        "name": "through2-v4.0.2",
        "status": "FAILED"
      }
    ]
  },
  "rhel7-s390x": {
    "url": "https://ci.nodejs.org/job/citgm-smoker/nodes=rhel7-s390x/2400/",
    "modules": [
      {
        "name": "through2-v4.0.2",
        "status": "FAILED"
      }
    ]
  },
  "fedora-latest-x64": {
    "url": "https://ci.nodejs.org/job/citgm-smoker/nodes=fedora-latest-x64/2400/",
    "modules": [
      {
        "name": "coffeescript-v2.5.1",
        "status": "FAILED"
      },
      {
        "name": "through2-v4.0.2",
        "status": "FAILED"
      }
    ]
  },
  "ubuntu1604-64": {
    "url": "https://ci.nodejs.org/job/citgm-smoker/nodes=ubuntu1604-64/2400/",
    "modules": [
      {
        "name": "coffeescript-v2.5.1",
        "status": "FAILED"
      },
      {
        "name": "through2-v4.0.2",
        "status": "FAILED"
      }
    ]
  },
  "osx1014": {
    "url": "https://ci.nodejs.org/job/citgm-smoker/nodes=osx1014/2400/",
    "modules": [
      {
        "name": "acorn-v7.3.1",
        "status": "FAILED"
      },
      {
        "name": "coffeescript-v2.5.1",
        "status": "FAILED"
      },
      {
        "name": "clinic-v6.0.2",
        "status": "FAILED"
      },
      {
        "name": "ember-cli-v3.19.0",
        "status": "FAILED"
      },
      {
        "name": "semver-v7.3.2",
        "status": "FAILED"
      },
      {
        "name": "watchify-v3.11.1",
        "status": "FAILED"
      }
    ]
  },
  "ubuntu1804-64": {
    "url": "https://ci.nodejs.org/job/citgm-smoker/nodes=ubuntu1804-64/2400/",
    "modules": [
      {
        "name": "coffeescript-v2.5.1",
        "status": "FAILED"
      },
      {
        "name": "through2-v4.0.2",
        "status": "FAILED"
      }
    ]
  },
  "fedora-last-latest-x64": {
    "url": "https://ci.nodejs.org/job/citgm-smoker/nodes=fedora-last-latest-x64/2400/",
    "modules": [
      {
        "name": "coffeescript-v2.5.1",
        "status": "FAILED"
      },
      {
        "name": "through2-v4.0.2",
        "status": "FAILED"
      }
    ]
  },
  "centos7-ppcle": {
    "url": "https://ci.nodejs.org/job/citgm-smoker/nodes=centos7-ppcle/2400/",
    "modules": [
      {
        "name": "coffeescript-v2.5.1",
        "status": "FAILED"
      },
      {
        "name": "clinic-v6.0.2",
        "status": "FAILED"
      },
      {
        "name": "torrent-stream-v1.2.0",
        "status": "FAILED"
      },
      {
        "name": "through2-v4.0.2",
        "status": "FAILED"
      }
    ]
  }
}

Current output format:

node on git:master ❯ ncu-ci citgm 2400                                         10:58AM
--------------------------------------------------------------------------------
[1/1] Running CITGM: 2400
--------------------------------------------------------------------------------
✔  Summary data downloaded
✔  Results data downloaded
----------------------------------- Summary ------------------------------------
Result     FAILURE
URL        https://ci.nodejs.org/job/citgm-smoker/2400/
Source     https://github.com/nodejs/node/pull/34093/
Commit     [9ec07f42864c] 2020-06-30, Version 14.5.0 (Current)
Date       2020-06-29 21:17:56 -0700
Author     Shelley Vohr <[email protected]>
---------------------------------- Statistics ----------------------------------
┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│ Failed  │   21   │
│ Skipped │  233   │
│ Passed  │  594   │
│  Total  │  848   │
└─────────┴────────┘
----------------------------------- Failures -----------------------------------
┌────────────────────────┬───────────────────────┬───────────────────────┬─────────────────────────┬─────────────────────┬─────────────────┬────────────────────┐
│        (index)         │           0           │           1           │            2            │          3          │        4        │         5          │
├────────────────────────┼───────────────────────┼───────────────────────┼─────────────────────────┼─────────────────────┼─────────────────┼────────────────────┤
│       debian9-64       │ 'coffeescript-v2.5.1''through2-v4.0.2'   │                         │                     │                 │                    │
│      rhel7-s390x       │   'through2-v4.0.2'   │                       │                         │                     │                 │                    │
│   fedora-latest-x64    │ 'coffeescript-v2.5.1''through2-v4.0.2'   │                         │                     │                 │                    │
│     ubuntu1604-64      │ 'coffeescript-v2.5.1''through2-v4.0.2'   │                         │                     │                 │                    │
│        osx1014         │    'acorn-v7.3.1''coffeescript-v2.5.1''clinic-v6.0.2''ember-cli-v3.19.0''semver-v7.3.2''watchify-v3.11.1' │
│     ubuntu1804-64      │ 'coffeescript-v2.5.1''through2-v4.0.2'   │                         │                     │                 │                    │
│ fedora-last-latest-x64 │ 'coffeescript-v2.5.1''through2-v4.0.2'   │                         │                     │                 │                    │
│     centos7-ppcle      │ 'coffeescript-v2.5.1''clinic-v6.0.2''torrent-stream-v1.2.0''through2-v4.0.2'  │                 │                    │
└────────────────────────┴───────────────────────┴───────────────────────┴─────────────────────────┴─────────────────────┴─────────────────┴────────────────────┘

@codecov
Copy link

codecov bot commented Jul 4, 2020

Codecov Report

Merging #454 into master will increase coverage by 0.40%.
The diff coverage is 76.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #454      +/-   ##
==========================================
+ Coverage   76.94%   77.35%   +0.40%     
==========================================
  Files          21       21              
  Lines        1501     1572      +71     
==========================================
+ Hits         1155     1216      +61     
- Misses        346      356      +10     
Impacted Files Coverage Δ
lib/ci/ci_result_parser.js 52.45% <76.00%> (+4.76%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 158efdf...17e93b3. Read the comment docs.

@richardlau
Copy link
Member

Liking the current output ❤️ .

These could be future/follow up enhancements to make comparisons easier:

  • sort the failures by platform
  • be able to do an equivalent with the citgm-smoker-nobuild job

@codebytere codebytere marked this pull request as ready for review July 4, 2020 18:03
@codebytere codebytere requested review from targos and mmarchini July 4, 2020 18:04
@codebytere
Copy link
Member Author

codebytere commented Jul 4, 2020

@richardlau i updated it a bit to use a bespoke table, and also made json output a bit nicer! It's in the PR body in the details fold. I think (?) this is ready for review now 🚀

@richardlau
Copy link
Member

@codebytere It looks like --markdown doesn't output results?

-bash-4.2$npx -p codebytere/node-core-utils#ncu-ci-citgm ncu-ci citgm 2408 --markdown citgm.txt
--------------------------------------------------------------------------------
[1/1] Running CITGM: 2408
--------------------------------------------------------------------------------
✔  Summary data downloaded
✔  Results data downloaded
----------------------------------- Summary ------------------------------------
Result     FAILURE
URL        https://ci.nodejs.org/job/citgm-smoker/2408/
Source     https://api.github.com/repos/nodejs/node/git/refs/heads/v10.22.0-proposal
Commit     [5cf3b31b8e5c] 2020-07-21, Version 10.22.0 'Dubnium' (LTS)
Date       2020-07-02 11:35:45 -0400
Author     Richard Lau <[email protected]>
----------------------------------- Failures -----------------------------------
┌────────────────────────┬───────────────────┬─────────────────────────┬─────────────────┬─────────────────────┬─────────────────────┬──────────────────┬──────────────────┬──────────────────────┬─────────────────┐
│        (index)         │         0         │            1            │        2        │          3          │          4          │        5         │        6         │          7           │        8        │
├────────────────────────┼───────────────────┼─────────────────────────┼─────────────────┼─────────────────────┼─────────────────────┼──────────────────┼──────────────────┼──────────────────────┼─────────────────┤
│     ubuntu1604-64      │ 'fastify-v2.15.1' │                         │                 │                     │                     │                  │                  │                      │                 │
│ fedora-last-latest-x64 │ 'fastify-v2.15.1' │    'react-v16.13.1'     │                 │                     │                     │                  │                  │                      │                 │
│     ubuntu1404-64      │  'acorn-v7.3.1'   │      'ava-v3.9.0'       │ 'clinic-v6.0.2' │ 'ember-cli-v3.19.0' │  'fastify-v2.15.1'  │ 'radium-v0.26.0' │ 'react-v16.13.1' │   'winston-v3.3.3'   │ 'yargs-v15.4.0' │
│      rhel7-s390x       │ 'fastify-v2.15.1' │ 'torrent-stream-v1.2.0' │                 │                     │                     │                  │                  │                      │                 │
│     centos7-ppcle      │ 'fastify-v2.15.1' │     'clinic-v6.0.2'     │                 │                     │                     │                  │                  │                      │                 │
│      aix71-ppc64       │ 'fastify-v2.15.1' │ 'path-to-regexp-v6.1.0' │  'pug-v3.0.0'   │    'uuid-v8.2.0'    │                     │                  │                  │                      │                 │
│        osx1014         │  'acorn-v7.3.1'   │      'ava-v3.9.0'       │ 'clinic-v6.0.2' │  'fastify-v2.15.1'  │ 'ember-cli-v3.19.0' │ 'react-v16.13.1' │ 'semver-v7.3.2'  │ 'underscore-v1.10.2' │ 'yargs-v15.4.0' │
│     ubuntu1804-64      │ 'fastify-v2.15.1' │                         │                 │                     │                     │                  │                  │                      │                 │
│   fedora-latest-x64    │ 'fastify-v2.15.1' │    'react-v16.13.1'     │ 'yargs-v15.4.0' │                     │                     │                  │                  │                      │                 │
└────────────────────────┴───────────────────┴─────────────────────────┴─────────────────┴─────────────────────┴─────────────────────┴──────────────────┴──────────────────┴──────────────────────┴─────────────────┘
--------------------------------------------------------------------------------
Written markdown to citgm.txt
-bash-4.2$ cat citgm.txt
Failures in job https://ci.nodejs.org/job/citgm-smoker/2408/

-bash-4.2$

@codebytere
Copy link
Member Author

@richardlau fixed up and example output for json and markdown added to body!

Copy link
Member

@richardlau richardlau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks.

FYI GitHub checks are complaining about test coverage.

@codebytere codebytere requested a review from BridgeAR July 7, 2020 17:06
@codebytere
Copy link
Member Author

I'm planning on trying to cut a new release of ncu sometime soon and would love for this to make it in if one of y'all has time to PTAL :)

@codebytere codebytere merged commit c1dfbd0 into nodejs:master Jul 9, 2020
@codebytere codebytere deleted the ncu-ci-citgm branch July 9, 2020 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants