[PROPOSAL] Support legacy basePath to re-direct to new basePath
See original GitHub issueEDIT: this description was updated to avoid confusion.
Describe the feature
Say one user had a version of Kibana and they defined the server.basePath: /legacyApp
, this will start up the application as localhost:5601/legacyApp
. Any saved links will be saved into the system index as localhost:5601/legacyApp/viz
or any if anyone bookmarked localhost:5601/legacyApp
. If any service decided to migrate from the legacy application to OpenSearch Dashboards and decided to change server.basePath: /currentApp
, then the application will start up as localhost:5601/currentApp
. This then means the link localhost:5601/legacyApp/viz
or bookmarks will fail.
Given that server.basePath
can be anything that users define, it could be server.basePath: /foobar12345
, this will start up the application as localhost:5601/foobar12345
, we can’t create a hardcode string to redirect (as suggested in the original issue here: /_plugin/kibana
to /_dashboards
).
So the suggestion here is define a new config that accepts a legacy config so that the url forwarder src file can forward users from the legacy base url to the current url if the legacy base url is defined.
To Reproduce Steps to reproduce the behavior:
- Create a legacy app with 6.8 and upgrade to OpenSearch Dashboards 1.0
- Try to access dashboards
Expected behavior Dashboards should work fine.
OpenSearch Version 1.0.
Dashboards Version 1.0.
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (7 by maintainers)
Top GitHub Comments
Domain probably shouldn’t have been mentioned.
Say one user had a version of Kibana and they defined the
server.basePath: /legacyApp
, this will start up the application aslocalhost:5601/legacyApp
. Any saved links will be saved into the system index aslocalhost:5601/legacyApp/viz
or any if anyone bookmarkedlocalhost:5601/legacyApp
. If any service decided to migrate from the legacy application to OpenSearch Dashboards and decided to changeserver.basePath: /currentApp
, then the application will start up aslocalhost:5601/currentApp
. This then means the linklocalhost:5601/legacyApp/viz
or bookmarks will fail.Given that
server.basePath
can be anything that users define, it could beserver.basePath: /foobar12345
, this will start up the application aslocalhost:5601/foobar12345
, we can’t create a hardcode string to redirect (as suggested in the original issue here:/_plugin/kibana
to/_dashboards
).So the suggestion here is define a new config that accepts a legacy config so that the url forwarder src file can forward users from the legacy base url to the current url if the legacy base url is defined.
Root Cause
This issue actually happened when user created permalink in the 6.x ~7.8, and upgrade domain from (6.x ~ 7.8) to OSD 1.0, 1.1, 1.2, the permalink was writing to index url element with /app/kibana#/visualize/, it caused the trouble for rendering in the OSD1.0, 1.1, 1.2, the link will be broken as “application was not found.”
Fixes
The fixes already merged in OSD1.3, it will handle the forwarding from /app/kibana#/visualize/ to /app/visualize#/. Verified the fixes in the OSD1.3, the forwarding works fine.