Skip to content

add cancel all button to dashboard#1455

Open
MattShirley wants to merge 13 commits into
developfrom
1296-add-cancel-all-button-to-dashboard
Open

add cancel all button to dashboard#1455
MattShirley wants to merge 13 commits into
developfrom
1296-add-cancel-all-button-to-dashboard

Conversation

@MattShirley
Copy link
Copy Markdown
Collaborator

@MattShirley MattShirley commented May 21, 2026

Adds Cancel All button to the Dashboard when ENABLE_AUTH=True. This will cancel all active transformations based upon the existing individual Cancel logic.

When ENABLE_AUTH=False, the button is not present and the route returns 400.

@MattShirley MattShirley linked an issue May 21, 2026 that may be closed by this pull request
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.70%. Comparing base (f835d12) to head (cf757ed).

Files with missing lines Patch % Lines
servicex_app/servicex_app/models.py 33.33% 12 Missing ⚠️
...ervicex_app/resources/transformation/cancel_all.py 93.54% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1455      +/-   ##
===========================================
- Coverage    88.94%   88.70%   -0.24%     
===========================================
  Files          103      104       +1     
  Lines         3689     3736      +47     
  Branches       453      457       +4     
===========================================
+ Hits          3281     3314      +33     
- Misses         333      346      +13     
- Partials        75       76       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MattShirley MattShirley marked this pull request as ready for review May 21, 2026 22:09
def get(self):
if current_app.config.get("ENABLE_AUTH"):
user = self.get_requesting_user()
user_id = user.id if user is not None else None
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

How does the None case propagate?

if current_app.config.get("ENABLE_AUTH"):
user = self.get_requesting_user()
user_id = user.id if user is not None else None
transform_reqs = TransformRequest.query.filter(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I feel Ben always likes these to be added to the model class so they can be reused easily

namespace = current_app.config["TRANSFORMER_NAMESPACE"]
for transform_req in transform_reqs:
request_id = transform_req.request_id
if transform_req.status in (
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Possible race condition if something moves from pending_lookup to running before cancellation?

cls.transformer_manager = transformer_manager

@auth_required
def get(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not to be "that guy", but this should be a POST and not a GET since it is taking an action...

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah you're right, I copied the pattern from the existing cancel route.

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.

Add Cancel All Button to Dashboard

3 participants