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

re-enabled cancel or terminate lock info pids via masu #4443

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cgoodfred
Copy link
Contributor

@cgoodfred cgoodfred commented Jun 9, 2023

Jira Ticket

COST-4441

Description

This change will enable the functionality to cancel/terminate PIDs via the masu db performance endpoints.

Testing

  1. Checkout Branch
  2. Create a source or two, doesn't need data, just to exist so make create-test-customer is fine.
  3. Visit the lock-info db-performance page and verify there are no locks: http://localhost:5042/api/cost-management/v1/db-performance/lock-info/
  4. Open a PSQL window to run a little SQL in and run the following:
BEGIN;
UPDATE public.api_provider SET paused = false;
  1. Go to the sources endpoint (http://localhost:8000/api/cost-management/v1/sources/) and decide on a source to try and delete, trigger a delete on that source.
  2. Go back to the lock-info page and see information on a deadlock showing.
  3. Cancel the PID for the source delete using the provided button after clicking through the verification prompts.
  4. The page should refresh and the block should be cleared. The source delete page will now show information about being cancelled due to user request:
"Source removal resulted in UNKNOWN error: OperationalError: canceling statement due to user request\nCONTEXT:  while deleting tuple (0,6) in relation \"api_provider\"\n"

Notes

...

@cgoodfred cgoodfred self-assigned this Jun 9, 2023
@codecov
Copy link

codecov bot commented Jun 9, 2023

Codecov Report

Merging #4443 (510afd6) into main (eb10a9a) will decrease coverage by 0.1%.
Report is 271 commits behind head on main.
The diff coverage is 33.3%.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #4443     +/-   ##
=======================================
- Coverage   95.9%   95.8%   -0.1%     
=======================================
  Files        699     699             
  Lines      71884   71950     +66     
  Branches    5778    5787      +9     
=======================================
+ Hits       68905   68924     +19     
- Misses      1996    2038     +42     
- Partials     983     988      +5     

@cgoodfred cgoodfred added the smoke-tests pr_check will build the image and run minimal required smokes label Jun 12, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jun 12, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability B 1 Vulnerability
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

33.3% 33.3% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
smoke-tests pr_check will build the image and run minimal required smokes smokes-required
Projects
None yet
1 participant