TRT-2677: Component readiness: gaReleaseInfo crashes when releases con#3598
TRT-2677: Component readiness: gaReleaseInfo crashes when releases con#3598openshift-trt-agent[bot] wants to merge 2 commits into
Conversation
Add null guard for releases.ga_dates, releases.releases, and releases.release_attrs in gaReleaseInfo(), returning safe defaults when the ReleasesContext value is incomplete. This prevents a TypeError when navigating to /component_readiness before the /api/releases fetch completes or after it fails. Fixes: TRT-2677 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@openshift-trt-agent[bot]: This pull request references TRT-2677 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Hi @openshift-trt-agent[bot]. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: openshift-trt-agent[bot] The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis PR adds defensive programming to the ChangesRelease Data Fallback Handling
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 18 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (18 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
| !releases || | ||
| !releases.ga_dates || | ||
| !releases.releases || | ||
| !releases.release_attrs |
There was a problem hiding this comment.
Done — extracted a hasReleaseData variable and flipped the condition to if (!hasReleaseData).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/close |
|
@smg247: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Summary
gaReleaseInfo()inCompReadyVars.jsthat returns safe defaults (''for releases,() => new Date()forgetReleaseDate) whenreleases.ga_dates,releases.releases, orreleases.release_attrsare missing.TypeError: Cannot convert undefined or null to objectcrash when navigating to/component_readinessbefore the/api/releasesfetch completes or after it fails.findFirstNonGARelease()inhelpers.js.Test plan
/component_readinessduring local dev startup (before backend is ready) and verify no crashFixes: TRT-2677
Generated with Claude Code
Summary by CodeRabbit