[ZEPPELIN-6253] fix: remove SNAPSHOT from version when building crede…#4993
[ZEPPELIN-6253] fix: remove SNAPSHOT from version when building crede…#4993hyo-ryeong wants to merge 2 commits into
Conversation
tbonelee
left a comment
There was a problem hiding this comment.
Thanks for fixing the broken doc URL.
Just to clarify, even after removing -SNAPSHOT, the docs page for the current development version might still be missing, since the latest version is not released yet. So the link could still be broken unless it falls back to a stable version like latest.
We might also consider a unified approach in #4980 if needed.
| let currentVersion = $rootScope.zeppelinVersion || '0.12.0'; | ||
| currentVersion = currentVersion.replace('-SNAPSHOT', ''); |
There was a problem hiding this comment.
How about replacing the -SNAPSHOT part if present, and falling back to 'latest' instead?
Also, I think it's preferrable to avoid hardcoding version strings like '0.12.0'.
| let currentVersion = $rootScope.zeppelinVersion || '0.12.0'; | |
| currentVersion = currentVersion.replace('-SNAPSHOT', ''); | |
| const currentVersion = $rootScope.zeppelinVersion | |
| && $rootScope.zeppelinVersion.replace('-SNAPSHOT', '') || 'latest'; |
|
|
||
| /* | ||
| * Add '/setup' to doc link on the version over 0.7.0 | ||
| * Add '/setup' to doc link on the version over 0.7.0, add '/setup' to the doc URL |
There was a problem hiding this comment.
The add part seems to repeat the same meaning as the original comment.
There was a problem hiding this comment.
Thanks for the review!
I updated the code to remove the hardcoded default version and added a fallback to 'latest' when zeppelinVersion is not available.
Also simplified the comment to avoid duplication.
…' in credential docs link
ParkGyeongTae
left a comment
There was a problem hiding this comment.
I think the PR title might be unfinished — could you please review it and update if needed?
What is this PR for?
Fixes a broken "Learn more" link on the credential page.
Zeppelin currently appends
-SNAPSHOTto the version when constructing the documentation link, which results in a 404 page.This PR removes
-SNAPSHOTfrom the version and ensures it uses a valid documentation path.Broken link (before):
https://zeppelin.apache.org/docs/0.12.0-SNAPSHOT/setup/security/datasource_authorization.htmlCorrected link (after):
https://zeppelin.apache.org/docs/0.12.0/setup/security/datasource_authorization.htmlWhat type of PR is it?
What is the Jira issue?
JIRA: ZEPPELIN-6253
How should this be tested?
Questions