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

Added description field to server capabilities#7213

Merged
ocket8888 merged 21 commits intoapache:masterfrom
rimashah25:feature/add-description-to-sc
Dec 16, 2022
Merged

Added description field to server capabilities#7213
ocket8888 merged 21 commits intoapache:masterfrom
rimashah25:feature/add-description-to-sc

Conversation

@rimashah25
Copy link
Copy Markdown
Contributor

@rimashah25 rimashah25 commented Nov 22, 2022

Closes: #6234


Which Traffic Control components are affected by this PR?

  • Documentation
  • Traffic Ops
  • Traffic Portal

What is the best way to verify this PR?

Use TP and curl cmds to perform all CRUD operations for server capability with and without description field. Description field is optional.

If this is a bugfix, which Traffic Control versions contained the bug?

PR submission checklist

@rimashah25 rimashah25 marked this pull request as ready for review November 22, 2022 01:27
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 22, 2022

Codecov Report

Merging #7213 (02d4a14) into master (a29ef8e) will decrease coverage by 0.12%.
The diff coverage is 13.61%.

@@             Coverage Diff              @@
##             master    #7213      +/-   ##
============================================
- Coverage     28.36%   28.23%   -0.13%     
  Complexity       98       98              
============================================
  Files           617      617              
  Lines         69195    69576     +381     
  Branches         90       90              
============================================
+ Hits          19624    19642      +18     
- Misses        47760    48120     +360     
- Partials       1811     1814       +3     
Flag Coverage Δ
golib_unit 52.88% <ø> (-0.12%) ⬇️
grove_unit 4.60% <ø> (ø)
t3c_generate_unit 24.96% <ø> (ø)
traffic_monitor_unit 20.43% <ø> (ø)
traffic_ops_integration 69.29% <86.36%> (-0.43%) ⬇️
traffic_ops_unit 19.67% <5.23%> (-0.14%) ⬇️
traffic_stats_unit 10.41% <ø> (ø)
v3 57.68% <ø> (ø)
v4 79.09% <81.25%> (-0.56%) ⬇️
v5 78.53% <100.00%> (-1.10%) ⬇️

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

Impacted Files Coverage Δ
...ic_ops_golang/servercapability/servercapability.go 0.00% <0.00%> (ø)
...fic_ops/traffic_ops_golang/dbhelpers/db_helpers.go 14.56% <50.00%> (+0.30%) ⬆️
traffic_ops/v4-client/servercapability.go 62.50% <81.25%> (-25.00%) ⬇️
traffic_ops/traffic_ops_golang/routing/routes.go 95.54% <100.00%> (ø)
traffic_ops/v5-client/servercapability.go 87.50% <100.00%> (ø)
...5-client/deliveryservices_required_capabilities.go 0.00% <0.00%> (-100.00%) ⬇️
...yservice/deliveryservices_required_capabilities.go 33.05% <0.00%> (-2.25%) ⬇️
lib/go-tc/deliveryservice_requests.go 40.86% <0.00%> (-2.09%) ⬇️
...affic_ops_golang/deliveryservice/request/assign.go 10.52% <0.00%> (-0.26%) ⬇️
... and 17 more

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

Comment thread docs/source/api/v3/server_capabilities.rst Outdated
Comment thread docs/source/api/v4/server_capabilities.rst Outdated
Comment thread traffic_ops/app/db/migrations/2022112116304800_add_description_in_sc_table.up.sql Outdated
Comment thread traffic_ops/testing/api/v3/tc-fixtures.json Outdated
Comment thread lib/go-tc/server_capabilities.go Outdated
Comment thread traffic_portal/test/integration/Data/servercapabilities.ts Outdated
@ocket8888 ocket8888 added Traffic Ops related to Traffic Ops Traffic Portal v1 related to Traffic Portal version 1 medium impact impacts a significant portion of a CDN, or has the potential to do so improvement The functionality exists but it could be improved in some way. labels Nov 23, 2022
@rimashah25 rimashah25 force-pushed the feature/add-description-to-sc branch from b077677 to 6c769a9 Compare December 5, 2022 18:07
Comment thread traffic_ops/traffic_ops_golang/servercapability/servercapability.go Fixed
@rimashah25 rimashah25 force-pushed the feature/add-description-to-sc branch from 14c21f2 to 8c3f692 Compare December 7, 2022 21:32
Comment thread traffic_ops/traffic_ops_golang/servercapability/servercapability.go Fixed
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.

In 4.0 the response when there are no (matching) server capabilities was (properly) an empty collection. In 4.1 it is now null:

$ toget -kpa 4.0 'server_capabilities?name=quest'
{
	"response": []
}
$ toget -kpa 4.1 'server_capabilities?name=quest'
{
	"response": null
}

Comment thread traffic_ops/v4-client/servercapability.go
@ocket8888 ocket8888 self-assigned this Dec 8, 2022
@rimashah25 rimashah25 requested a review from ocket8888 December 8, 2022 21:45
@rimashah25 rimashah25 force-pushed the feature/add-description-to-sc branch from 95b75a2 to 140c0c3 Compare December 12, 2022 20:40
Comment thread traffic_ops/traffic_ops_golang/servercapability/servercapability.go Outdated
@rimashah25 rimashah25 force-pushed the feature/add-description-to-sc branch from 8f60469 to 5466df4 Compare December 13, 2022 19:39
Comment thread traffic_ops/traffic_ops_golang/servercapability/servercapability.go Fixed
@rimashah25 rimashah25 force-pushed the feature/add-description-to-sc branch from f432c5c to 51b4b5c Compare December 14, 2022 03:39
@rimashah25 rimashah25 requested a review from ocket8888 December 15, 2022 17:04
Comment thread traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go Outdated
Comment thread traffic_ops/traffic_ops_golang/servercapability/servercapability.go Outdated
Comment thread traffic_ops/traffic_ops_golang/servercapability/servercapability.go Outdated
Comment thread traffic_ops/traffic_ops_golang/servercapability/servercapability.go
Comment thread traffic_ops/traffic_ops_golang/servercapability/servercapability.go Outdated
Comment thread traffic_ops/traffic_ops_golang/servercapability/servercapability.go Outdated
@rimashah25 rimashah25 requested a review from ocket8888 December 16, 2022 04:00
Comment thread traffic_ops/traffic_ops_golang/dbhelpers/db_helpers_test.go Outdated
Comment thread traffic_ops/traffic_ops_golang/dbhelpers/db_helpers_test.go
Comment thread traffic_ops/traffic_ops_golang/servercapability/servercapability.go Outdated
Comment thread traffic_ops/traffic_ops_golang/servercapability/servercapability.go
Comment thread traffic_ops/traffic_ops_golang/servercapability/servercapability.go Outdated
Comment thread traffic_ops/traffic_ops_golang/servercapability/servercapability.go Outdated
Comment thread traffic_ops/traffic_ops_golang/servercapability/servercapability.go Outdated
@rimashah25 rimashah25 requested a review from ocket8888 December 16, 2022 19:00
@ocket8888 ocket8888 merged commit 9604dc2 into apache:master Dec 16, 2022
@asf-ci asf-ci mentioned this pull request Jan 1, 2023
4 tasks
@rimashah25 rimashah25 deleted the feature/add-description-to-sc branch February 8, 2023 21:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

improvement The functionality exists but it could be improved in some way. medium impact impacts a significant portion of a CDN, or has the potential to do so Traffic Ops related to Traffic Ops Traffic Portal v1 related to Traffic Portal version 1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add description field to Server Capabilities API

3 participants