Skip to content
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

HDDS-4166. Documentation index page redirects to the wrong address #1372

Merged
merged 6 commits into from
Sep 15, 2020

Conversation

cku328
Copy link
Contributor

@cku328 cku328 commented Sep 1, 2020

What changes were proposed in this pull request?

The server for the edge version of the documentation doesn't appear to use index.html as the default index page, but instead displays a list of directories.

If the file name of the page is index.html, it doesn't add index.html to the Permalink parameters, which seems to be hugo's style. I found similar cases on the internet. (ref. https://discourse.gohugo.io/t/ugly-urls-with-page-resources/10037)

The easiest solution is to check the permalink suffix and if it's not .html then print index.html at the end.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-4166

How was this patch tested?

Tested locally using hugo serve

擷取

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cku328 for fixing this.

All Home links in breadcrumbs (eg. in Home > Features > Topology awareness) are also affected, ie. index.html might need to be added to:

https://github.com/apache/hadoop-ozone/blob/13fe31b4927660bc2534656c6a7048b45d3c8051/hadoop-hdds/docs/themes/ozonedoc/layouts/_default/single.html#L33

FYI this can be reproduced locally by opening compiled docs from disk after mvn package without hugo serve, since there is no webserver in this case that would serve index.html as directory listing.

@cku328
Copy link
Contributor Author

cku328 commented Sep 2, 2020

Thanks @adoroszlai for your review and comments.
I re-checked the hyperlinks in the document related to "index.html".

I will update this patch to include the following changes:

  1. Fixed ozone logo image not displaying properly and added a hyperlink to index page.

image

  1. Added index.html to the Home hyperlink in the breadcrumb.
  2. Added index.html to the Overview hyperlink in the sidebar.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cku328 for updating the patch. I couldn't find any remaining non-http links ending in /.

@cku328
Copy link
Contributor Author

cku328 commented Sep 2, 2020

Hi! @adoroszlai
I found some broken hyperlinks and updated the patch to fix it.

It fixed the following items:

  1. Storage Container Manager hyperlink in /zh/concept/overview.html is not available.
  2. kerberos keytab hyperlink in /zh/security/secureozone.html is not available.
  3. Replacing ofs.md with a hyperlink of OFS in /zh/interface/o3fs.html.

@cku328
Copy link
Contributor Author

cku328 commented Sep 4, 2020

Thanks @cxorm for the review.
I've updated the patch based on your review.

@cku328 cku328 requested a review from cxorm September 4, 2020 03:51
@codecov-commenter
Copy link

Codecov Report

Merging #1372 into master will decrease coverage by 0.23%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1372      +/-   ##
============================================
- Coverage     75.32%   75.08%   -0.24%     
+ Complexity    10502    10484      -18     
============================================
  Files           990      990              
  Lines         50757    50844      +87     
  Branches       4951     4956       +5     
============================================
- Hits          38233    38177      -56     
- Misses        10158    10279     +121     
- Partials       2366     2388      +22     
Impacted Files Coverage Δ Complexity Δ
...hdds/scm/container/CloseContainerEventHandler.java 72.41% <0.00%> (-17.25%) 6.00% <0.00%> (ø%)
...hdds/scm/container/common/helpers/ExcludeList.java 86.95% <0.00%> (-13.05%) 19.00% <0.00%> (-3.00%)
.../hadoop/ozone/recon/scm/ReconContainerManager.java 84.74% <0.00%> (-11.87%) 14.00% <0.00%> (ø%)
...er/common/transport/server/GrpcXceiverService.java 70.00% <0.00%> (-10.00%) 3.00% <0.00%> (ø%)
...hadoop/ozone/recon/api/types/DatanodeMetadata.java 79.31% <0.00%> (-8.63%) 2.00% <0.00%> (-5.00%)
...on/scm/ReconIncrementalContainerReportHandler.java 60.00% <0.00%> (-7.50%) 4.00% <0.00%> (ø%)
...va/org/apache/hadoop/hdds/utils/db/RDBMetrics.java 92.85% <0.00%> (-7.15%) 14.00% <0.00%> (-1.00%)
...doop/hdds/scm/container/ContainerStateManager.java 81.67% <0.00%> (-6.88%) 32.00% <0.00%> (-3.00%)
...rg/apache/hadoop/hdds/scm/server/SCMCertStore.java 38.23% <0.00%> (-5.89%) 5.00% <0.00%> (-1.00%)
.../org/apache/hadoop/hdds/scm/XceiverClientGrpc.java 68.12% <0.00%> (-5.82%) 38.00% <0.00%> (ø%)
... and 39 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d34ab29...e7c948c. Read the comment docs.

@adoroszlai
Copy link
Contributor

Thanks @cku328 for the improvement and @cxorm for the review. I have confirmed that @cxorm's wording suggestion is applied, so merging now.

@adoroszlai adoroszlai merged commit 8e71e81 into apache:master Sep 15, 2020
llemec pushed a commit to llemec/hadoop-ozone that referenced this pull request Sep 15, 2020
errose28 added a commit to errose28/ozone that referenced this pull request Sep 18, 2020
* master: (47 commits)
  HDDS-4104. Provide a way to get the default value and key of java-based-configuration easily (apache#1369)
  HDDS-4250. Fix wrong logger name (apache#1429)
  HDDS-4244. Container deleted wrong replica cause mis-replicated. (apache#1423)
  HDDS-4053. Volume space: add quotaUsageInBytes and update it when write and delete key. (apache#1296)
  HDDS-4210. ResolveBucket during checkAcls fails. (apache#1398)
  HDDS-4075. Retry request on different OM on AccessControlException (apache#1303)
  HDDS-4166. Documentation index page redirects to the wrong address (apache#1372)
  HDDS-4039. Reduce the number of fields in hdds.proto to improve performance (apache#1289)
  HDDS-4155. Directory and filename can end up with same name in a path. (apache#1361)
  HDDS-3927. Rename Ozone OM,DN,SCM runtime options to conform to naming conventions (apache#1401)
  HDDS-4119. Improve performance of the BufferPool management of Ozone client (apache#1336)
  HDDS-4217.Remove test TestOzoneContainerRatis (apache#1408)
  HDDS-4218.Remove test TestRatisManager (apache#1409)
  HDDS-4129. change MAX_QUOTA_IN_BYTES to Long.MAX_VALUE. (apache#1337)
  HDDS-4228: add field 'num' to ALLOCATE_BLOCK of scm audit log. (apache#1413)
  HDDS-4196. Add an endpoint in Recon to query Prometheus (apache#1390)
  HDDS-4211. [OFS] Better owner and group display for listing Ozone volumes and buckets (apache#1397)
  HDDS-4150. recon.api.TestEndpoints test is flaky (apache#1396)
  HDDS-4170 - Fix typo in method description. (apache#1406)
  HDDS-4064. Show container verbose info with verbose option (apache#1290)
  ...
errose28 added a commit to errose28/ozone that referenced this pull request Sep 18, 2020
…ponse

* HDDS-4122-quota-attempt2: (51 commits)
  Remove redundant check status calls in children of AbstractOMOpenKeyDeleteRequest
  Remove unused inports and fix super constructor calls
  Move common volume byte usage update code to AbstractOMKeyDeleteResponse
  Add volume quota update to open key delete response, and group duplicate code
  HDDS-4104. Provide a way to get the default value and key of java-based-configuration easily (apache#1369)
  HDDS-4250. Fix wrong logger name (apache#1429)
  HDDS-4244. Container deleted wrong replica cause mis-replicated. (apache#1423)
  HDDS-4053. Volume space: add quotaUsageInBytes and update it when write and delete key. (apache#1296)
  HDDS-4210. ResolveBucket during checkAcls fails. (apache#1398)
  HDDS-4075. Retry request on different OM on AccessControlException (apache#1303)
  HDDS-4166. Documentation index page redirects to the wrong address (apache#1372)
  HDDS-4039. Reduce the number of fields in hdds.proto to improve performance (apache#1289)
  HDDS-4155. Directory and filename can end up with same name in a path. (apache#1361)
  HDDS-3927. Rename Ozone OM,DN,SCM runtime options to conform to naming conventions (apache#1401)
  HDDS-4119. Improve performance of the BufferPool management of Ozone client (apache#1336)
  HDDS-4217.Remove test TestOzoneContainerRatis (apache#1408)
  HDDS-4218.Remove test TestRatisManager (apache#1409)
  HDDS-4129. change MAX_QUOTA_IN_BYTES to Long.MAX_VALUE. (apache#1337)
  HDDS-4228: add field 'num' to ALLOCATE_BLOCK of scm audit log. (apache#1413)
  HDDS-4196. Add an endpoint in Recon to query Prometheus (apache#1390)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants