-
Notifications
You must be signed in to change notification settings - Fork 83
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
sync-tags: add support for v0.x.y tags #210
Conversation
Addressed all comments except #210 (comment). Also, updated the main PR body and commit messages to reflect the new behaviour and added links to a new test run in the PR body. If |
var changed, goModChanged bool | ||
_, err = os.Stat("go.mod") | ||
if os.IsNotExist(err) { | ||
if !goModExists { | ||
if _, err2 := os.Stat("Godeps/Godeps.json"); err2 == nil { | ||
fmt.Printf("Updating Godeps.json to point to %s tag.\n", bName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we replace Godeps.json with go.mod everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or is this really still about godeps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the case where there is no go.mod but only Godeps.json file in the repo. We don't need it for k8s repos but might be useful for non-k8s ones.
Or we could remove it here and force them to use the godeps
branch in this repo, but that'd break compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this script still run on 1.14.x, or did we split the job to use the godeps branch for publishing that branch? dropping godeps manipulation seems ok, but I'd do it in a separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this script still run on 1.14.x, or did we split the job to use the godeps branch for publishing that branch?
The latter. Will remove this in another PR. 👍
The tags published to https://github.com/prowtest look good |
321e614
to
3f3695e
Compare
Just adding an explicit hold until we've tested this thoroughly |
Updated with the latest changes, PTAL. The current workflow (as discussed on slack) is:
Note: for 3) we don't overwrite the existing .mod/.info/.zip files in the go mod cache dir while building tags instead because with the current logic, we avoid creating the publishing-bot/cmd/sync-tags/gomod.go Lines 157 to 159 in dde80ae
Even if we tried to keep track of overwriting it once, it isn't possible to do it across multiple runs (for multiple repos) of sync-tags. |
41f77fc
to
89159bb
Compare
Implements changes to the go modules KEP made in kubernetes/enhancements#1350. This commit updates sync-tags to publish `v0.x.y` tags for corresponding `v1.x.y` Kubernetes tag. The old `kubernetes-1.x.y` tags are still also published. Both `kubernetes-1.x.y` and `v0.x.y` point to the same sha. For `v0.x.y`: - At this tag, `go.mod` uses `v0.x.y` tags for dependencies. - When this tag is manually specified in a `go.mod` file, it will be retained as `v0.x.y`. For `kubernetes-1.x.y`: - At this tag, `go.mod` uses `v0.x.y` tags for dependencies. Note: this differs from the previous way, where pseudoversions were used. - When this tag is manually specified in a `go.mod` file, go will resolve it to the appropriate pseudoversion.
Rebased on top of master (which brought in #211) |
/lgtm |
test run to kubernetes-nightly org looks good
|
/hold cancel |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, nikhita, sttts The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
For kubernetes/kubernetes#84608
Implements changes to the go modules KEP made in
kubernetes/enhancements#1350.
This commit updates sync-tags to publish
v0.x.y
tags for correspondingv1.x.y
Kubernetes tag. The oldkubernetes-1.x.y
tags are still alsopublished. Both
kubernetes-1.x.y
andv0.x.y
point to the same sha.For
v0.x.y
:go.mod
usesv0.x.y
tags for dependencies.go.mod
file, it will beretained as
v0.x.y
.For
kubernetes-1.x.y
:go.mod
usesv0.x.y
tags for dependencies. Note: thisdiffers from the previous way, where pseudoversions were used.
go.mod
file, go will resolveit to the
v0.x.y
tag, so pseudoversions would never be needed.Verified locally. A sample run for client-go (and api + apimachinery) is shown below:
/cc @sttts @liggitt @dims
/assign @sttts