Skip to content

Conversation

stklcode
Copy link

@stklcode stklcode commented May 29, 2025

  • Breaking change? (if so, please describe the impact and migration path for existing application instances)

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 to false 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)):

We need a boolean property to make it possible to opt-out of such checks in air-gap environments.

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)

  • No need to
  • Manually (please, describe, if necessary)
  • Unit checks
  • Integration checks
  • Covered by existing automation

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)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

PR for documentation update: kafbat/ui-docs#56

@stklcode stklcode requested review from a team as code owners May 29, 2025 09:44
@kapybro kapybro bot added status/triage Issues pending maintainers triage status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels May 29, 2025
Copy link

@github-actions github-actions bot left a 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.

Copy link
Member

@Haarolean Haarolean left a 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 && (
Copy link
Member

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.

Copy link
Author

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.

Copy link
Member

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)

Copy link
Author

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.

Copy link
Member

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?

Copy link
Author

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.

Copy link
Member

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?

Copy link
Author

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.

Copy link
Member

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)

Copy link
Author

@stklcode stklcode Aug 20, 2025

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)

@Haarolean Haarolean added type/enhancement En enhancement/improvement to an already existing feature scope/backend Related to backend changes and removed status/triage/manual Manual triage in progress labels May 29, 2025
@Haarolean Haarolean changed the title Allow disabling GitHub release info BE: Allow disabling GitHub release info May 29, 2025
@stklcode stklcode force-pushed the feat/disable-releaseinfo branch from f1f15de to 3c4131c Compare May 29, 2025 12:31
@stklcode stklcode force-pushed the feat/disable-releaseinfo branch 2 times, most recently from c3a87e3 to c4f2562 Compare May 29, 2025 16:43
@Haarolean Haarolean self-assigned this Jun 11, 2025
@Haarolean Haarolean self-requested a review June 11, 2025 10:04
@@ -19,7 +19,7 @@ const Version: React.FC = () => {

return (
<S.Wrapper>
{!isLatestRelease && (
{isLatestRelease === false && (
Copy link
Member

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?

@Haarolean Haarolean requested a review from a team June 25, 2025 10:40
@Haarolean Haarolean added the scope/frontend Related to frontend changes label Jun 25, 2025
@Haarolean Haarolean moved this to Active in Housekeeping Jul 13, 2025
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.
@stklcode stklcode force-pushed the feat/disable-releaseinfo branch 2 times, most recently from 84e1a8e to ede6682 Compare August 20, 2025 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope/backend Related to backend changes scope/frontend Related to frontend changes status/triage/completed Automatic triage completed type/enhancement En enhancement/improvement to an already existing feature
Projects
Status: Active
Development

Successfully merging this pull request may close these issues.

3 participants