Skip to content

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Jul 20, 2020

Refs #379.

Fixes the following error:

node-core-utils on git:fix-set-daily-build-data ❯ ncu-ci daily                 11:55AM✔  Done--------------------------------------------------------------------------------
[1/16] Running health
--------------------------------------------------------------------------------
| UTC Time         | RUNNING | SUCCESS | UNSTABLE | ABORTED | FAILURE | Green Rate |
| ---------------- | ------- | ------- | -------- | ------- | ------- | ---------- |
| 2020-07-20 18:55 | 0       | 6       | 5        | 1       | 34      | 13.33%     |

--------------------------------------------------------------------------------
[2/16] Running https://ci.nodejs.org/job/node-daily-master/2004/
--------------------------------------------------------------------------------
{
  link: 'https://ci.nodejs.org/job/node-daily-master/2004/',
  jobid: 2004,
  type: 'DAILY_MASTER'
}
✔  Build data downloaded
✔  Build data downloaded
TypeError: Cannot read property 'find' of undefined
    at CommitBuild.setBuildData (/Users/codebytere/Developer/node-core-utils/lib/ci/ci_result_parser.js:217:28)
    at CommitBuild.getResults (/Users/codebytere/Developer/node-core-utils/lib/ci/ci_result_parser.js:638:10)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async DailyCommand.drain (/Users/codebytere/Developer/node-core-utils/bin/ncu-ci:253:7)
    at async main (/Users/codebytere/Developer/node-core-utils/bin/ncu-ci:460:3)

Which was occurring because we have several sub-builds:

[
  {
    build: { _class: 'hudson.matrix.MatrixBuild' },
    buildNumber: 34,
    jobName: 'node-test-commit-ibmi',
    result: 'FAILURE',
    url: 'job/node-test-commit-ibmi/34/'
  },
  {
    build: {
      _class: 'com.tikal.jenkins.plugins.multijob.MultiJobBuild',
      subBuilds: [Array]
    },
    buildNumber: 39692,
    jobName: 'node-test-commit',
    result: 'FAILURE',
    url: 'job/node-test-commit/39692/'
  },
  {
    build: { _class: 'hudson.model.FreeStyleBuild' },
    buildNumber: 15437,
    jobName: 'node-test-commit-custom-suites-freestyle',
    result: 'SUCCESS',
    url: 'job/node-test-commit-custom-suites-freestyle/15437/'
  }
]

And so need to filter for the 'node-test-commit' one instead of just grabbing the one at the first index.

Also removes setDailyBuildData, as the function was unused.

cc @AshCripps @joyeecheung

@codebytere codebytere requested a review from joyeecheung July 20, 2020 19:02
@codebytere codebytere force-pushed the fix-set-daily-build-data branch from e652481 to e4b379a Compare July 20, 2020 19:06
@codebytere codebytere changed the title fix: get node-test-commit job id fix: get node-test-commit job id in daily-master Jul 20, 2020
@codebytere codebytere changed the title fix: get node-test-commit job id in daily-master fix: ensure node-test-commit job id in daily-master Jul 20, 2020
@codecov
Copy link

codecov bot commented Jul 20, 2020

Codecov Report

Merging #460 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #460   +/-   ##
=======================================
  Coverage   76.42%   76.42%           
=======================================
  Files          21       21           
  Lines        1595     1595           
=======================================
  Hits         1219     1219           
  Misses        376      376           

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 f3d23dd...5d14b02. Read the comment docs.

@codebytere codebytere merged commit de35935 into nodejs:master Jul 21, 2020
@codebytere codebytere deleted the fix-set-daily-build-data branch July 21, 2020 01:23
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.

2 participants