-
Notifications
You must be signed in to change notification settings - Fork 48
Add UI version #4674
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
Add UI version #4674
Conversation
Reviewer's GuideThis PR introduces a hidden UI version component that embeds the Git branch and commit hash into each UI app via environment variables and renames the NotFound component path to match the new structure. Class diagram for the new UiVersion componentclassDiagram
class UiVersion {
+appName?: string
+render(): JSX.Element
}
UiVersion --|> React.Component
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Summary of ChangesHello @dlabrecq, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a mechanism to embed UI version information (Git branch and commit hash) directly into the application builds for "koku-ui-hccm" and "koku-ui-ros". This is achieved by leveraging Webpack plugins and a new "UiVersion" React component, which renders this data as a hidden element in the DOM. The primary purpose is to facilitate verification of deployed Konflux images, ensuring that the correct UI version is running. Additionally, the "NotFound" component has been refactored and moved to a more logical location within the "ui-lib". Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Hey there - I've reviewed your changes - here's some feedback:
- The webpack config changes are duplicated in multiple apps—consider extracting the GitRevisionPlugin setup into a shared config to reduce duplication.
- You added UiVersion to hccm and ros but not to the on-prem app—consider including the version marker there for consistency across all UI flavors.
- Ensure the NotFound component deletion aligns with the new import path and that the renamed component exists in ui-lib to avoid broken imports.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The webpack config changes are duplicated in multiple apps—consider extracting the GitRevisionPlugin setup into a shared config to reduce duplication.
- You added UiVersion to hccm and ros but not to the on-prem app—consider including the version marker there for consistency across all UI flavors.
- Ensure the NotFound component deletion aligns with the new import path and that the renamed component exists in ui-lib to avoid broken imports.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4674 +/- ##
=======================================
Coverage 87.07% 87.07%
=======================================
Files 480 480
Lines 9078 9078
Branches 2195 2195
=======================================
Hits 7905 7905
Misses 1107 1107
Partials 66 66 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Code Review
This pull request successfully adds a hidden UI version identifier to the koku-ui-hccm and koku-ui-ros applications by leveraging git-revision-webpack-plugin. A new reusable UiVersion component has been created for this purpose. The changes also include refactoring the import path for the NotFound component.
My review includes suggestions to improve the robustness of the new UiVersion component and to clean up an apparently unused dependency. Most importantly, it appears the implementation for the koku-ui-onprem application is incomplete, as it's missing the UiVersion component and its related build configurations, contrary to the PR's description.
Summary by Sourcery
Expose a hidden UI version indicator across multiple applications by injecting git metadata at build time and renaming the NotFound imports to match the reorganized ui-lib structure
New Features:
Enhancements:
Build: