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

Add required capabilities to delivery service structure#7224

Merged
ocket8888 merged 12 commits intoapache:masterfrom
srijeet0406:adding_required_capabilities_to_DS
Dec 14, 2022
Merged

Add required capabilities to delivery service structure#7224
ocket8888 merged 12 commits intoapache:masterfrom
srijeet0406:adding_required_capabilities_to_DS

Conversation

@srijeet0406
Copy link
Copy Markdown
Contributor

This PR adds the required capabilities into the deliveryservice structure.


Which Traffic Control components are affected by this PR?

  • Documentation
  • Traffic Ops

What is the best way to verify this PR?

Make CRUD calls to the delivery service API and make sure that you can add, remove, modify and get required permissions as part of the DS structure.
Make sure all the tests pass.

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

  • master

PR submission checklist

@ocket8888 ocket8888 self-assigned this Nov 28, 2022
@ocket8888 ocket8888 added Traffic Ops related to Traffic Ops Traffic Portal v1 related to Traffic Portal version 1 high impact impacts the basic function, deployment, or operation of a CDN tech debt rework due to choosing easy/limited solution labels Nov 28, 2022
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 28, 2022

Codecov Report

Merging #7224 (9b7a439) into master (b297605) will decrease coverage by 0.08%.
The diff coverage is 15.19%.

@@             Coverage Diff              @@
##             master    #7224      +/-   ##
============================================
- Coverage     28.37%   28.29%   -0.09%     
  Complexity       98       98              
============================================
  Files           617      617              
  Lines         69202    69360     +158     
  Branches         90       90              
============================================
- Hits          19639    19626      -13     
- Misses        47754    47922     +168     
- Partials       1809     1812       +3     
Flag Coverage Δ
golib_unit 52.89% <25.33%> (-0.22%) ⬇️
grove_unit 4.60% <ø> (ø)
t3c_generate_unit 24.96% <ø> (ø)
traffic_monitor_unit 20.43% <ø> (ø)
traffic_ops_integration 69.41% <ø> (-0.31%) ⬇️
traffic_ops_unit 19.75% <12.20%> (-0.07%) ⬇️
traffic_stats_unit 10.41% <ø> (ø)
v3 57.68% <ø> (ø)
v4 79.65% <ø> (ø)
v5 78.53% <ø> (-1.10%) ⬇️

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

Impacted Files Coverage Δ
...affic_ops_golang/deliveryservice/request/assign.go 10.52% <0.00%> (-0.26%) ⬇️
...fic_ops_golang/deliveryservice/request/requests.go 0.00% <0.00%> (ø)
...affic_ops_golang/deliveryservice/request/status.go 0.00% <0.00%> (ø)
...fic_ops_golang/deliveryservice/request/validate.go 0.00% <0.00%> (ø)
...fic_ops_golang/server/servers_server_capability.go 0.00% <0.00%> (ø)
...ffic_ops/traffic_ops_golang/topology/topologies.go 0.00% <0.00%> (ø)
...fic_ops_golang/deliveryservice/deliveryservices.go 11.06% <1.26%> (-0.23%) ⬇️
traffic_ops/traffic_ops_golang/server/servers.go 18.06% <11.11%> (+0.01%) ⬆️
lib/go-tc/deliveryservice_requests.go 40.86% <15.15%> (-4.10%) ⬇️
...fic_ops/traffic_ops_golang/dbhelpers/db_helpers.go 14.29% <15.38%> (+0.03%) ⬆️
... and 13 more

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

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.

I think this should have removed deliveryservices_required_capabilities from API v5 but it doesn't appear to have done that.

Comment thread CHANGELOG.md Outdated
Comment thread docs/source/api/v4/deliveryservices.rst Outdated
Comment thread docs/source/api/v4/deliveryservices.rst Outdated
Comment thread docs/source/api/v4/deliveryservices.rst Outdated
Comment thread docs/source/api/v4/deliveryservices_id.rst Outdated
Comment thread traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go Outdated
Comment thread traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go Outdated
Comment thread traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go Outdated
Comment thread traffic_ops/traffic_ops_golang/server/servers.go Outdated
Comment thread docs/source/api/v3/deliveryservices_required_capabilities.rst Outdated
Comment thread lib/go-tc/deliveryservices.go
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.

This now removes deliveryservices_required_capabilities, but doesn't update the documentation to reflect that.

The new field of a Delivery Service should also be represented in the Delivery Service Overview section.

Comment thread docs/source/api/v4/deliveryservices.rst Outdated
Comment thread docs/source/api/v4/deliveryservices.rst Outdated
Comment thread docs/source/api/v4/deliveryservices.rst Outdated
Comment thread docs/source/api/v4/deliveryservices_id.rst Outdated
Comment thread docs/source/api/v4/deliveryservices_id.rst Outdated
Comment thread lib/go-tc/deliveryservices.go Outdated
Comment thread lib/go-tc/deliveryservices.go Outdated
Comment thread lib/go-tc/deliveryservice_requests.go Outdated
Comment thread traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go Outdated
Comment thread traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go Outdated
Comment thread traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go
Comment thread traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go Outdated
Comment thread traffic_ops/traffic_ops_golang/server/servers.go Outdated
@ocket8888
Copy link
Copy Markdown
Contributor

needs conflict resolution to run GHA

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.

LGTM

@ocket8888 ocket8888 merged commit df422c9 into apache:master Dec 14, 2022
@rimashah25 rimashah25 added this to the 8.0.0 milestone Jul 18, 2023
@zrhoffman
Copy link
Copy Markdown
Member

zrhoffman commented Sep 13, 2023

@srijeet0406 TestDeliveryServicesRequiredCapabilities is entirely commented out

//func TestDeliveryServicesRequiredCapabilities(t *testing.T) {
// WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, ServerCapabilities, Topologies, ServiceCategories, DeliveryServices, DeliveryServiceServerAssignments, ServerServerCapabilities, DeliveryServicesRequiredCapabilities}, func() {
//
// currentTime := time.Now().UTC().Add(-15 * time.Second)

Also, the API tests still try to create and delete DS required capabilities.

See #7801

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

high impact impacts the basic function, deployment, or operation of a CDN tech debt rework due to choosing easy/limited solution 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.

4 participants