-
Notifications
You must be signed in to change notification settings - Fork 37
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
[FEATURE] Support editing of certain workflow fields on a provisioned workflow #749
Comments
The Update Document API easily allows key-by-key replacement. Or we can just upsert the whole document after parsing it ourselves as I did in #631. |
PR #757 adds these fields: /** Fields which may be updated in the template even if provisioned */
private static final Set<String> UPDATE_FIELD_ALLOWLIST = Set.of(
NAME_FIELD,
DESCRIPTION_FIELD,
USE_CASE_FIELD,
VERSION_FIELD,
UI_METADATA_FIELD
); This is essentially the whole Template except for the Workflow field and the auto-generated timestamps, and none of these fields impact the provisioning. |
@dbwiddis can you please share doc issue created for this feature? |
It is linked in the linked PR #757 : opensearch-project/documentation-website#7632 |
ahh my bad. thank you |
we need to first create a doc issue for the same and link it to it. That's how doc team track. Just FYI |
Ah, haven't done that for any of the earlier features, will take care of that. |
Currently, the update API will not execute on a workflow that is not in
NOT_STARTED
state (has been provisioned, failed during provision, is currently provisioning, etc.). This prevents losing track of created resources, and enforcing deprovision will work as expected.The current logic is simplified, and blanket denies any proposed update, even for trivial fields like
name
orui_metadata
. This prevents users from updating these things on a provisioned workflow, even if their goal is to not change the critical parts of the workflow template.Additionally, on the frontend, a desired capability is updating a frontend configuration (which may be incomplete or in-progress) on some provisioned workflow, as a "lightweight" save. All of the frontend configuration is stored under
ui_metadata
. This may be done manually by the users, and/or in a scheduled way, such as autosaving. These save scenarios we want to be able to do at any point, without disrupting what may be currently deployed. Only when users want to run actual functionalities against the workflow (ingest/search/export) do we want to update the underlying template and perform the deeper deprovision/reprovision.One proposal is allowing specific fields in the workflow schema to be allowed to be updated, at the REST level of the update API. I could see a few options for how the interface may look:
Option 1. Using the existing update API and passing in the entire workflow configuration, and letting the backend perform a diff and determine that based on the changed fields and the state of the workflow, if the update is allowed or not
Option 2. Allowing users to only specify the fields they want to update in the API body, something like:
The text was updated successfully, but these errors were encountered: