Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TO API v5 routes should not use priv levels anymore #7819

Merged

Conversation

srijeet0406
Copy link
Contributor

This PR is not related to any issue. It makes sure that api v5 routes in traffic ops are no longer using privLevel comparisons.


Which Traffic Control components are affected by this PR?

  • Traffic Ops

What is the best way to verify this PR?

Make sure all unit/ e2e tests pass.
5.0 routes should still work as expected, with capabilities being honored, instead of the privilege levels.

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

  • master

PR submission checklist

@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #7819 (b08ebb7) into master (5c1d852) will increase coverage by 2.95%.
Report is 4 commits behind head on master.
The diff coverage is 32.60%.

@@             Coverage Diff              @@
##             master    #7819      +/-   ##
============================================
+ Coverage     28.93%   31.89%   +2.95%     
  Complexity       98       98              
============================================
  Files           602      719     +117     
  Lines         77379    82789    +5410     
  Branches         90      970     +880     
============================================
+ Hits          22392    26408    +4016     
- Misses        52890    54215    +1325     
- Partials       2097     2166      +69     
Flag Coverage Δ
golib_unit 53.85% <ø> (+0.01%) ⬆️
grove_unit 12.02% <ø> (ø)
t3c_unit 5.91% <ø> (ø)
traffic_monitor_unit 26.44% <ø> (ø)
traffic_ops_integration 69.42% <ø> (ø)
traffic_ops_unit 21.63% <32.60%> (+0.01%) ⬆️
traffic_portal_v2 74.37% <ø> (?)
traffic_stats_unit 10.78% <ø> (ø)
unit_tests 29.22% <32.60%> (+3.45%) ⬆️
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 Coverage Δ
lib/go-tc/constants.go 66.66% <ø> (ø)
traffic_ops/traffic_ops_golang/cdni/shared.go 0.00% <0.00%> (ø)
traffic_ops/traffic_ops_golang/server/servers.go 27.36% <0.00%> (ø)
...ffic_ops_golang/deliveryservice/servers/servers.go 31.46% <69.23%> (+0.57%) ⬆️
...raffic_ops/traffic_ops_golang/cdn_lock/cdn_lock.go 0.00% <0.00%> (ø)
traffic_ops/traffic_ops_golang/profile/profiles.go 18.14% <38.46%> (+0.74%) ⬆️
...c_ops/traffic_ops_golang/systeminfo/system_info.go 47.72% <10.00%> (-9.03%) ⬇️

... and 120 files with indirect coverage changes

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

@ocket8888 ocket8888 added Traffic Ops related to Traffic Ops bug something isn't working as intended low impact affects only a small portion of a CDN, and cannot itself break one labels Sep 27, 2023
lib/go-tc/constants.go Outdated Show resolved Hide resolved
@zrhoffman zrhoffman added the permissions Dealing with roles/permissions/tenancy label Sep 28, 2023
Copy link
Member

@zrhoffman zrhoffman left a comment

Choose a reason for hiding this comment

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

Looks good! I'll merge once tests pass.

@zrhoffman zrhoffman merged commit 5081509 into apache:master Sep 28, 2023
44 checks passed
rimashah25 pushed a commit that referenced this pull request Oct 3, 2023
* TO API v5 routes should not use priv levels anymore

* add changelog

* fix tests, cleanup

* remove commented out code

* code review

* rename perm constants

(cherry picked from commit 5081509)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working as intended low impact affects only a small portion of a CDN, and cannot itself break one permissions Dealing with roles/permissions/tenancy Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants