Skip to content

Instantly share code, notes, and snippets.

@bdpiprava
Created September 9, 2019 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdpiprava/8e809d3085eadf198d7b398dbe2eb440 to your computer and use it in GitHub Desktop.
Save bdpiprava/8e809d3085eadf198d7b398dbe2eb440 to your computer and use it in GitHub Desktop.
verify-cp-and-cp
## Placeholder for verifying CP and EP
@bdpiprava
Copy link
Author

Hi All,

We hit a blocker in the verification of the cluster profile and elastic profile. Please take a look at it so that we can discuss it tomorrow.

Verify cluster profile and elastic profile configuration from Review & verify

This will allow a user to verify their CP and EP configuration and get quicker feedback.
However, there is some corner case where we need to decide on. Once a user is on the last step of the (add or edit) elastic agent configurations. He/She can verify the config and -

  1. Reload the page without saving it: On reload of the page the config will be lost but the verification will still be in progress. There is no way for a user to retrieve the same information once the page is reloaded. There is no way for the plugin to realize that the config it is verifying, is no longer exist in the server.

  2. Close the tab: Same as above

Possible fixes

  1. On verification, call generate UUID using CP, EP and linked jobs config. If plugin accepts the verification then the server will store the CP, EP and linked jobs against generated UUID in the in-memory cache. After reloading the page, have a separate section on the SPA where user can see the ongoing unsaved verifications. On click of it, we can restore the wizard with the same data. This means more work :)

    Downside: Server has to keep track of unsaved CP, EP and linked jobs.
    Questions: How long server should keep track of it?

  2. Instead of the verify button, the last step on the wizard will have save & verify button. Which saves the config first and then verifies it. At this point of time if the user reloads the page then it can be retrieved using cluster profile id and elastic profile id as it is save in the config XML.

    Downside: We have to save config which user may have to update if verification fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment