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

Retract versions v1.1.0 through v1.1.5 from Go modules #7150

Merged
merged 2 commits into from Nov 17, 2022

Conversation

zrhoffman
Copy link
Member

@zrhoffman zrhoffman commented Oct 20, 2022

This PR retracts v1.1.0, v1.1.1, v1.1.2, v1.1.3, v1.1.4, and v1.1.5-retractions from Go modules. If this PR is merged, it should be tagged version v1.1.5-retractions.

Without this PR and tag v1.1.5-retractions, a user running

go mod init my-module
go get github.com/apache/trafficcontrol@817a702a9de6

will retrieve dependency github.com/apache/trafficcontrol at version v1.1.4-0.20201118150121-817a702a9de6. With this PR merged and tagged v1.1.5-retractions, the same go get command will yield version v0.0.0-20201118150121-817a702a9de6.


Which Traffic Control components are affected by this PR?

  • go.mod

What is the best way to verify this PR?

git clone https://github.com/apache/trafficcontrol
cd trafficcontrol
# create github.com:my-username/nonfork using the GitHub UI
git remote add nonfork git@github.com:my-username/nonfork.git
git push nonfork --all
git push nonfork --tags
sed -i 's|github\.com/apache/trafficcontrol|github.com/my-username/nonfork|' go.mod
git add go.mod
git commit -m 'Update module path to github.com/my-username/nonfork'
git push nonfork HEAD:master

In a different window, try getting a 4.1.x commit:

mkdir my-project
cd my-project
go mod init my-project
go get github.com/my-fork/nonfork@817a702a9d

Expected computed version: v1.1.4-0.20201118150121-817a702a9de6

Back in the first window, retract v1:

<<'APPEND' cat >> go.mod
// Although the Apache Traffic Control considers v7.0.1 stable, Go modules consider it unstable because its major version
// is greater than 1, and without these retractions, a commit like 817a702a9de6 will have a computed vesion of
// v1.1.4-0.20201118150121-817a702a9de6
// With these retractions, the same commit will have a computed version of
// v0.0.0-20201118150121-817a702a9de6
// See https://pkg.go.dev/cmd/go@go1.15.15#hdr-Module_compatibility_and_semantic_versioning for details.
retract (
	v1.1.5-retractions
	v1.1.4
	v1.1.3
	v1.1.2
	v1.1.1
	v1.1.0
)
APPEND
git add go.mod
git commit -m 'Retract v1'
git tag v1.1.5-retractions
git push nonfork HEAD:master v1.1.5-retractions

Back in the my-project window, try importing the 4.1.x commit again:

sudo rm -rf ${GOPATH}/pkg
go get github.com/my-username/nonfork@817a702a9de6

Expected computed version: v0.0.0-20201118150121-817a702a9de6

PR submission checklist

@zrhoffman zrhoffman added tech debt rework due to choosing easy/limited solution improvement The functionality exists but it could be improved in some way. process go Pull requests that update Go or Go-related code labels Oct 20, 2022
@zrhoffman
Copy link
Member Author

zrhoffman commented Oct 20, 2022

We could also tag it something like v1.1.5-retractions, it doesn't need to be named only v1.1.5

@zrhoffman
Copy link
Member Author

Rebased onto latest master

@zrhoffman
Copy link
Member Author

Rebased to get the t3c test nonbreakage from #7198

@ocket8888 ocket8888 merged commit 83255a7 into apache:master Nov 17, 2022
@zrhoffman zrhoffman deleted the retract-v1 branch November 17, 2022 20:40
zrhoffman added a commit to zrhoffman/trafficcontrol that referenced this pull request Mar 1, 2023
zrhoffman added a commit to zrhoffman/trafficcontrol that referenced this pull request Sep 22, 2023
zrhoffman added a commit to zrhoffman/trafficcontrol that referenced this pull request Sep 22, 2023
rimashah25 pushed a commit that referenced this pull request Sep 22, 2023
* Use :atc-godoc: role instead of pkg.go.dev URLs

* Update module path to v8 in non-golang files

git ls-files |
  grep -vE '^CHANGELOG|^vendor|\.go$' |
  xargs grep -lE '[^/]github\.com/apache/trafficcontrol/' |
  xargs sed -Ei 's|([^/]github\.com/apache/trafficcontrol/)|\1v8/|g'

* Update module path to v8 in golang sources

git ls-files '**.go' |
  grep -vE ^vendor |
  xargs grep -lE '[^/]github\.com/apache/trafficcontrol/' |
  xargs sed -Ei 's|([^/]github\.com/apache/trafficcontrol/)|\1v8/|g'

* Revert "Retract versions v1.1.0 through v1.1.5 from Go modules (#7150)"

This reverts commit 83255a7.

* Update module version to v8
rimashah25 pushed a commit that referenced this pull request Sep 22, 2023
* Use :atc-godoc: role instead of pkg.go.dev URLs

* Update module path to v8 in non-golang files

git ls-files |
  grep -vE '^CHANGELOG|^vendor|\.go$' |
  xargs grep -lE '[^/]github\.com/apache/trafficcontrol/' |
  xargs sed -Ei 's|([^/]github\.com/apache/trafficcontrol/)|\1v8/|g'

* Update module path to v8 in golang sources

git ls-files '**.go' |
  grep -vE ^vendor |
  xargs grep -lE '[^/]github\.com/apache/trafficcontrol/' |
  xargs sed -Ei 's|([^/]github\.com/apache/trafficcontrol/)|\1v8/|g'

* Revert "Retract versions v1.1.0 through v1.1.5 from Go modules (#7150)"

This reverts commit 83255a7.

* Update module version to v8

(cherry picked from commit 0115c92)
jpappa200 pushed a commit to jpappa200/trafficcontrol that referenced this pull request Sep 27, 2023
* Use :atc-godoc: role instead of pkg.go.dev URLs

* Update module path to v8 in non-golang files

git ls-files |
  grep -vE '^CHANGELOG|^vendor|\.go$' |
  xargs grep -lE '[^/]github\.com/apache/trafficcontrol/' |
  xargs sed -Ei 's|([^/]github\.com/apache/trafficcontrol/)|\1v8/|g'

* Update module path to v8 in golang sources

git ls-files '**.go' |
  grep -vE ^vendor |
  xargs grep -lE '[^/]github\.com/apache/trafficcontrol/' |
  xargs sed -Ei 's|([^/]github\.com/apache/trafficcontrol/)|\1v8/|g'

* Revert "Retract versions v1.1.0 through v1.1.5 from Go modules (apache#7150)"

This reverts commit 83255a7.

* Update module version to v8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go or Go-related code improvement The functionality exists but it could be improved in some way. process tech debt rework due to choosing easy/limited solution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants