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

Adding CDN lock check for invalidation jobs #7441

Merged
merged 2 commits into from
Apr 12, 2023

Conversation

srijeet0406
Copy link
Contributor

This PR is not related to any issue. It makes sure that is a user has a hard lock on a CDN, no other user can create invalidation jobs on that CDN.


Which Traffic Control components are affected by this PR?

  • Traffic Ops

What is the best way to verify this PR?

Run TO and TP.
As user A, hard lock a CDN
As user B, login and try to create an invalidation job on the same CDN
Make sure that the request fails

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

  • master

PR submission checklist

@codecov
Copy link

codecov bot commented Apr 11, 2023

Codecov Report

Merging #7441 (3ca7bed) into master (096ef2a) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master    #7441      +/-   ##
============================================
- Coverage     29.22%   29.22%   -0.01%     
  Complexity       98       98              
============================================
  Files           781      781              
  Lines         81527    81537      +10     
  Branches        779      779              
============================================
  Hits          23826    23826              
- Misses        55653    55663      +10     
  Partials       2048     2048              
Flag Coverage Δ
golib_unit 48.40% <ø> (ø)
grove_unit 4.60% <ø> (ø)
t3c_unit 5.32% <ø> (ø)
traffic_monitor_unit 21.28% <ø> (ø)
traffic_ops_integration 69.42% <ø> (ø)
traffic_ops_unit 22.71% <0.00%> (-0.01%) ⬇️
traffic_portal_v2 64.24% <ø> (ø)
traffic_stats_unit 10.14% <ø> (ø)
unit_tests 26.16% <0.00%> (-0.01%) ⬇️
v3 57.79% <ø> (ø)
v4 79.18% <ø> (ø)
v5 78.63% <ø> (ø)

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

Impacted Files Coverage Δ
...ic_ops_golang/invalidationjobs/invalidationjobs.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.

Code changes LGTM
Tested on local: Hard Locked a CDN as an admin user, logged in as an ops user and tried invalidate content but the lock prevented to do so.

@rimashah25 rimashah25 merged commit 013adb5 into apache:master Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants