[DCOS_OSS-3953] Usage of "os/user" and cross-compilation Created: 13/Aug/18  Updated: 09/Nov/18  Resolved: 15/Aug/18

Status: Resolved
Project: DC/OS
Component/s: dcos-cli
Affects Version/s: None
Fix Version/s: DC/OS 1.12.0

Type: Bug Priority: Medium
Reporter: Bilal Amarni (Inactive) Assignee: Bilal Amarni (Inactive)
Resolution: Done  
Labels: cs_updated_fixVersion
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Sprint: CLI Team Sprint 26
Story Points: 1


The usage of the os/user package doesn't seem to work well with Go cross-compilation.

I had strange CI errors on Windows when working on integration tests which took me time to root-cause. Basically getting the user home directory failed, as a workaround for now I've explicitly set DCOS_DIR in the windows integration tests CI jobs.

For more context : https://github.com/mitchellh/go-homedir

A simple fix could be to upgrade to Go 1.11 too (https://tip.golang.org/doc/go1.11#os/user):

The os/user package can now be built in pure Go mode using the build tag "osusergo", independent of the use of the environment variable CGO_ENABLED=0. Previously the only way to use the package's pure Go implementation was to disable cgo support across the entire program.

Comment by Catherine Southard [ 04/Sep/18 ]

Updating the fixVersion from 1.12 to 1.12.0 since the ticket has been marked as Resolved - Done

Generated at Wed May 18 08:49:19 CDT 2022 using JIRA 7.8.4#78004-sha1:5704c55c9196a87d91490cbb295eb482fa3e65cf.