fix(pgo): Allow building multiple versions of the package to support PGO#722
Conversation
Signed-off-by: Kemal Akkoyun <[email protected]>
7cad0c8 to
ca471dc
Compare
ca471dc to
dec245a
Compare
ed34813 to
29e42e6
Compare
Signed-off-by: Kemal Akkoyun <[email protected]>
77072f5 to
96343cc
Compare
Signed-off-by: Kemal Akkoyun <[email protected]>
8a1ff9c to
a884096
Compare
a7d4f61 to
4355255
Compare
I did a bit of digging but I guess it won't help. Go tries to have reproducible builds across the platforms so it doesn't actually consider GOARCH and GOOS while calculating the buildID.
So this issue might still persist. However, the fix maybe just another twist on the cacheKey calculation. |
4355255 to
cc8fe4e
Compare
Signed-off-by: Kemal Akkoyun <[email protected]>
cc8fe4e to
0677d84
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #722 +/- ##
==========================================
+ Coverage 65.72% 67.14% +1.42%
==========================================
Files 113 116 +3
Lines 7926 8541 +615
==========================================
+ Hits 5209 5735 +526
- Misses 2192 2259 +67
- Partials 525 547 +22
🚀 New features to boost your workflow:
|
An attempt to fix PGO issues
orchestrion go build -pgo=default.pgofailed with "mismatched build ID" errors.The Never-Build-Twice (NBT) service used only
importPathas the cache key, but Profile-Guided Optimization (PGO) causes the same package to have different build IDs in different compilation contexts. The NBT service incorrectly rejected these as conflicts.Changed the NBT cache to use a composite key of
importPath + buildIDinstead of justimportPath, allowing the same package to be compiled with different build IDs when PGO (or other build configurations) change the inputs.Changes
Fixes #653