Skip to content

feat(workflow_engine): Add DELETE Workflow Endpoint #86246

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

Merged
merged 6 commits into from
Mar 4, 2025

Conversation

saponifi3d
Copy link
Contributor

Description

PR to add support for DELETE method on workflows. This will schedule the deletion and use the safe workflow delete to ensure all subsequent models are also cleaned up.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 3, 2025
@saponifi3d saponifi3d marked this pull request as ready for review March 3, 2025 23:28
@saponifi3d saponifi3d requested a review from a team as a code owner March 3, 2025 23:28
Copy link
Member

@cathteng cathteng left a comment

Choose a reason for hiding this comment

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

not totally related to this PR, but should we update the permissions for this endpoint? i think currently the base OrganizationEndpoint permissions apply

class OrganizationPermission(DemoSafePermission):
scope_map = {
"GET": ["org:read", "org:write", "org:admin"],
"POST": ["org:write", "org:admin"],
"PUT": ["org:write", "org:admin"],
"DELETE": ["org:admin"],
}

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

Attention: Patch coverage is 98.36066% with 1 line in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
..._engine/endpoints/organization_workflow_details.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #86246    +/-   ##
========================================
  Coverage   87.88%   87.88%            
========================================
  Files        9712     9714     +2     
  Lines      550704   550948   +244     
  Branches    21446    21446            
========================================
+ Hits       483983   484222   +239     
- Misses      66341    66346     +5     
  Partials      380      380            

@@ -589,23 +589,23 @@
default_manager.add(
AuditLogEvent(
event_id=213,
name="WORFKLOW_ADD",
name="WORKFLOW_ADD",
Copy link
Member

Choose a reason for hiding this comment

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

lol did I do this??

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hahah - yeah -- i was shocked!

@saponifi3d
Copy link
Contributor Author

@cathteng agree about your callout and thanks for the shout, i'm kinda punting on permissions for a hot sec to get the API out for UI development. once i'm done with the basic APIs, i'm going to go back and add filtering / permissions and make sure everything is creating an audit entry too.

@saponifi3d saponifi3d merged commit c2f1693 into master Mar 4, 2025
50 checks passed
@saponifi3d saponifi3d deleted the jcallender/aci/api-delete-workflows branch March 4, 2025 00:49
jan-auer added a commit that referenced this pull request Mar 4, 2025
* master: (50 commits)
  fix(laravel-insights): fix seconds vs milliseconds in jobs widget (#86273)
  feat(assemble): Implement new query for finding missing chunk (#85614)
  fix(issue-views): Fix buggy dragging  (#86264)
  feat(workflow_engine): Add DELETE Workflow Endpoint (#86246)
  feat(crons): Improve wording for project field in validator (#86158)
  ref(ui): Remove unused images (#86249)
  feat(compare queries): tightened padding, added tooltips, and fixed panel heights (#86227)
  fix(billing): update billing details tab (#86152)
  fix(nav): Show same nav items when user is in org or user settings. (#86161)
  feat(ourlogs): Add alpha js sdk for adding logging (#86239)
  chore(dashboards): Remove chart from Releases drawer (#86237)
  ref(flags): fix audit log table badge style (#86224)
  fix(replay): Remove extra border & padding from replay snippets (#86223)
  ref(insights): remove performance-landing-page-stats-period flag (#86200)
  fix(insights): Filter span samples by environment (#86198)
  ref(insights): Replace usage of `<ReleaseSeries>` in `<InsightsTimeSeriesWidget>` (#86129)
  feat(explore): Hide Confidence footer with 100% sample rate (#86206)
  ref(dashboards): Move unit scaling into `Plottable` (#86116)
  tests(derived_code_mappings): Do not create object in parametrization section (#86188)
  chore: update gsApp CODEOWNERS  (#86222)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants