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

Conversation

@jagan-parthiban
Copy link
Contributor

@jagan-parthiban jagan-parthiban commented Mar 8, 2023

Fixes #7130


Which Traffic Control components are affected by this PR?

  • Traffic Ops

What is the best way to verify this PR?

Run a /POST call to /api/4.0/service_categories" and confirm that success response includes name. As well ensure existing functionality (CRUDER, eg: /server_capabiilities ) still works as intended.

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

7.0.1

PR submission checklist

Updated GenericCreateNameBasedID in api/generic_crud.go and used it in Create() function traffic_ops_golang/servicecategory.go
…ories while not breaking other functionalities that existed earlier.
@jagan-parthiban jagan-parthiban changed the title Bug/7130 - Fixes service_categories response to POST API #7130 - Fixes service_categories response to POST API Mar 8, 2023
@jagan-parthiban jagan-parthiban changed the title #7130 - Fixes service_categories response to POST API Fixes service_categories response to POST API - https://github.com/apache/trafficcontrol/issues/7130 Mar 8, 2023
@jagan-parthiban jagan-parthiban changed the title Fixes service_categories response to POST API - https://github.com/apache/trafficcontrol/issues/7130 bug/7130 - Fixes service_categories response to POST API Mar 8, 2023
@ocket8888 ocket8888 changed the title bug/7130 - Fixes service_categories response to POST API Fixes service_categories response to POST API Mar 8, 2023
@jagan-parthiban jagan-parthiban marked this pull request as ready for review March 10, 2023 19:06
@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

Merging #7383 (7ebfa19) into master (b8159ab) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master    #7383      +/-   ##
============================================
- Coverage     26.12%   26.11%   -0.01%     
  Complexity       98       98              
============================================
  Files           648      648              
  Lines         76280    76293      +13     
  Branches         90       90              
============================================
  Hits          19925    19925              
- Misses        54520    54533      +13     
  Partials       1835     1835              
Flag Coverage Δ
golib_unit 52.47% <ø> (ø)
grove_unit 4.60% <ø> (ø)
t3c_unit 5.33% <ø> (ø)
traffic_monitor_unit 20.43% <ø> (ø)
traffic_ops_integration 69.34% <ø> (ø)
traffic_ops_unit 19.69% <0.00%> (-0.01%) ⬇️
traffic_stats_unit 10.14% <ø> (ø)
unit_tests 22.55% <0.00%> (-0.01%) ⬇️
v3 57.79% <ø> (ø)
v4 79.09% <ø> (ø)
v5 78.53% <ø> (ø)

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

Impacted Files Coverage Δ
traffic_ops/traffic_ops_golang/api/generic_crud.go 16.83% <0.00%> (-1.16%) ⬇️
...ic_ops_golang/servicecategory/servicecategories.go 0.00% <0.00%> (ø)

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

Copy link
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.

LGTM. Tested it on local and see the actual name in alert response.

@rimashah25 rimashah25 merged commit 5b1fa0b into apache:master Mar 10, 2023
@jagan-parthiban jagan-parthiban deleted the bug/7130 branch May 20, 2023 04:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

POST to service_categories returns blank name

2 participants