dock
dock copied to clipboard
Bump up Golang version
What type of PR is this? /kind cleanup #SODACODE2022
What this PR does / why we need it:
- Bumps up Golang version
Which issue(s) this PR fixes:
Fixes #83
Test Report Added?:
Uncomment only one
/kind <>
line, hit enter to put that in a new line, and remove leading whitespace from that line: /kind TESTED
/kind NOT-TESTED
Special notes for your reviewer:
Breaking changes
- Post Golang 1.16, calls to
os.Exit(0)
will now fail the unit tests. - [WIP] Some Metrics tests are failing for Ceph, I'm taking a look at them.
Could you please provide the testing done after the version upgrade? Build and test updates can be provided. I see the CI failed with the upgrade!
Please mark the PR for #SODACODE2022 in the description
@vharsh Can you please look at the failing CI jobs
@vharsh Can you please look at the failing CI jobs
I'm on it, it has broken from Golang 1.14 and it's lacking some metric Component name from the 15th metric, I'm trying to understand how the tests were passing all this while.
@vharsh thanks...
I did some debugging again this long weekend, sharing all what I've found.
What factors are causing the Ceph metrics to fail?
- The upgraded Golang(from 1.14) version has some changes to
json.Unmarshall(....)
, which is not allowing stringified values like"osd.0"
(which clearly isn't a floating point Number) into thejson.Number
type (which is an alias for the string type) into theName
field( from metrics_cli.go ->cephOSDDF.OSDNodes[*].Name
), which should likely have been a string, a JSON unmarshall operation is failing. - I've verified the expected values changes across go 1.13.x & v1.18.x, there have been some change in behaviour and this cannot be fixed by just fixing the expectedValues in the unit-test.
Some errors only visible in the newer Golang v1.17 or v1.18
E0419 12:02:09.894663 8531 metrics_cli.go:52] file ReadDefaultConfigFile can't readrados: No such file or directory
E0419 12:02:09.895347 8531 metrics_cli.go:461] unmarshal failed
Things I need to look further:
- Go-Ceph bindings have are pinned to a very old revision from 2017, some changes might be required to change the expected internal types to
string
. - Should I bump up the Go-Ceph bindings to a release post 2020, so that dock users can get newer Ceph versions and likely the more supported & stable versions?
@vharsh Thanks for debugging this, feel free to bump the go-ceph to newer versions.
@vharsh Can you please look at @asifdxtreme suggestion and check further, thanks
@sushanthakumar Yeah, I was investigating this last weekend, I'll take a look at it soon-ish.