You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@zeppelin.apache.org by "hyo-ryeong (via GitHub)" <gi...@apache.org> on 2025/07/20 06:28:23 UTC
[PR] [ZEPPELIN-6253] fix: remove SNAPSHOT from version when building crede… [zeppelin]
hyo-ryeong opened a new pull request, #4993:
URL: https://github.com/apache/zeppelin/pull/4993
### What is this PR for?
Fixes a broken "Learn more" link on the credential page.
Zeppelin currently appends `-SNAPSHOT` to the version when constructing the documentation link, which results in a 404 page.
This PR removes `-SNAPSHOT` from 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.html`
Corrected link (after):
`https://zeppelin.apache.org/docs/0.12.0/setup/security/datasource_authorization.html`
---
### What type of PR is it?
- [x] Bug Fix
---
### What is the Jira issue?
[JIRA: ZEPPELIN-6253](https://issues.apache.org/jira/browse/ZEPPELIN-6253)
---
### How should this be tested?
1. Navigate to **Credential** page in Zeppelin.
2. Click the **"?" (Learn more)** link at the top right.
3. Confirm it opens a valid docs page without 404.
---
### Questions
- Does the license files need to update? → No
- Is there breaking changes for older versions? → No
- Does this need documentation? → No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6253] fix: remove SNAPSHOT from version when building crede… [zeppelin]
Posted by "hyo-ryeong (via GitHub)" <gi...@apache.org>.
hyo-ryeong commented on code in PR #4993:
URL: https://github.com/apache/zeppelin/pull/4993#discussion_r2239339887
##########
zeppelin-web/src/app/credential/credential.controller.js:
##########
@@ -199,10 +199,13 @@ function CredentialController($scope, $rootScope, $http, baseUrlSrv, ngToast) {
}
$scope.getCredentialDocsLink = function() {
- const currentVersion = $rootScope.zeppelinVersion;
- const isVersionOver0Point7 = currentVersion && currentVersion.split('.')[1] > 7;
+ let currentVersion = $rootScope.zeppelinVersion || '0.12.0';
+ currentVersion = currentVersion.replace('-SNAPSHOT', '');
+
+ const isVersionOver0Point7 = currentVersion.split('.')[1] > 7;
+
/*
- * 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
Review 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6253] fix: remove SNAPSHOT from version when building crede… [zeppelin]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #4993: [ZEPPELIN-6253] fix: remove SNAPSHOT from version when building crede…
URL: https://github.com/apache/zeppelin/pull/4993
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6253] fix: remove SNAPSHOT from version when building crede… [zeppelin]
Posted by "tbonelee (via GitHub)" <gi...@apache.org>.
tbonelee commented on code in PR #4993:
URL: https://github.com/apache/zeppelin/pull/4993#discussion_r2225248507
##########
zeppelin-web/src/app/credential/credential.controller.js:
##########
@@ -199,10 +199,13 @@ function CredentialController($scope, $rootScope, $http, baseUrlSrv, ngToast) {
}
$scope.getCredentialDocsLink = function() {
- const currentVersion = $rootScope.zeppelinVersion;
- const isVersionOver0Point7 = currentVersion && currentVersion.split('.')[1] > 7;
+ let currentVersion = $rootScope.zeppelinVersion || '0.12.0';
+ currentVersion = currentVersion.replace('-SNAPSHOT', '');
Review 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'`.
```suggestion
const currentVersion = $rootScope.zeppelinVersion
&& $rootScope.zeppelinVersion.replace('-SNAPSHOT', '') || 'latest';
```
##########
zeppelin-web/src/app/credential/credential.controller.js:
##########
@@ -199,10 +199,13 @@ function CredentialController($scope, $rootScope, $http, baseUrlSrv, ngToast) {
}
$scope.getCredentialDocsLink = function() {
- const currentVersion = $rootScope.zeppelinVersion;
- const isVersionOver0Point7 = currentVersion && currentVersion.split('.')[1] > 7;
+ let currentVersion = $rootScope.zeppelinVersion || '0.12.0';
+ currentVersion = currentVersion.replace('-SNAPSHOT', '');
+
+ const isVersionOver0Point7 = currentVersion.split('.')[1] > 7;
+
/*
- * 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
Review Comment:
The add part seems to repeat the same meaning as the original comment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6253] fix: remove SNAPSHOT from version when building crede… [zeppelin]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4993:
URL: https://github.com/apache/zeppelin/pull/4993#issuecomment-5390029947
This pull request has been inactive for over a year. If no further activity occurs within the next 30 days, it will be automatically closed. If you believe this PR is still relevant, please feel free to leave a comment or make an update. Thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6253] fix: remove SNAPSHOT from version when building crede… [zeppelin]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4993:
URL: https://github.com/apache/zeppelin/pull/4993#issuecomment-5806275441
This pull request has been automatically closed due to prolonged inactivity (over one year without updates). If you feel this was done in error or would like to continue the discussion, feel free to reopen it. Thank you for your contributions!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org