cockpit: Show registration for image mode (HMS-10093)#4024
cockpit: Show registration for image mode (HMS-10093)#4024regexowl wants to merge 1 commit intoosbuild:mainfrom
Conversation
Since distribution can be undefined, it doesn't pass the `isRhel` check and the step with its review was incorrectly hidden when in image mode.
|
/jira-epic HMS-9973 |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The conditions for showing the registration section differ between the wizard step (
isImageMode) and the review step (`blueprintMode === 'image'); consider centralizing this logic in a shared helper or using a single source of truth for 'image mode' to avoid future divergence. - Given
distributioncan be undefined, it may be clearer to make that explicit in theisRhelcheck or wrapper (e.g., ashouldShowRegistration(distribution, mode)helper) rather than relying on the falsy behavior ofisRhel(distribution)in multiple places.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The conditions for showing the registration section differ between the wizard step (`isImageMode`) and the review step (`blueprintMode === 'image'); consider centralizing this logic in a shared helper or using a single source of truth for 'image mode' to avoid future divergence.
- Given `distribution` can be undefined, it may be clearer to make that explicit in the `isRhel` check or wrapper (e.g., a `shouldShowRegistration(distribution, mode)` helper) rather than relying on the falsy behavior of `isRhel(distribution)` in multiple places.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. @@ Coverage Diff @@
## main #4024 +/- ##
=======================================
Coverage 73.77% 73.78%
=======================================
Files 207 207
Lines 7729 7731 +2
Branches 2651 2652 +1
=======================================
+ Hits 5702 5704 +2
Misses 1775 1775
Partials 252 252
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
kingsleyzissou
left a comment
There was a problem hiding this comment.
I need to look into this a bit, I'm not 100% sure we support registration for bootc... and if we do, I'm not 100% sure yet if we propagated this all the way into image-builder-cli and bootc-image-builder
Got it, I was just blindly following the customization list in https://issues.redhat.com/browse/HMS-10021, didn't check if the registration really works 😅 If this stays hidden, there will be one more crash when trying to visit FSC step in edit mode. That one was solved by @ochosi on PF side patternfly/patternfly-react#12166, we're waiting for release so the dep can be bumped. |
|
#4044 changes the logic of filtering steps. If we ever need this, we should implement it in an up-to-date way. Closing this one. |
Since distribution can be undefined, it doesn't pass the
isRhelcheck and the step with its review was incorrectly hidden when in image mode.JIRA: HMS-10093