-
Notifications
You must be signed in to change notification settings - Fork 31
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
Combine create api with provision api by adding a provision param #282
Combine create api with provision api by adding a provision param #282
Conversation
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Do we not have a dry_run optional param at all anymore? |
What's the benefit of keeping the dry_run parameter? provision covers all the check dry_run does. Also as this project is not launched yet, this is not a breaking change. |
Dry run param in the create workflow API should remain unchanged. This is to allow for validation prior to saving into the global context index. Combining the two APIs together should just add a new path rather than supersede existing ones. Though provision does validate as well, since we're combining the two it would make sense to validate on create (before we index) rather than after. I would suggest we invoke the |
Are you suggesting when |
Yes |
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
src/main/java/org/opensearch/flowframework/rest/RestCreateWorkflowAction.java
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/rest/RestCreateWorkflowAction.java
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/transport/WorkflowRequest.java
Show resolved
Hide resolved
src/test/java/org/opensearch/flowframework/transport/CreateWorkflowTransportActionTests.java
Show resolved
Hide resolved
I may be misunderstanding dryrun or maybe it's poorly named. Dry run usually means do validation checks but don't actually index anything. So my thoughts would be:
Does it mean something else than that? |
@dbwiddis currently when we dry-run, if the template passes validation, then we index, if not then we return an error |
My understanding of all the conditions is:
I think no matter how customer mix&match these two parameters, they should all be legal. The PROPOSAL: We retain both the dryRun and provision parameters, allowing customers to mix and match them as they wish. |
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Agreed with this proposal |
I'm ok with this except that it doesn't match my understanding of the term "dryRun". For example in AD the "create detector" with dryRun does not actually create a detector (actually it's just a variable but it corresponds to validating). So if we're going this way let's use "validate" rather than dry run. |
Other opensearch use of dryrun: https://opensearch.org/docs/latest/observing-your-data/alerting/api/
Use of validate: https://opensearch.org/docs/latest/observing-your-data/ad/api/
Use of validate: https://opensearch.org/docs/latest/im-plugin/ism/error-prevention/api/
|
When dryRun is set to true, we proceed with indexing only if it passes the validation check - this is the current design of the create workflow API. If we think it's necessary to revise the design of the create workflow API, I can open a separate issue for this matter. |
I'm fine with this, I'm just quibbling over using the term "dryRun" (used only once in the opensearch API) vs. "validate" used many times and much more clear on what's happening. |
Let's the continue the discussion in this issue - #291 |
src/main/java/org/opensearch/flowframework/transport/CreateWorkflowTransportAction.java
Show resolved
Hide resolved
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, one very minor comment only
68817bf
into
opensearch-project:feature/agent_framework
…ensearch-project#282) * replace dryrun parameter with provision in create workflow Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * Combine create api with provision api by adding a provision param Signed-off-by: Jackie Han <jkhanjob@gmail.com> * cleanup Signed-off-by: Jackie Han <jkhanjob@gmail.com> * keep dryrun option in create workflow Signed-off-by: Jackie Han <jkhanjob@gmail.com> * cleanup Signed-off-by: Jackie Han <jkhanjob@gmail.com> * keep both dryRun and provision parameter Signed-off-by: Jackie Han <jkhanjob@gmail.com> --------- Signed-off-by: Jackie Han <jkhanjob@gmail.com>
…ensearch-project#282) * replace dryrun parameter with provision in create workflow Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * Combine create api with provision api by adding a provision param Signed-off-by: Jackie Han <jkhanjob@gmail.com> * cleanup Signed-off-by: Jackie Han <jkhanjob@gmail.com> * keep dryrun option in create workflow Signed-off-by: Jackie Han <jkhanjob@gmail.com> * cleanup Signed-off-by: Jackie Han <jkhanjob@gmail.com> * keep both dryRun and provision parameter Signed-off-by: Jackie Han <jkhanjob@gmail.com> --------- Signed-off-by: Jackie Han <jkhanjob@gmail.com>
…ensearch-project#282) * replace dryrun parameter with provision in create workflow Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * Combine create api with provision api by adding a provision param Signed-off-by: Jackie Han <jkhanjob@gmail.com> * cleanup Signed-off-by: Jackie Han <jkhanjob@gmail.com> * keep dryrun option in create workflow Signed-off-by: Jackie Han <jkhanjob@gmail.com> * cleanup Signed-off-by: Jackie Han <jkhanjob@gmail.com> * keep both dryRun and provision parameter Signed-off-by: Jackie Han <jkhanjob@gmail.com> --------- Signed-off-by: Jackie Han <jkhanjob@gmail.com>
…ensearch-project#282) * replace dryrun parameter with provision in create workflow Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * Combine create api with provision api by adding a provision param Signed-off-by: Jackie Han <jkhanjob@gmail.com> * cleanup Signed-off-by: Jackie Han <jkhanjob@gmail.com> * keep dryrun option in create workflow Signed-off-by: Jackie Han <jkhanjob@gmail.com> * cleanup Signed-off-by: Jackie Han <jkhanjob@gmail.com> * keep both dryRun and provision parameter Signed-off-by: Jackie Han <jkhanjob@gmail.com> --------- Signed-off-by: Jackie Han <jkhanjob@gmail.com>
* replace dryrun parameter with provision in create workflow Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * Combine create api with provision api by adding a provision param Signed-off-by: Jackie Han <jkhanjob@gmail.com> * cleanup Signed-off-by: Jackie Han <jkhanjob@gmail.com> * keep dryrun option in create workflow Signed-off-by: Jackie Han <jkhanjob@gmail.com> * cleanup Signed-off-by: Jackie Han <jkhanjob@gmail.com> * keep both dryRun and provision parameter Signed-off-by: Jackie Han <jkhanjob@gmail.com> --------- Signed-off-by: Jackie Han <jkhanjob@gmail.com>
…ensearch-project#282) * replace dryrun parameter with provision in create workflow Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * Combine create api with provision api by adding a provision param Signed-off-by: Jackie Han <jkhanjob@gmail.com> * cleanup Signed-off-by: Jackie Han <jkhanjob@gmail.com> * keep dryrun option in create workflow Signed-off-by: Jackie Han <jkhanjob@gmail.com> * cleanup Signed-off-by: Jackie Han <jkhanjob@gmail.com> * keep both dryRun and provision parameter Signed-off-by: Jackie Han <jkhanjob@gmail.com> --------- Signed-off-by: Jackie Han <jkhanjob@gmail.com>
* replace dryrun parameter with provision in create workflow Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * test Signed-off-by: Jackie Han <jkhanjob@gmail.com> * Combine create api with provision api by adding a provision param Signed-off-by: Jackie Han <jkhanjob@gmail.com> * cleanup Signed-off-by: Jackie Han <jkhanjob@gmail.com> * keep dryrun option in create workflow Signed-off-by: Jackie Han <jkhanjob@gmail.com> * cleanup Signed-off-by: Jackie Han <jkhanjob@gmail.com> * keep both dryRun and provision parameter Signed-off-by: Jackie Han <jkhanjob@gmail.com> --------- Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Description
Combine create api with provision api by adding a provision=true parameter to create api
Issues Resolved
#259
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.