-
-
Notifications
You must be signed in to change notification settings - Fork 165
BE: Allow disabling GitHub release info #1108
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
base: main
Are you sure you want to change the base?
Conversation
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.
Hi stklcode! 👋
Welcome, and thank you for opening your first PR in the repo!
Please wait for triaging by our maintainers.
Please take a look at our contributing guide.
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.
Hi, thanks for the PR. I've left some inline comments, PTAL!
@@ -19,7 +19,7 @@ const Version: React.FC = () => { | |||
|
|||
return ( | |||
<S.Wrapper> | |||
{!isLatestRelease && ( | |||
{isLatestRelease === false && ( |
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'd like to see a visual difference between "no latest release present" and "user disabled version check" in the UI. This is crucial as it's often only the UI screenshots I have to deduct things from.
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.
Any suggestion how such information should look?
Frankly, I don't see any benefit in such information. Currently running version is displayed, if the check failed there's a warning symbol and the information if there's an update available or not can change 1 second after a screenshot was taken, because it's dynamic info.
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.
Perhaps a red (rather than yellow) exclamation mark icon (most likely it's an svg, so altering stroke-color should work) with a different text about version check disabled.
The benefit is offloading responsibility of running an oudated and possibly CVE-"enriched" version and giving the maintainers visual signal of what the user's running (red icon -> no version check = most likely outdated -> no support)
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.
A red warning, really?
I've learned to ignore the yellow icon due do failing version checks and yet there are frequent questions if there's something wrong. So annoying users, who have no control whatsoever about the deployed version in our case, with read warning sign that typically means "something is wrong here" ...
Our use case are - you guessed it - isolated systems, mostly dev/staging environments. We allow users some access to the underlying Kafka and deployment/updates are done by some automation/opt team who don't see the UI warnings anyway.
We were looking for a solution to remove the frontend warning, not making it look worse.
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.
You wouldn't imagine the number of issues I've seen where people come with their "up-to-date" installations, only to realize after wasting some time that it's not only an outdated version, but also a fork with completely unrelated functionality that we don't even have. Not sure of a middle ground here. @germanosin thoughts?
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 extended the <WarningIcon>
component to (a) use theme's warningIcon
color instead of hardcoded color (was #F2C94C
, now #FFDD57
... close enough for me) and (b) allow override by parameter.
Override to infoIcon
color (#ABB5BA
) with adjusted message in case the check info is not available.
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 could hide the whole icon tbh. Even if the person reporting issues is not the same as the one managing the installation, they can still check if the version is up to date by clicking the commit hash. Given the counterpoint by @stklcode about "users screaming due to an alert", it might be alright.
@germanosin thoughts?
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.
Any update on this one?
I'd be happy to remove the latest commit again (hide the icon) if we agree on that or keep is as is.
Just rebased the code and resolved a minor merge conflict.
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.
@stklcode ok let's hide the icon (based on a property ofc)
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.
OK. I removed the latest commit, so now the icon is gone if github.release.info.enabled=false
.
I will extract a minor change (warning icon color from theme) into a separate PR, as it is now little out of scope here. (#1282)
f1f15de
to
3c4131c
Compare
c3a87e3
to
c4f2562
Compare
@@ -19,7 +19,7 @@ const Version: React.FC = () => { | |||
|
|||
return ( | |||
<S.Wrapper> | |||
{!isLatestRelease && ( | |||
{isLatestRelease === false && ( |
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 could hide the whole icon tbh. Even if the person reporting issues is not the same as the one managing the installation, they can still check if the version is up to date by clicking the commit hash. Given the counterpoint by @stklcode about "users screaming due to an alert", it might be alright.
@germanosin thoughts?
The application info object contains details about the latest version which is queried online from GitHub API. While this info can be useful, it raises warning when Kafbat UI is deployed in environments with restricted internet access. Introduce a new property "github.release.info.enabled" (default: true) that can be set to "false" to disable release info and just display the currently running version/commit.
84e1a8e
to
ede6682
Compare
What changes did you make?
The application info object contains details about the latest version which is queried online from GitHub API. While this info can be useful, it raises warning when Kafbat UI is deployed in environments with restricted internet access.
Introduce a new property
github.release.info.enabled
(default:true
) that can be set tofalse
to disable release info and just display the currently running version/commit.Is there anything you'd like reviewers to focus on?
The original feature was introduced in provectus/kafka-ui#3570
Apparently, the issue was already known during development (provectus/kafka-ui#3570 (review)):
Did I miss anything or was this point just ignored? Anyway with this PR now there it is.
How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)
For manual testing, start the app with environment variable or property, e.g.
GITHUB_RELEASE_INFO_ENABLED=false
.Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)
PR for documentation update: kafbat/ui-docs#56