Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
slapos slapos
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !1554

Merged
Created Mar 23, 2024 by Jérome Perrin@jeromeOwner

component/golang: clear user cache after build

  • Overview 6
  • Commits 1
  • Pipelines 1
  • Changes 1

While running tests using all.bash, $HOME/.cache/go-build/ is populated with data referencing the build folder. This is problematic when using shared parts and installing a not pinned software release multiple times, like it is the case on test node.

A scenario like this can happen:

  • a first succesful build install in <shared>/golang1.21/<HASH1>
  • golang1.21 section is changed in a the software release
  • golang1.21 is installed in <shared>/golang1.21/<HASH2>, running test fails because the cache <software_folder>/.cache/go-build/ in references paths from <shared>/golang1.21/<HASH1>/.build/go/src, that was used when building the first build and have been removed while installing.

This is visible with errors like this:

2024-03-21 20:52:37,214 INFO     slapgrid_sr: 2024-03-21 20:52:37 slapos[23849] INFO vet: can't parse raw cgo file: open ../../../../a984f246a1b2789081965ab5c05674a8/.build/go/src/net/cgo_linux.go: no such file or directory
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: fix/golang-vet-cgo-no-found
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7