Skip to content

ncu-ci: command that shows results of jenkins - #161

Merged
joyeecheung merged 5 commits into
nodejs:masterfrom
joyeecheung:show-ci
Jun 1, 2018
Merged

ncu-ci: command that shows results of jenkins#161
joyeecheung merged 5 commits into
nodejs:masterfrom
joyeecheung:show-ci

Conversation

@joyeecheung

Copy link
Copy Markdown
Member

Example:

▶ show-ci pr 12798
{ result: 'FAILURE',
failures:
[ { url: 'https://ci.nodejs.org/job/node-test-commit-aix/nodes=aix61-ppc64/12151/',
reason: 'ERROR: Error cloning remote repo \'origin\'' },
{ url: 'https://ci.nodejs.org/job/node-test-commit-linux-containered/nodes=ubuntu1604_sharedlibs_fips20_x64/1774/',
reason: 'not ok 462 parallel/test-fs-error-messages' } ] }

@joyeecheung

joyeecheung commented Jan 30, 2018

Copy link
Copy Markdown
MemberAuthor

Refs: #158

Some other commands to implement

@joyeecheungjoyeecheung changed the title WIP: command that shows results of node-test-pull-requestWIP: command that shows results of jenkinsJan 30, 2018
@codecov

codecovBot commented Feb 1, 2018

Copy link
Copy Markdown

Codecov Report

Merging #161 into master will decrease coverage by 8.74%.
The diff coverage is 61.28%.

Impacted file tree graph

@@ Coverage Diff @@## master #161 +/- ##
==========================================
- Coverage 88.52% 79.77% -8.75% 
==========================================
Files 19 20 +1 Lines 723 1078 +355 ==========================================
+ Hits 640 860 +220 - Misses 83 218 +135
Impacted FilesCoverage Δ
lib/cli.js52.11% <ø> (ø)⬆️
lib/cache.js100% <100%> (ø)
lib/pr_data.js96.15% <100%> (+0.32%)⬆️
lib/pr_checker.js98.39% <100%> (-0.01%)⬇️
lib/file.js70.83% <20%> (+7.67%)⬆️
lib/ci.js59.29% <54.54%> (-33.74%)⬇️

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 3dafebf...766fc91. Read the comment docs.

@joyeecheung

Copy link
Copy Markdown
MemberAuthor

screen shot 2018-02-02 at 6 58 23 pm

A bit more progress...

@joyeecheung
joyeecheungforce-pushed the show-ci branch 2 times, most recently from 1d14de5 to 18fcbe7CompareFebruary 28, 2018 00:13
@joyeecheung

joyeecheung commented Mar 3, 2018

Copy link
Copy Markdown
MemberAuthor

On Windows ERROR: coming from the preparation tasks can be ignored. Should not hide the real errors appeared later on.
https://gist.github.com/joyeecheung/5a1a92cc7d8dc65502bb564ad5cc9e7e

Refs: nodejs/node#19041

@joyeecheung

Copy link
Copy Markdown
MemberAuthor

Added tests to cache and the jenkins utilities...should be able to land after documentations are added

@joyeecheung
joyeecheungforce-pushed the show-ci branch 2 times, most recently from 7996277 to 4451d21CompareApril 22, 2018 10:35
joyeecheung added a commit that referenced this pull request Apr 22, 2018
- Put the PR URL parsing logic in links.js and reuse it
- Differentiate PR and commit jobs in preparation for #161
- Updates a few CI link patterns

@mmarchinimmarchini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Awesome work!

@mmarchini

Copy link
Copy Markdown
Contributor

@joyeecheung I can help with documentation if you want.

@joyeecheung
joyeecheungforce-pushed the show-ci branch 6 times, most recently from bfc7e0f to 72782ddCompareMay 31, 2018 14:06
@joyeecheungjoyeecheung changed the title WIP: command that shows results of jenkinsncu-ci: command that shows results of jenkinsMay 31, 2018
@joyeecheung

Copy link
Copy Markdown
MemberAuthor

Docs added, new demo: https://asciinema.org/a/184727

This should be ready to land cc @nodejs/automation

@joyeecheung

Copy link
Copy Markdown
MemberAuthor

This has been approved by @mmarchini but I still prefer to have some reviews @nodejs/automation before merging. It would be nice to be able to land this before tomorrow's collaboration summit so I can make a release and people can start trying this out - currently I believe the pattern matching of the CI results are not smart enough and we will bump into edge cases from time to time. The more people trying this the better coverage we can have.

@priyank-ppriyank-p left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I left couple of comments, overall LGTM, Nice work!

I still quite did not get what the purpose of the cache module, just by reading trough it?

Comment threadlib/cache.js
class Cache {
constructor(dir) {
this.dir = dir || path.join(__dirname, '..', '.ncu', 'cache');
this.originals = {};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd would have prefer this to be a Map instead of plain object, for readability.

Comment threadtest/unit/cache.test.js Outdated
}
});

it('should cache sync restuls', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Typo, results.

Comment threadtest/unit/cache.test.js Outdated
assert.strictEqual(cached, expected);
});

it('should cache async restuls', async() => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto.

Comment threadtest/unit/ci.test.js Outdated
});
});

describe('Jeknins', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

typo Jenkins.

Comment threadbin/ncu-ci
PRBuild, BenchmarkRun, CommitBuild, jobCache, parseJobFromURL, constants
PRBuild, BenchmarkRun, CommitBuild, parseJobFromURL,
constants, JobParser
// , jobCache

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this was left by mistake.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oops, i was looking trough each commit.

Comment threadbin/ncu-ci
// This is used for testing
// Default cache dir is ${ncu-source-dir}/.ncu/cache
jobCache.enable();
// jobCache.enable();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need get rid this block now that this is not required for tests?

@joyeecheung

Copy link
Copy Markdown
MemberAuthor

@priyankp10 Thanks for the review! The cache is there for development: e.g. when you are working on the pattern-matching rules you would not want to wait for the tool to grab all the data from Jenkins each time you run it.

@joyeecheung
joyeecheung merged commit bb0d70f into nodejs:masterJun 1, 2018
johnfrench3 pushed a commit to johnfrench3/core-utils-node that referenced this pull request Nov 2, 2022
- Put the PR URL parsing logic in links.js and reuse it
- Differentiate PR and commit jobs in preparation for nodejs/node-core-utils#161
- Updates a few CI link patterns
renawolford6 added a commit to renawolford6/node-dev-build-core-utils that referenced this pull request Nov 10, 2022
- Put the PR URL parsing logic in links.js and reuse it
- Differentiate PR and commit jobs in preparation for nodejs/node-core-utils#161
- Updates a few CI link patterns
Developerarif2 pushed a commit to Developerarif2/node-core-utils that referenced this pull request Jan 27, 2023
- Put the PR URL parsing logic in links.js and reuse it
- Differentiate PR and commit jobs in preparation for nodejs/node-core-utils#161
- Updates a few CI link patterns
gerkai added a commit to gerkai/node-core-utils-project-build that referenced this pull request Jan 27, 2023
- Put the PR URL parsing logic in links.js and reuse it
- Differentiate PR and commit jobs in preparation for nodejs/node-core-utils#161
- Updates a few CI link patterns
patrickm68 added a commit to patrickm68/NodeJS-core-utils that referenced this pull request Sep 14, 2023
- Put the PR URL parsing logic in links.js and reuse it
- Differentiate PR and commit jobs in preparation for nodejs/node-core-utils#161
- Updates a few CI link patterns
Sign up for freeto 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.

4 participants

@joyeecheung@mmarchini@riyadhalnur@priyank-p