Skip to content

cmake: don't trust CI to record time and versions and log ourselves#3996

Merged
lgirdwood merged 2 commits intothesofproject:mainfrom
marc-hb:cmake-logs-versions
Apr 1, 2021
Merged

cmake: don't trust CI to record time and versions and log ourselves#3996
lgirdwood merged 2 commits intothesofproject:mainfrom
marc-hb:cmake-logs-versions

Conversation

@marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Mar 31, 2021

In an ideal world, every CI engine records and shares the most important
CI information:

  • current date and time in a well identified timezone
  • git version of the pull request
  • git version of the moving branch the PR is being merged with

In the real world we have multiple CI solutions and they unfortunately
cannot not all be trusted to perform their most basic job
correctly. Fortunately, they all make at least build logs available so
these very few lines of code adding very few lines of output cost near
zero extra build time and solve the problem once for all. I feel stupid
I didn't do this sooner, this would have saved me hours and hours in
vain requests and discussions and in trying to puzzle that information
together.

Sample outputs

-- Preparing Xtensa toolchain
version.cmake starting SOF build at 2021-03-31T18:09:46Z UTC
Building git commit with parent(s):
150fd1e4c968 4249bdb1b305 [2nd parent if merge] (HEAD -> main) cmake: ...
-- GIT_TAG / GIT_LOG_HASH : v1.7-rc1-174-g150fd1e4c968-dirty / 150fd1e4c968

From https://github.com/thesofproject/sof/pull/3996/checks?check_run_id=2239525672, xtensa-build-all.sh

-- version.cmake starting SOF build at 2021-03-31T20:01:47Z UTC
-- Building git commit with parent(s):
5ad5c7d0c eb459078f 83d425817 (HEAD, pull/3996/merge) Merge 83d42581779c4da872e9d635962436ab1752c853 into eb459078f3023f6762428f38976547576eeae59f
-- GIT_TAG / GIT_LOG_HASH : v1.7-rc1-166-g5ad5c7d0c573 / 5ad5c7d0c
-- Source content hash: 55ed85fe

Other examples at https://sof-ci.01.org/sofpr/PR3996/build8556/build/

Signed-off-by: Marc Herbert marc.herbert@intel.com

@marc-hb marc-hb force-pushed the cmake-logs-versions branch from 80e1f32 to 83d4258 Compare March 31, 2021 20:00
@marc-hb
Copy link
Collaborator Author

marc-hb commented Mar 31, 2021

https://sof-ci.01.org/sofpr/PR3996/build8553/devicetest/ has many failures on TGLH_RVP_HDA and many devices unavailable, @fredoh9 is looking into it.

Everything else was green but I just force-pushed version 2 (83d4258) and now version 4 (52eca1b) with some enhancements.

Never discard stderr.

Also fix my older, misleading comment and add a warning.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb marc-hb force-pushed the cmake-logs-versions branch from 83d4258 to a54fc91 Compare March 31, 2021 20:14
…selves

In an ideal world, every CI engine records and shares the most important
CI information:
- current date and time in a well identified timezone
- git version of the pull request
- git version of the moving branch the PR is being merged with

In the real world we have multiple CI solutions and they unfortunately
cannot not all be trusted to perform their most basic job
correctly. Fortunately, they all make at least build logs available so
these very few lines of code adding very few lines of output cost near
zero extra build time and solve the problem once for all. I feel stupid
I didn't do this sooner, this would have saved me hours and hours in
vain requests and discussions and in trying to puzzle that information
together.

Sample output:

-- Preparing Xtensa toolchain
version.cmake starting SOF build at 2021-03-31T18:09:46Z UTC
Building git commit with parent(s):
150fd1e4c968 4249bdb1b305 [other parent if merge] (HEAD -> main) cmake: ...
-- GIT_TAG / GIT_LOG_HASH : v1.7-rc1-174-g150fd1e4c968-dirty / 150fd1e4c968

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb
Copy link
Collaborator Author

marc-hb commented Mar 31, 2021

The main (but not only) offender is of course "Quick"Build. Results like https://sof-ci.01.org/sof-pr-viewer/#/build/PR3993/build6245042 have no (or very well hidden) version or date information which is especially time consuming considering the QuickBuild scheduler takes hours to run or is sometimes completely stuck like it was in the last ~24h. Looks like @zrombel just got it running again?

See sample waste of time in #3993 (comment)

@marc-hb
Copy link
Collaborator Author

marc-hb commented Mar 31, 2021

SOFCI TEST

@marc-hb
Copy link
Collaborator Author

marc-hb commented Mar 31, 2021

https://sof-ci.01.org/sofpr/PR3996/build8553/devicetest/ has many failures on TGLH_RVP_HDA and many devices unavailable, @fredoh9 is looking into it.

General CI outage quickly fixed by @fredoh9 , thanks a lot !

https://sof-ci.01.org/sofpr/PR3996/build8557/devicetest/?model=CML_HEL_RT5682&testcase=check-suspend-resume-5 is the usual suspend/resume TIMEOUT and https://sof-ci.01.org/sofpr/PR3996/build8557/devicetest/?model=CML_RVP_SDW&testcase=check-suspend-resume-with-playback is

[  893.168194] kernel: e1000e 0000:00:1f.6 enp0s31f6: Hardware Error

I think we don't use e1000e, we should probably disable it, see thesofproject/sof-test#564. No other errors at https://sof-ci.01.org/sofpr/PR3996/build8557/devicetest and these two are obviously unrelated to this PR.

@marc-hb
Copy link
Collaborator Author

marc-hb commented Apr 1, 2021

See below "you need to rebase" most common CI misconception and confusion between pull/12345/head and pull/12345/merge:

#3990 (comment)

@lgirdwood lgirdwood merged commit a589981 into thesofproject:main Apr 1, 2021
@marc-hb marc-hb deleted the cmake-logs-versions branch April 14, 2021 20:21
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