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

Remove Traffic Ops API version 2#6945

Merged
ocket8888 merged 14 commits intoapache:masterfrom
zrhoffman:remove-api-v2
Jul 11, 2022
Merged

Remove Traffic Ops API version 2#6945
ocket8888 merged 14 commits intoapache:masterfrom
zrhoffman:remove-api-v2

Conversation

@zrhoffman
Copy link
Copy Markdown
Member

@zrhoffman zrhoffman commented Jul 7, 2022

This PR closes #6697 by removing Traffic Ops API v2, logic relating to API v2, and the v2 client and API tests.


Which Traffic Control components are affected by this PR?

  • Traffic Ops
  • Traffic Ops
  • Traffic Ops Client - (Go library, Python)
  • CDN-in-a-Box
  • Automation - GitHub Actions

What is the best way to verify this PR?

Request TO API v2 routes, verify you get HTTP status code 501 Not Implemented:

{
  "alerts": [
    {
      "level": "error",
      "text": "The requested api version is not implemented by this server. If you are using a newer client with an older server, you will need to use an older client version or upgrade your server."
    }
  ]
}

PR submission checklist

@zrhoffman zrhoffman added Traffic Ops related to Traffic Ops tech debt rework due to choosing easy/limited solution TC Client (python) related to the Python implementation of a TC client TO Client (Go) related to the Go implementation of a TC client labels Jul 7, 2022
@zrhoffman zrhoffman added this to the 7.0.0 milestone Jul 7, 2022
@ocket8888
Copy link
Copy Markdown
Contributor

It appears that the /deliveryservices endpoint thinks you removed 3.0 as well:

2022-07-07T22:54:17.999425716Z ERROR: api.go:263: 2022-07-07T22:54:17.7269333Z: 172.18.0.2:40418 TODeliveryService.Read called with invalid API version: 3.0

Comment thread traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go
Comment thread traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go
Comment thread traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go
Comment thread infrastructure/cdn-in-a-box/traffic_ops_integration_test/Dockerfile
@zrhoffman
Copy link
Copy Markdown
Member Author

It appears that the /deliveryservices endpoint thinks you removed 3.0 as well:

2022-07-07T22:54:17.999425716Z ERROR: api.go:263: 2022-07-07T22:54:17.7269333Z: 172.18.0.2:40418 TODeliveryService.Read called with invalid API version: 3.0

Fixed in 9e4ad30

@zrhoffman zrhoffman requested review from ericholguin and rawlinp July 8, 2022 18:01
Comment thread traffic_ops/traffic_ops_golang/server/servers.go Outdated
Copy link
Copy Markdown
Contributor

@rawlinp rawlinp left a comment

Choose a reason for hiding this comment

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

All my comments have been addressed, but I'll wait for the other reviewers to approve as well.

@zrhoffman zrhoffman requested a review from ocket8888 July 8, 2022 18:35
Copy link
Copy Markdown
Contributor

@ericholguin ericholguin left a comment

Choose a reason for hiding this comment

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

Can the traffic_ops/testing/api//v2 folder be removed as well, I'm still seeing it

Comment thread traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go
@zrhoffman
Copy link
Copy Markdown
Member Author

Can the traffic_ops/testing/api//v2 folder be removed as well, I'm still seeing it

folder gitignore removed in a712983

@zrhoffman zrhoffman requested a review from ericholguin July 8, 2022 19:09
Copy link
Copy Markdown
Contributor

@ocket8888 ocket8888 left a comment

Choose a reason for hiding this comment

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

my concerns were addressed

@ocket8888 ocket8888 merged commit c5664eb into apache:master Jul 11, 2022
@zrhoffman zrhoffman deleted the remove-api-v2 branch July 11, 2022 16:53
zrhoffman added a commit to zrhoffman/trafficcontrol that referenced this pull request Oct 2, 2022
* Remove Traffic Ops API v2 tests

* Remove Traffic Ops v2 Go client library

* Remove newly-unused handlers

* Use latest to-api-cdns-dnsseckeys-generate label in Python Traffic Ops client

* Remove Traffic Ops API v2 routes

* Remove API v2-specific logic

* Remove more API v2-specific logic

* Re-add API v3 handling for DSes

* Re-add API v3 Delivery Service Read() handling

* Remove more lines in the Dockerfile referencing the API v2 tests and client

* Remove more unused functions

* Consolidate queryParam map

* Remove API v2 tests gitignore

* Remove mention of API v2 from comment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

TC Client (python) related to the Python implementation of a TC client tech debt rework due to choosing easy/limited solution TO Client (Go) related to the Go implementation of a TC client Traffic Ops related to Traffic Ops

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Traffic Ops APIv2

4 participants