-
Notifications
You must be signed in to change notification settings - Fork 61
Add createworkflow failure proto #minor #331
Conversation
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
@katrogan Would you mind taking a look at this? If it looks good to you, would you mind helping me compile the protobufs? This is out of my wheelhouse unfortunately 😞 |
protos/flyteidl/core/workflow.proto
Outdated
|
||
// The workflow id is already used and the structure is different | ||
message WorkflowErrorExistsDifferentStructure { | ||
string id = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use the workflow identifier, like here: https://github.com/flyteorg/flyteidl/blob/master/protos/flyteidl/admin/workflow.proto#L16
protos/flyteidl/core/workflow.proto
Outdated
} | ||
|
||
// The workflow id is already used with an identical sctructure | ||
message WorkflowErrorExistsIdenticalStructure { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we need this message since we return a different gRPC status code (AlreadyExists) for this scenario
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although perhaps it would be nice to keep this to include the existing workflow id 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @jerempy thanks for opening this! can you try these instructions for generating proto code and let me know if that works for you?
Hey there, I did try that and had difficulties. It looks dated since there is no "download_tooling" in the makefile. I tried looking at different things in the make file and couldn't figure out what I was missing. Any other ideas? |
@katrogan thanks for all the input! I updated the type for the id - good spotting that! When trying to run
I tried running the .sh scripts directy and that didn't turn out so good. Wanted to delete 1200 files as a result 😨 |
hey @jerempy do you mind filing an issue dumping what you ran into? I'm sorry this process doesn't work out of the box :( I can help you with the generation for now. But in the meantime, could I ask you to move the new proto message definitions to the admin workflow proto def: https://github.com/flyteorg/flyteidl/blob/master/protos/flyteidl/admin/workflow.proto rather than the core one you've defined them in now? |
Signed-off-by: jerempy <[email protected]>
Signed-off-by: jerempy <[email protected]>
Signed-off-by: jerempy <[email protected]>
@katrogan ok great. thanks much for your help! and good spottin on the location - I moved it. Thanks! 🙏 |
Signed-off-by: Katrina Rogan <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #331 +/- ##
=======================================
Coverage 75.57% 75.57%
=======================================
Files 18 18
Lines 1171 1171
=======================================
Hits 885 885
Misses 235 235
Partials 51 51
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking on that work! Mind linking to an issue too?
} | ||
|
||
// When a CreateWorkflowRequest failes due to matching id | ||
message CreateWorkflowFailureReason { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do the same for tasks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we do that in a seperate issue/ pr series? I can make the issue for it as a follow up after finishing this one if you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be awesome!
|
||
// The workflow id is already used and the structure is different | ||
message WorkflowErrorExistsDifferentStructure { | ||
core.Identifier id = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we include the structure of the other workflow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current plan was to return the id of the workflow to the sdk client and then to get the workflow and as part of the exception handling to then compare the diff with the initial request
} | ||
|
||
// When a CreateWorkflowRequest failes due to matching id | ||
message CreateWorkflowFailureReason { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be awesome!
Congrats on merging your first pull request! 🎉 |
TL;DR
Adds createworkflow failure proto. This is for more concrete return values when a workflow fails to get created.
For context: flyteorg/flyteadmin#487 (comment)
Type
Are all requirements met?
Complete description
How did you fix the bug, make the feature etc. Link to any design docs etc
Tracking Issue
Remove the 'fixes' keyword if there will be multiple PRs to fix the linked issue
flyteorg/flyte#2522
Follow-up issue
NA
OR
https://github.com/flyteorg/flyte/issues/