-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[EPM] Update UI to handle package versions and updates #64689
[EPM] Update UI to handle package versions and updates #64689
Conversation
Pinging @elastic/ingest-management (Team:Ingest Management) |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
Can you add instructions how to test all the cases? |
@neptunian What happens if a user will try to upgrade from the API? What are the API calls he has to make? Could you share an example? |
@ruflin It's the same as installing: Those changes were made as part of a different PR where the update and install became idempotent. I was going to add the API restriction where they cannot update to a lower version as part of another PR. |
@skh if you follow the user stories i have above each image, that was intended to be the instructions for testing. what did you have in mind? |
@neptunian Basically, how do I install an outdated package in the first place? Through the API? |
@skh good point. I updated the description with instructions |
@skh after i took screenshots the registry appears to have been updated with nginx version 0.0.2 being added and 1.2.0 removed so wherever you see 1.2.0 use or think of 0.0.2 |
@neptunian We need to rethink the API here. Because someone using the API should not have to figure out first to which version he will upgrade or otherwise have an API endpoint that gives him this information. But let not block yourself on this and move forward with what you have. |
@ruflin we need to change the routes to support this but we could do something like: |
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.
@neptunian Thank you for the updated description!
Works as described, nice job. 👍
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.
Fantastic description with testing instructions and screenshots of user states / flows ✨
I left some comments but nothing too big.
I would like to avoid the new items in PackageAdditions, but we can come back to that later if at all.
Nice work
version, | ||
panel: 'settings', | ||
}); | ||
window.location.href = settingsUrl; |
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 think we should use useHistory
or something besides window
here, but this isn't the only place we do this so not a blocker.
@@ -43,6 +43,7 @@ export function createInstallableFrom<T>( | |||
? { | |||
...from, | |||
status: InstallationStatus.installed, | |||
installedVersion: savedObject.attributes.version, |
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.
Isn't this available already using status and version independently?
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.
Here is an example of a response when you have 0.0.1 installed but GET api/ingest_manager/epm/packages/nginx-0.0.2
. The version
returned is the version you requested. The installedVersion
is the saved object one and the latestVersion
is the latest available. They can all be different. I put them in this endpoint because I didn't want to have to make different requests to get the latest or installed version.
@@ -106,7 +106,7 @@ export async function installPackage(options: { | |||
try { | |||
await deleteKibanaSavedObjectsAssets(savedObjectsClient, installedPkg.attributes.installed); | |||
} catch (err) { | |||
// some assets may not exist if deleting during a failed update | |||
// log these errors, some assets may not exist if deleted during a failed update |
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.
Add logging or a ticket for 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.
I'm not sure what we should be logging. I've created another issue to track it #64814
* link to installed version of detail page * add latestVersion property to EPM get package endpoint * add updates available notices * add update package button * handle various states and send installedVersion from package endpoint * fix type errors * fix install error because not returning promises * track version in state * handle unsuccessful update attempt * remove unused variable
* link to installed version of detail page * add latestVersion property to EPM get package endpoint * add updates available notices * add update package button * handle various states and send installedVersion from package endpoint * fix type errors * fix install error because not returning promises * track version in state * handle unsuccessful update attempt * remove unused variable Co-authored-by: Elastic Machine <[email protected]>
…bana into pipeline-editor-part-mvp-2 * 'feature/ingest-node-pipelines' of github.com:elastic/kibana: (90 commits) remove unused import address review feedback [Ingest pipelines] Cleanup (elastic#64794) [Ingest] Edit datasource UI (elastic#64727) [Lens] Bind all time fields to the time picker (elastic#63874) [Lens] Use suggestion system in chart switcher for subtypes (elastic#64613) Improve alpha messaging (elastic#64692) [Ingest] Allow to enable monitoring of elastic agent (elastic#63598) [Metrics UI] Fix alerting when a filter query is present (elastic#64575) skip flaky suite (elastic#64812) (elastic#64723) [Maps] do not display EMS or kibana layer wizards when not configured (elastic#64554) [Reporting/Test] Convert functional test code to Typescript (elastic#64601) make inserting timestamp with navigate methods optional with default true (elastic#64655) [EPM] Update UI to handle package versions and updates (elastic#64689) Minimize dependencies required by our telemetry middleware (elastic#64665) [Telemetry] oss api tests (elastic#64602) [ML] Adding endpoint capability checks (elastic#64662) Update jest config for coverage (elastic#64648) [SIEM][NP] Fixes bug in ML signals promotion (elastic#64720) share single data plugin bundle (elastic#64549) ...
#64255
Testing instructions:
This scenario where user's have out of date packages in the UI would happen if the user had auto updates turned off which will be the case for alpha but the plan is to make auto updates default.
POST http://localhost:5603/ssg/api/ingest_manager/epm/packages/nginx-0.0.1
User has the most up to date version of package installed
User has out of date version installed
User clicks the "update" button. Uninstall button is hidden so they don't try to uninstall during an update
A successful update. they are redirected to the new package version page (change route) and there is a success toast
An unsuccessful update attempt
Edgecases where the user navigates to a version that is not the one they have installed (perhaps from a bookmark or history as we always link to the version they have installed or the most recent if not installed).
User goes to package version that is newer than the one they have installed. I am not too concerned about this view because they would have had to guess this URL as they always get sent to the version they have installed if they have one installed and update from that version
Navigate to http://localhost:5601/ssg/app/ingestManager#/epm/detail/nginx-0.0.2 with nginx-0.0.1 installed
Navigate to http://localhost:5601/ssg/app/ingestManager#/epm/detail/nginx-0.0.1 with nginx-0.0.2 installed
User directly navigates to the url of a package that is older than the version they have installed. There are no options for installing or removing the package because its not the version they have installed.
For the edgecases, Henry and I discussed possibility of changing the package detail route from
/detail/nginx-0.0.1/
to/detail/nginx
to simplify things, but this would be an issue for when we support installing multiple versions at once@ruflin should we be blocking installations or updates to a version that is not the latest version?