Issue Type: | Improvement |
---|---|
Priority: | 5 - Low |
Status: | Resolved |
Created at: | 2022-11-16T16:17:20.025Z |
Updated at: | 2022-12-20T22:53:29.600Z |
Created by: | Dan McDonald |
---|---|
Reported by: | Dan McDonald |
2022-12-01 Future Days (Release Date: 2022-12-01)
Today, the gcc10 stage of SmartOS on Jenkins uploads to the /Joyent_Dev/public/builds/platform-debug directory. When we parallelized our Jenkins in [https://mnx.atlassian.net/browse/OS-8405|https://mnx.atlassian.net/browse/OS-8405|smart-link], we discovered that we’d have buildstamp collisions between debug and gcc10, fixed by a 1-minute delay in gcc10 per [https://mnx.atlassian.net/browse/OS-8408|https://mnx.atlassian.net/browse/OS-8408|smart-link].
A comment in [https://mnx.atlassian.net/browse/OS-8408|https://mnx.atlassian.net/browse/OS-8408|smart-link] says:
# Delay one minute to avoid STAMP collisions with default/debug # stages, which are invariant and have their own directories. # (stages here get put in platform-debug because they get -d, # typically). # # Once we give manta build/ directories to stages, this could # be eliminated.
This issue aims to give build/ directories to stages.
The Makefile has a PLATFORM_DEBUG_SUFFIX variable that is currently set to -debug if the smartos-live was configured with -d or with ILLUMOS_ENABLE_DEBUG=exclusive in the environment prior to running `configure` (equivalent operations). It’s empty otherwise (default non-debug build).
The build_jenkins script has an ENGBLD_DEBUG_SUFFIX that appears to be exclusive to build_jenkins itself. It is set if -d is set on build_jenkins.
The problem is, the Jenkinsfile for alternate-compiler (today gcc10) ALSO SETS -d in build_jenkins. This leads to the problems mentioned above.
To fix this properly, the Makefile needs to honor PLATFORM_DEBUG_SUFFIX if it’s in the environment, build_jenkins should use PLATFORM_DEBUG_SUFFIX for ENGBLD_DEBUG_SUFFIX if it’s in the environment, and the Jenkinsfile MUST explicitly set PLATFORM_DEBUG_SUFFIX for the alternate-compiler stage. In the future we could build both DEBUG and non-DEBUG with gcc10 at the cost of an extra (parallelizable) stage after we fix this.