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

feat(workflow_engine): workflow and action serializers #83146

Merged
merged 10 commits into from
Jan 13, 2025

Conversation

mifu67
Copy link
Contributor

@mifu67 mifu67 commented Jan 9, 2025

Implement the serializer for the Action and Workflow APIs. I'm thinking that I will make a separate PR to alphabetize these serializers after this merges.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 9, 2025
@mifu67 mifu67 changed the title feat(workflow_engine): action serializer feat(workflow_engine): workflow-related serializers Jan 9, 2025
@mifu67 mifu67 changed the title feat(workflow_engine): workflow-related serializers feat(workflow_engine): workflow and action serializers Jan 9, 2025
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #83146      +/-   ##
==========================================
- Coverage   87.58%   87.57%   -0.01%     
==========================================
  Files        9438     9450      +12     
  Lines      536582   537373     +791     
  Branches    21115    21115              
==========================================
+ Hits       469948   470612     +664     
- Misses      66275    66402     +127     
  Partials      359      359              

@mifu67 mifu67 marked this pull request as ready for review January 9, 2025 22:45
@mifu67 mifu67 requested a review from a team as a code owner January 9, 2025 22:46
return attrs

def serialize(self, obj: Workflow, attrs: Mapping[str, Any], user, **kwargs) -> dict[str, Any]:
# WHAT TO DO ABOUT CONFIG?
Copy link
Member

Choose a reason for hiding this comment

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

This is a good question 🤔 Cathy added enforcement of the schemas in https://github.com/getsentry/sentry/pull/81979/files and I was working on defining a schema for the detector config here that I need to get back to but we haven't made others yet afaik. Wanna bring it up in office hours tomorrow?

Copy link
Contributor

@saponifi3d saponifi3d left a comment

Choose a reason for hiding this comment

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

haven't quite been able to finish reviewing (not 100% sure about where you'd want to handle the workflow actions, for example. for that you'll probably want to do some research around validators to see the best practices), but wanted to make sure you had this feedback sooner rather than later.

src/sentry/workflow_engine/endpoints/serializers.py Outdated Show resolved Hide resolved
src/sentry/workflow_engine/endpoints/serializers.py Outdated Show resolved Hide resolved
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the feedback! From a frontend API consumer perspective, this looks good.

@mifu67 mifu67 merged commit d9418b3 into master Jan 13, 2025
49 checks passed
@mifu67 mifu67 deleted the mifu67/aci/workflow-serializers branch January 13, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants