Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade Go from 1.18 -> 1.20 #5981

Merged
merged 9 commits into from
Feb 21, 2023

Conversation

NicholasBlaskey
Copy link
Contributor

@NicholasBlaskey NicholasBlaskey commented Feb 13, 2023

Description

Upgrades Go to 1.20.

Test Plan

CI passes.

Commentary (optional)

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

Ticket

@cla-bot cla-bot bot added the cla-signed label Feb 13, 2023
@netlify
Copy link

netlify bot commented Feb 13, 2023

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit 254087e
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/63f51896efb3a10008529ebb

@NicholasBlaskey NicholasBlaskey force-pushed the upgrade_go branch 3 times, most recently from 62c5282 to 6cd13e4 Compare February 15, 2023 20:16
@NicholasBlaskey NicholasBlaskey marked this pull request as ready for review February 15, 2023 21:21
@NicholasBlaskey NicholasBlaskey requested a review from a team as a code owner February 15, 2023 21:21
@@ -1035,14 +1037,15 @@ jobs:

package-and-push-system-local:
docker:
- image: cimg/go:1.18
Copy link
Contributor Author

@NicholasBlaskey NicholasBlaskey Feb 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cimg/go:1.20 doesn't work here due to glibc issues

Go 1.20 seems to cause us to have a higher glibc version than ubuntu 20.04 supports when we build with this image with a base of ubuntu 22.04. I think the fact it worked before was a happy accident relying on precompiled object files that shipped with the Go compiler.

golang/go#57328 (comment)

Maybe we should just add this to the determined-ci? Though I don't really understand why we have this reinstall-go step (besides me using it now to get Go 1.20).

We could also possibly look into CGO_ENABLED=0 but feels like there is a risk that it might cause a nebulous performance issue for some setup.

@@ -361,7 +361,7 @@ func (db *PgDB) queryRowsWithParser(
panic(fmt.Sprintf("unsupported query type: %s", kind))
}

if err := rows.Close(); err != nil {
if err := rows.Close(); err != nil { //nolint: sqlclosecheck
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we correctly defer rows.Close() above so not sure why this linter is complaining

@keita-determined
Copy link
Contributor

#5975 added go version check
need to update it as well

@@ -15,7 +15,7 @@ As far as translation makes possible, the original algorithm, variable names, an
unmodified. The accompanying tests were added after the Go rewrite. The following copyright notice
and the MIT license pertain to the original implementation:

Copyright (c) 2013 by Sveinn Steinarsson
# Copyright (c) 2013 by Sveinn Steinarsson
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor

@stoksc stoksc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved with a tentative idea to

  1. update determined-ai/determined for go1.20
  2. update cimg-base to go1.20
  3. remove reinstall go steps?

@NicholasBlaskey NicholasBlaskey merged commit f7a93ca into determined-ai:master Feb 21, 2023
@dannysauer dannysauer added this to the 0.20.0 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants