Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Update Go module version to v8#7814

Merged
rimashah25 merged 5 commits intoapache:masterfrom
zrhoffman:module-v8
Sep 22, 2023
Merged

Update Go module version to v8#7814
rimashah25 merged 5 commits intoapache:masterfrom
zrhoffman:module-v8

Conversation

@zrhoffman
Copy link
Copy Markdown
Member

@zrhoffman zrhoffman commented Sep 22, 2023

This PR fixes #4380 and fixes #6304 by updating the ATC module path from

module github.com/apache/trafficcontrol

to

module github.com/apache/trafficcontrol/v8

and updates references to the latest ATC Go module around the repo to reference the v8 version. See the commit messages for the commands used to update files and #4380 (comment) for the motivation for this PR.

Note that this PR does not move any files, because moving files is unnecessary to update the module version.

Once this PR is merged, a message will appear at the top of https://pkg.go.dev/github.com/apache/trafficcontrol like this:

Deprecation notice

because the latest module will be at https://pkg.go.dev/github.com/apache/trafficcontrol/v8.


Which Traffic Control components are affected by this PR?

  • Documentation
  • Traffic Control Cache Config (T3C, formerly ORT)
  • Traffic Control Health Client (tc-health-client)
  • Traffic Control Client
  • Traffic Monitor
  • Traffic Ops
  • Traffic Stats
  • Grove
  • CDN in a Box (Enroller)

What is the best way to verify this PR?

Verify that the 8 non-URL, non-local-path instances of github.com/apache/trafficcontrol/ in the repo that did not have v8/ appended to them. They should stay as-is:

repo=github.com/apache/trafficcontrol/
git ls-files | xargs grep -Fn "$repo" 2>/dev/null | grep -vE "(https://|src/)${repo//./\\.}" | grep -vF "${repo}v8"
blueprints/api.guidelines.md:101:[the ATC library's Alert structure](https://pkg.go.dev/github.com/apache/trafficcontrol/lib/go-tc#Alert).
blueprints/refetch-invalidation.md:291:github.com/apache/trafficcontrol/lib/go-atscfg/regexrevalidatedotconfig_test.go
blueprints/refetch-invalidation.md:298:github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/invalidationjobs/invalidationjobs.go
blueprints/refetch-invalidation.md:304:github.com/apache/trafficcontrol/traffic_ops/testing/api/v1/jobs_test.go
blueprints/refetch-invalidation.md:305:github.com/apache/trafficcontrol/traffic_ops/testing/api/v2/jobs_test.go
blueprints/refetch-invalidation.md:306:github.com/apache/trafficcontrol/traffic_ops/testing/api/v3/jobs_test.go
blueprints/refetch-invalidation.md:307:github.com/apache/trafficcontrol/traffic_ops/testing/api/v4/jobs_test.go
CHANGELOG.md:694:- Importing Traffic Ops Go clients via the un-versioned `github.com/apache/trafficcontrol/traffic_ops/client` is now deprecated in favor of versioned import paths e.g. `github.com/apache/trafficcontrol/traffic_ops/v3-client`.

PR submission checklist

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'
git ls-files '**.go' |
  grep -vE ^vendor |
  xargs grep -lE '[^/]github\.com/apache/trafficcontrol/' |
  xargs sed -Ei 's|([^/]github\.com/apache/trafficcontrol/)|\1v8/|g'
@zrhoffman zrhoffman added Traffic Ops related to Traffic Ops Traffic Stats related to Traffic Stats Traffic Monitor related to Traffic Monitor documentation related to documentation grove related to the "grove" HTTP caching server implementation tech debt rework due to choosing easy/limited solution cdn-in-a-box related to the Docker-based CDN-in-a-Box system tools related to tools outside of main components, e.g. 'compare' cache-config Cache config generation TO Client (Go) related to the Go implementation of a TC client tc-health-client Traffic Control Health Client labels Sep 22, 2023
@zrhoffman zrhoffman mentioned this pull request Sep 22, 2023
4 tasks
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 22, 2023

Codecov Report

Merging #7814 (1872785) into master (a6b2954) will decrease coverage by 33.81%.
Report is 5 commits behind head on master.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             master    #7814       +/-   ##
=============================================
- Coverage     65.64%   31.83%   -33.81%     
  Complexity       98       98               
=============================================
  Files           323      717      +394     
  Lines         12827    82718    +69891     
  Branches        965      965               
=============================================
+ Hits           8420    26337    +17917     
- Misses         4048    54216    +50168     
- Partials        359     2165     +1806     
Flag Coverage Δ
golib_unit 53.56% <ø> (?)
grove_unit 12.02% <ø> (?)
t3c_unit 5.91% <ø> (?)
traffic_monitor_unit 26.44% <ø> (?)
traffic_ops_integration 69.42% <ø> (ø)
traffic_ops_unit 21.62% <ø> (?)
traffic_portal_v2 74.39% <ø> (ø)
traffic_stats_unit 10.78% <ø> (?)
unit_tests 29.16% <ø> (-45.24%) ⬇️
v3 57.79% <ø> (ø)
v4 79.18% <ø> (ø)
v5 78.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
cache-config/t3c-apply/config/config.go 0.00% <ø> (ø)
cache-config/t3c-apply/torequest/cmd.go 0.00% <ø> (ø)
cache-config/t3c-apply/torequest/torequest.go 5.65% <ø> (ø)
cache-config/t3c-apply/util/gitutil.go 0.00% <ø> (ø)
cache-config/t3c-apply/util/util.go 0.00% <ø> (ø)
cache-config/t3c-check-refs/config/config.go 0.00% <ø> (ø)
cache-config/t3c-check-refs/t3c-check-refs.go 1.78% <ø> (ø)
cache-config/t3c-generate/cfgfile/all.go 51.38% <ø> (-10.69%) ⬇️
cache-config/t3c-generate/cfgfile/routing.go 84.00% <ø> (ø)
cache-config/t3c-generate/cfgfile/sslkeys.go 0.00% <ø> (ø)
... and 100 more

... and 293 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Copy Markdown
Contributor

@rimashah25 rimashah25 left a comment

Choose a reason for hiding this comment

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

Changes LGTM

@rimashah25 rimashah25 merged commit 0115c92 into apache:master Sep 22, 2023
@zrhoffman zrhoffman deleted the module-v8 branch September 22, 2023 19:39
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cache-config Cache config generation cdn-in-a-box related to the Docker-based CDN-in-a-Box system documentation related to documentation grove related to the "grove" HTTP caching server implementation tc-health-client Traffic Control Health Client tech debt rework due to choosing easy/limited solution TO Client (Go) related to the Go implementation of a TC client tools related to tools outside of main components, e.g. 'compare' Traffic Monitor related to Traffic Monitor Traffic Ops related to Traffic Ops Traffic Stats related to Traffic Stats

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Users cannot import the TO API 4.0 client getting newer versions to appear on pkg.go.dev

2 participants