-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Indicate the version outdated only when it really is #668
Comments
Sounds good. Additionally, we have to still display a warning in case of a diverged branch (having commits not present in our main branch, like here, where one of the commits is from a forked repo) |
I would however not consider this case a warning, as there is little-to-no chance someone would build against something like this by chance, ie without knowing they are trying something special. |
I’d like to take care of this. Can you assign it to me? |
as a maintainer, sometimes a screenshot is everything I receive, so I need to deduct the version from it. It won't be the first time someone tried to report some issue having a fork with custom commits, so, the warning is needed :) Perhaps with a different text, but that doesn't sound important to me. What do you think? |
For you maintainer use case, if you need an indicator, one bonus of my proposal is that it would be specific to the case of a commit not part of the repository history: you could spot that case at a glance from a screenshot. For a user use case, it would keep the other advantage of not being a warning icon, hence allowing such edge case to live on without conveying the feeling of it being a problem. |
Issue submitter TODO list
Is your proposal related to a problem?
No response
Describe the feature you're interested in
Today, when not building the application directly from a release, a warning icon and a message
Your app version is outdated.
is displayed next to the commit ID having been compiled.When building from a commit more recent than the latest release, this is wrong and can be confusing for a user, despite the maintainer knowing what they are doing.
The current behaviour merely rely on the latest release API (
https://api.github.com/repos/kafbat/kafka-ui/releases/latest
) and makes a strict equality comparison between the release tag name and the built version, for instance inApplicationInfoBuildDTO
.isLatestRelease
(and maybe somewhere else too?)The idea here would be to add a few steps to the comparison to decide whether the built version is:
behind
identical
toahead
ofthe latest release.
The additional step would be using the GitHub's REST API to compare the latest release and the built version (be it a tag name or a commit ID):
https://api.github.com/repos/kafbat/kafka-ui/compare/<latest release tag name>...<built version>
The
status
field from the answer provides either:behind
(for instancehttps://api.github.com/repos/kafbat/kafka-ui/compare/01aa8ab36387c5f1d66d098e71488bfb0eb5f39c...v1.0.0
,01aa8ab36387c5f1d66d098e71488bfb0eb5f39c
being the latest commit frommain
at the moment)identical
(for instancehttps://api.github.com/repos/kafbat/kafka-ui/compare/v1.0.0...2956664bd712266f7340659dc9fbb83e6f3f1923
, comparing thev1.0.0
tag against its own commit)ahead
(for instancehttps://api.github.com/repos/kafbat/kafka-ui/compare/v1.0.0...01aa8ab36387c5f1d66d098e71488bfb0eb5f39c
,01aa8ab36387c5f1d66d098e71488bfb0eb5f39c
being the latest commit frommain
at the moment)➽ The warning could then only be displayed in the
behind
case.Additional/Optional: Maybe another message advising (warning?) to use the release tag in the
identical
case, if the build version is not exactly the latest release tag name, the comparison being done at the moment.Describe alternatives you've considered
No response
Version you're running
01aa8ab
Additional context
No response
The text was updated successfully, but these errors were encountered: