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

[WIP] fix #6999 (allow [nimDocOnly] in commit msg); fix #13477 (flaky nodejs install); log PR url (+other info) in runCI logs #13556

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented Mar 2, 2020

EDIT 2020-05-13: this PR is useful but needs to be updated to reflect recent changes in how CI works; in particular can be modified to handle [ci skip] which isn't working in azure pipelines)

  • fix CI: Don't to run the tests if only the docs were updated (WIP) #6999 as follows: if the last commit msg containing [nimDocOnly] will only build nim and run nim doc-related stuff
  • this results in 7.5X speedups for [nimDocOnly]commits: ~ 4mn per machine instead of ~30mn
  • fix [CI] Install node.js 8.x flaky step #13477 Install node.js 8.x flaky step
    [CI] Install node.js 8.x flaky step #13477 keeps happening regularly (and even breaks with different error messages depending on the time) ; and it's simpler anyway to install directly from system package installers, eg brew on OSX ; furthermore, moving more logic into Nim code (installNode ) is better (less dependency on CI specific logic, which makes it easier to switch as needed or work with multiple CI's)
  • log a few other relevant variables that help when looking at runCI logs (the main log that contains almost all of nim CI), so they're self contained when shared
    • the PR url so it's easy to find originating PR when looking at those
    • the number of CPU's (helps when interpreting differences in timing results; some have 2, some have 4 in azure IIRC)
    • build ID + 1 or 2 more relevant info

eg for this PR, CI logs for the runCI step (eg like https://dev.azure.com/nim-lang/Nim/_build/results?buildId=2984&view=logs&j=a0440cd6-2060-5545-8b53-639e777de0c6)
will show this (and urls' are clickable):

...
hostOS: linux, hostCPU: amd64, nproc: 2, int: 8, float: 8, cpuEndian: littleEndian, cwd: /home/vsts/work/1/s
urlPR: https://github.com/nim-lang/Nim/pull/13556
urlCommit: https://github.com/nim-lang/Nim/commit/196c5b57f8e647a4219ba8f548fe8d4c43aaa608
branch: merge, mode: c, buildNum: 20200304.22
msg: 16c26ae4cb8f95d5694ccb57d6f3e407307e2f3d rerun without skipping tests
...
  • note this also works for CI logs triggered by a direct push to a branch as opposed to a PR (in which case the commit msg + url will be reflected as well, and isPR:false)

[EDIT]: that issue just happened again in https://dev.azure.com/nim-lang/Nim/_build/results?buildId=3007&view=logs&jobId=30931762-47c4-53b3-6a83-316eb5a6b9d7&j=30931762-47c4-53b3-6a83-316eb5a6b9d7&t=a385ca32-7847-5843-f526-f36e9a71a329

https://dev.azure.com/nim-lang/Nim/_build/results?buildId=3523&view=logs&jobId=1effb61f-3820-5ca5-606b-caa183b197b5&j=1effb61f-3820-5ca5-606b-caa183b197b5&t=17e5f679-7cb9-5688-0d47-09c257156869

@timotheecour timotheecour force-pushed the pr_fix_13477_nodejs_install_flaky_more_logging branch from 4ab4833 to da8bd3a Compare March 2, 2020 10:06
@timotheecour timotheecour marked this pull request as ready for review March 2, 2020 10:06
@timotheecour timotheecour force-pushed the pr_fix_13477_nodejs_install_flaky_more_logging branch from da8bd3a to 6b8b284 Compare March 3, 2020 07:02
Copy link
Collaborator

@alaviss alaviss left a comment

Choose a reason for hiding this comment

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

  • log a few other relevant variables that help when looking at runCI logs (the main log that contains almost all of nim CI), so they're self contained when shared

    • the PR url so it's easy to find originating PR when looking at those
    • the number of CPU's (helps when interpreting differences in timing results; some have 2, some have 4 in azure IIRC)
    • build ID + 1 or 2 more relevant info

The idea isn't bad, but please actually format the data so that human can parse it rather than dump it all out.

azure-pipelines.yml Outdated Show resolved Hide resolved
tools/continuous_integration.nim Outdated Show resolved Hide resolved
@timotheecour timotheecour force-pushed the pr_fix_13477_nodejs_install_flaky_more_logging branch from 7c45c16 to 50d8221 Compare March 4, 2020 13:17
@timotheecour
Copy link
Member Author

The idea isn't bad, but please actually format the data so that human can parse it rather than dump it all out.

done, shows:

hostOS: linux, hostCPU: amd64, nproc: 2, int: 8, float: 8, cpuEndian: littleEndian, cwd: /home/vsts/work/1/s
urlPR: https://github.com/nim-lang/Nim/pull/13556
urlCommit: https://github.com/nim-lang/Nim/commit/6124963f0e51edcb86b6f03fcfd250c08ede5ab6
branch: merge, mode: c, buildNum: 20200304.17
msg: 'Merge dc2d87b12dc96dd81bb4d79c6f66c16979b76f4f into a0eca7518223a18f3633150de2c8d3c1c9e71560'

@timotheecour timotheecour force-pushed the pr_fix_13477_nodejs_install_flaky_more_logging branch 2 times, most recently from 6813cc7 to 16c26ae Compare March 4, 2020 14:44
@timotheecour timotheecour changed the title fix #13477 (flaky nodejs install); log PR url (+other info) in runCI logs fix #6999 (allow [nimDocOnly] in cmd msg); fix #13477 (flaky nodejs install); log PR url (+other info) in runCI logs Mar 4, 2020
@timotheecour timotheecour force-pushed the pr_fix_13477_nodejs_install_flaky_more_logging branch from 16c26ae to 0ae1ae1 Compare April 12, 2020 00:12
@timotheecour timotheecour changed the title fix #6999 (allow [nimDocOnly] in cmd msg); fix #13477 (flaky nodejs install); log PR url (+other info) in runCI logs fix #6999 (allow [nimDocOnly] in commit msg); fix #13477 (flaky nodejs install); log PR url (+other info) in runCI logs May 14, 2020
@timotheecour timotheecour changed the title fix #6999 (allow [nimDocOnly] in commit msg); fix #13477 (flaky nodejs install); log PR url (+other info) in runCI logs [WIP] fix #6999 (allow [nimDocOnly] in commit msg); fix #13477 (flaky nodejs install); log PR url (+other info) in runCI logs May 14, 2020
@timotheecour timotheecour marked this pull request as draft May 14, 2020 04:59
@stale
Copy link

stale bot commented May 15, 2021

This pull request has been automatically marked as stale because it has not had recent activity. If you think it is still a valid PR, please rebase it on the latest devel; otherwise it will be closed. Thank you for your contributions.

@stale stale bot added the stale Staled PR/issues; remove the label after fixing them label May 15, 2021
@stale stale bot closed this Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Staled PR/issues; remove the label after fixing them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] Install node.js 8.x flaky step
2 participants