-
Notifications
You must be signed in to change notification settings - Fork 59
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
fix: Broken breadcrumbs when using custom BASE_URL #861
Conversation
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
Signed-off-by: ddl-rliu <[email protected]>
3622218
to
1db296c
Compare
@@ -106,7 +106,7 @@ export class BreadcrumbRegistry { | |||
|
|||
static makeUrlSegments(location: Location, projectId = '', domainId = '') { | |||
const pathName = location.pathname; | |||
const basePath = process.env.BASE_PATH || '/console'; |
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 believe BASE_PATH may be a typo here, since the process.env
object looks like
{
NODE_ENV: "production",
ADMIN_API: "//localhost:30080",
ADMIN_API_URL: "localhost:30080",
BASE_URL: "/console",
BASE_HREF: "",
DISABLE_CONSOLE_ROUTE_PREFIX: "",
MAINTENANCE_MODE: ""
}
(in the case of a custom path, it looks like ... BASE_URL: "/custom-path/console"
And double checking the repo code, BASE_PATH has no other instance of usage, pointing to this being a potential typo.
@jsonporter , can you take a look? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #861 +/- ##
=======================================
Coverage 54.76% 54.76%
=======================================
Files 578 578
Lines 15137 15137
Branches 2760 2760
=======================================
Hits 8290 8290
Misses 6847 6847 ☔ View full report in Codecov by Sentry. |
Anything we can do to help get this typo fix merged @eapolinario / @jsonporter ? |
Congrats on merging your first pull request! 🎉 |
🎉 This PR is included in version 1.15.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
TL;DR
Typo – causes breadcrumbs to not appear in flyteconsole. To fix, use BASE_URL not BASE_PATH.
Type
Are all requirements met?
Complete description
Missing breadcrumbs for custom BASE_URL like
/custom-base/console
Expectation: breadcrumbs are present for custom BASE_URL Flyte instance.
This happens because when
BASE_PATH
is used instead ofBASE_URL
, the logic that generates the breadcrumbs atbreadcrumbRegistry.breadcrumbBuilder
ends up using the wrongBASE_URL
value (this starts frommakeUrlSegments
). This causes it to parse the window location incorrectly, and the resulting generated breadcrumbs is missing the expected entries.Tracking Issue
Remove the 'fixes' keyword if there will be multiple PRs to fix the linked issue
fixes https://github.com/flyteorg/flyte/issues/
Follow-up issue
NA
OR
https://github.com/flyteorg/flyte/issues/