[Fleet] fix UI error when entering an invalid semver#179631
Merged
juliaElastic merged 4 commits intoelastic:mainfrom Apr 2, 2024
Merged
[Fleet] fix UI error when entering an invalid semver#179631juliaElastic merged 4 commits intoelastic:mainfrom
juliaElastic merged 4 commits intoelastic:mainfrom
Conversation
Contributor
|
Pinging @elastic/fleet (Team:Fleet) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
nchaulet
approved these changes
Mar 28, 2024
Member
nchaulet
left a comment
There was a problem hiding this comment.
code LGTM 🚀
I am wondering if we can improve this by adding a validation message in the UI with a regex so use can figure why they cannot click on upgrade?
Contributor
Author
|
Found that this code was added only in 8.14, so no need to backport and release note: #178079 |
Contributor
Author
|
@nchaulet Added UI validation to show a message if the entered version is not a valid semver: |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Closes #179592
The UI calls the semver version check functions on every keystroke, it seems the semver functions throw error if the input is not a valid semver (e.g.
8.14instead of8.14.0). Added try-catch around the logic which is called from the UI.To verify:
8.148.14.0Checklist