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

[release/2.7] update to go1.16 #3472

Merged
merged 1 commit into from Aug 10, 2021

Conversation

thaJeztah
Copy link
Member

relates to #3466, as the updated github.com/golang-jwt/jwt v3.2.2 requires to 1.15 or 1.16

Copy link
Collaborator

@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

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

lgtm

@wy65701436
Copy link
Collaborator

wy65701436 commented Aug 10, 2021

we should also update https://github.com/distribution/distribution/blob/main/go.mod#L3 and https://github.com/distribution/distribution/blob/main/Dockerfile#L1

For the docker file, it probably needs to add ENV GO111MODULE auto

Copy link
Collaborator

@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

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

see the comments

@thaJeztah
Copy link
Member Author

we should also update https://github.com/distribution/distribution/blob/main/go.mod#L3 and https://github.com/distribution/distribution/blob/main/Dockerfile#L1

This is the release/2.7 branch, so the go.mod doesn't apply. We also should not update the version in go.mod unless the code does not work with older go versions (it specifies the minimum required version to use, although currently only will print a warning).

For the docker file, it probably needs to add ENV GO111MODULE auto

Ah, yes, that's a good catch; adding that.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

Updated, PTAL

@thaJeztah
Copy link
Member Author

opened #3474 for the main branch

Copy link
Collaborator

@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

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

lgtm

@wy65701436
Copy link
Collaborator

oh, yes, it's for v2.7

cc @milosgajdos do we want to upgrade the golang major version in a patch release? I know it's caused by the jwt security issue.

@milosgajdos
Copy link
Member

cc @milosgajdos do we want to upgrade the golang major version in a patch release? I know it's caused by the jwt security issue.

Not to sound SemVer pedantic, but we're talking about minor version upgrade here

Even though 2.7 is quite behind the main and thus we might [reasonably] expect different performance, just for the sake of security we should go ahead with the upgrade 🤔

@wy65701436 wy65701436 merged commit 61e7e20 into distribution:release/2.7 Aug 10, 2021
@thaJeztah thaJeztah deleted the 2.7_update_go116 branch August 10, 2021 11:01
@thaJeztah
Copy link
Member Author

Yeah, older version of Go (<1.15) are no longer maintained, and may have unpatched security fixes that could affect this project. The Go language itself has a stability promise (v1.xx are promised to be backward compatible), but of course stdlib packages may have new additions (which in this case was needed for the jwt package)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants