-
Notifications
You must be signed in to change notification settings - Fork 62
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
Complete API spec implementation for flow_framework #565
Conversation
Signed-off-by: Junwei Dai <[email protected]>
2. Adding Test for this API Signed-off-by: Junwei Dai <[email protected]>
2. Adding Test for this API Signed-off-by: Junwei Dai <[email protected]>
2. Adding Test for this API Signed-off-by: Junwei Dai <[email protected]>
2. Adding Test for this API Signed-off-by: Junwei Dai <[email protected]>
2. Adding Test for this API Signed-off-by: Junwei Dai <[email protected]>
2. Adding Test for this API Signed-off-by: Junwei Dai <[email protected]>
Signed-off-by: Junwei Dai <[email protected]>
@dbwiddis Just finished up the remaining API specs. I'd really appreciate it if you could check it out. Thanks! |
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.
LGTM from a Flow Framework API perspective! A few documentation nits/suggestions.
Did not review the technical details of the openapi spec.
properties: | ||
error: | ||
type: string | ||
description: Error message when a duplicate key is found in the request. |
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.
Not sure "duplicate key" is self-descriptive here. Is this a duplicate param, or a duplicate field in the body JSON?
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.
Because we can pass it as a query parameter or as a string value of a request body field
The error message is this. I naming DuplicateKeyError
by the error message, should i change it ?
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.
This looks correct to me, should match the code.
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.
For now as @dblock says it's ok to match the code. The error message should probably be "duplicate param" but not a big deal to leave it as is. If you get the message you'll know what you did wrong. Whoever wrote that code should have thought better. ;)
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.
Looks good. Will leave it unmerged to address various comments.
Consider breaking up the workflow test into workflow/privision.yaml, deprovision.yaml, etc. We are going to use these tests to provide samples for the documentation and users will be mostly looking to copy-paste examples to "privision a workflow" - it gets messy when there's too much going on and often setup may become unrelated (to deprovision a workflow you should have one privisioned in a prologue).
status: 200 | ||
- synopsis: Delete workflow With Wrong 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.
- synopsis: Delete workflow With Wrong ID. | |
- synopsis: Delete workflow using an invalid 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.
You don't like my suggestion? :)
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.
@dblock Sorry about that! I used GitHub's signoff and commit suggestion feature for that commit, so I did it directly on the page. The other changes are committed locally, but I haven't pushed them yet since I'm still working on the tests. I'll let you know once everything's done!
Changes AnalysisCommit SHA: 7c76787 API ChangesSummary
ReportThe full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/10818912020/artifacts/1921589083 API Coverage
|
Looks like some legit test failures, might need to update the build ref in the CI.
|
These seem reversed. POST ends at |
Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]> Signed-off-by: Junwei Dai <[email protected]>
Signed-off-by: Junwei Dai <[email protected]>
Signed-off-by: Junwei Dai <[email protected]>
@dblock Hey, I just pushed a new version. Please take a look when you get a chance!:) |
Spec Test Coverage Analysis
|
I was also wondering if there's a command that can remove all the empty lines? |
@junweid62 most IDEs can do that for you "On Save". You should look up that feature for the IDE you're using. |
Description
Part of Adding missing API specs #168
API covered in this PR:
/_plugins/_flow_framework/workflow/_steps:
/_plugins/_flow_framework/workflow/_search:
/_plugins/_flow_framework/workflow/state/_search:
/_plugins/_flow_framework/workflow/{workflow_id}/_deprovision:
/_plugins/_flow_framework/workflow/{workflow_id}/_provision:
/_plugins/_flow_framework/workflow/{workflow_id}/_status:
At this point, all FlowFramework APIs are covered
Issues Resolved
Resolved #508
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.