Skip to content
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

fix: handle citgm failures better #497

Merged
merged 1 commit into from
Sep 8, 2020

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Sep 6, 2020

Improve handling for CITGM runs in ncu-ci.

Before:

node on git:master ❯ ncu-ci citgm 2400                                8:59PM
--------------------------------------------------------------------------------
[1/1] Running CITGM: 2400
--------------------------------------------------------------------------------
⠙ Querying API for job/citgm-smoker/2400/----------------------------------- Summary ------------------------------------
Result     PENDING
URL        https://ci.nodejs.org/job/citgm-smoker/2400/
Source     
Commit     Unknown
Date       
Author     Unknown
TypeError: Cannot read property 'statistics' of undefined
    at CITGMBuild.displayBuilds (/Users/codebytere/Developer/node-core-utils/lib/ci/build-types/citgm_build.js:115:56)
    at CITGMBuild.display (/Users/codebytere/Developer/node-core-utils/lib/ci/build-types/test_build.js:153:10)
    at JobCommand.drain (/Users/codebytere/Developer/node-core-utils/bin/ncu-ci:352:13)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async main (/Users/codebytere/Developer/node-core-utils/bin/ncu-ci:566:3)

After:

node on git:master ❯ ncu-ci citgm 2400                                9:06PM
--------------------------------------------------------------------------------
[1/1] Running CITGM: 2400
--------------------------------------------------------------------------------
✖  Failed to download Summary data
------------------------------------- 2400 -------------------------------------
URL        https://ci.nodejs.org/job/citgm-smoker/2400/api/json?tree=result%2Curl%2Cnumber%2Cactions%5Bparameters%5Bname%2Cvalue%5D%5D%2CchangeSet%5Bitems%5BcommitId%2Cauthor%5BabsoluteUrl%2CfullName%5D%2CauthorEmail%2Cmsg%2Cdate%5D%5D%2CbuiltOn
Type       NCU_FAILURE
Reason     
  invalid json response body at https://ci.nodejs.org/job/citgm-smoker/2400/api/json?tree=result%2Curl%2Cnumber%2Cactions%5Bparameters%5Bname%2Cvalue%5D%5D%2CchangeSet%5Bitems%5BcommitId%2Cauthor%5BabsoluteUrl%2CfullName%5D%2CauthorEmail%2Cmsg%2Cdate%5D%5D%2CbuiltOn reason: Unexpected token < in JSON at position 0

@codebytere codebytere requested a review from a team September 6, 2020 04:07
@codecov
Copy link

codecov bot commented Sep 6, 2020

Codecov Report

Merging #497 into master will decrease coverage by 0.84%.
The diff coverage is 16.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #497      +/-   ##
==========================================
- Coverage   83.13%   82.29%   -0.85%     
==========================================
  Files          34       34              
  Lines        1696     1717      +21     
==========================================
+ Hits         1410     1413       +3     
- Misses        286      304      +18     
Impacted Files Coverage Δ
lib/ci/build-types/test_build.js 49.52% <ø> (ø)
lib/ci/build-types/citgm_build.js 71.73% <15.38%> (-7.53%) ⬇️
lib/ci/build-types/citgm_comparison_build.js 59.09% <16.66%> (-5.85%) ⬇️

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 3c3712a...7a50163. Read the comment docs.

Comment on lines +38 to +41
this.failures.baseBuild =
this.failures.baseBuild.concat(baseBuild.failures);
this.failures.comparisonBuild =
this.failures.comparisonBuild.concat(comparisonBuild.failures);
Copy link
Member

Choose a reason for hiding this comment

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

Nit: not sure which one is better, but this one is shorter 😄

Suggested change
this.failures.baseBuild =
this.failures.baseBuild.concat(baseBuild.failures);
this.failures.comparisonBuild =
this.failures.comparisonBuild.concat(comparisonBuild.failures);
this.failures.baseBuild.push(...baseBuild.failures);
this.failures.comparisonBuild.push(...comparisonBuild.failures);

@codebytere codebytere merged commit a429893 into nodejs:master Sep 8, 2020
@codebytere codebytere deleted the safer-citgm-failure-handing branch September 8, 2020 15: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.

None yet

3 participants