Skip to content

[fix][docs] Remove redudant steps in docs gen - #18132

Merged
Anonymitaet merged 7 commits into
apache:masterfrom
SignorMercurio:remove-redund
Oct 24, 2022
Merged

[fix][docs] Remove redudant steps in docs gen#18132
Anonymitaet merged 7 commits into
apache:masterfrom
SignorMercurio:remove-redund

Conversation

@SignorMercurio

@SignorMercurio SignorMercurio commented Oct 20, 2022

Copy link
Copy Markdown
Contributor

Motivation

There are some redundant information in current pulsar docs, as pointed out by @Anonymitaet. This PR aims to fix those.

Modifications

  1. Remove redundant markdown list in CLI docs gen steps
  2. Use markdown file for reference-configuration instead of links
  3. Remove unused leading warning on some pages

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: SignorMercurio#5

Signed-off-by: Mercurio <signormercurio@gmail.com>
Signed-off-by: Mercurio <signormercurio@gmail.com>
…lient,pulsar,pulsar-perf

Signed-off-by: Mercurio <signormercurio@gmail.com>
Signed-off-by: Mercurio <signormercurio@gmail.com>
Signed-off-by: Mercurio <signormercurio@gmail.com>
@github-actions github-actions Bot added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label Oct 20, 2022
Signed-off-by: Mercurio <signormercurio@gmail.com>
@Anonymitaet

Copy link
Copy Markdown
Member

LGTM

PTAL @urfreespace @tisonkun thanks!

@tisonkun tisonkun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for your contribution! Comments inline.

Comment thread site2/docs/reference-configuration.md Outdated
Comment on lines 370 to +371
"reference-cli-tools",
{
"type": "link",
"href": "https://pulsar.apache.org/reference",
"label": "Pulsar configuration"
},
"reference-configuration",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

After #18101, I think both "reference-cli-tools" and this new "reference-configuration" page redirect to http://pulsar.apache.org/reference?

But we can improve the docsify side later...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Anonymitaet suggests that we should make it a Markdown page instead of a direct link, so it's changed back here.

Comment on lines -110 to -112
for (String s : cmdObj.jcommander.getCommands().keySet()) {
sb.append("* `").append(s).append("`\n");
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you share a preview of diff how these lines affect the final result?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

image

These lists are removed by removing these code. They are redundant because we now already have a TOC on the right side.

Co-authored-by: tison <wander4096@gmail.com>

@tisonkun tisonkun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

@Anonymitaet

Copy link
Copy Markdown
Member

@SignorMercurio feel free to ping me to merge if all tests pass.

@urfreespace urfreespace left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter

codecov-commenter commented Oct 21, 2022

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.99%. Comparing base (6c65ca0) to head (4bce553).
⚠️ Report is 3532 commits behind head on master.

Files with missing lines Patch % Lines
.../pulsar/common/util/BaseGenerateDocumentation.java 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #18132       +/-   ##
=============================================
+ Coverage     34.91%   45.99%   +11.08%     
- Complexity     5707    17667    +11960     
=============================================
  Files           607     1574      +967     
  Lines         53396   128502    +75106     
  Branches       5712    14144     +8432     
=============================================
+ Hits          18644    59107    +40463     
- Misses        32119    63283    +31164     
- Partials       2633     6112     +3479     
Flag Coverage Δ
unittests 45.99% <0.00%> (+11.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...g/apache/pulsar/admin/cli/CmdGenerateDocument.java 18.91% <ø> (ø)
...he/pulsar/client/cli/CmdGenerateDocumentation.java 8.57% <ø> (ø)
...org/apache/pulsar/common/util/CmdGenerateDocs.java 45.78% <ø> (ø)
...he/pulsar/testclient/CmdGenerateDocumentation.java 86.88% <ø> (ø)
.../pulsar/common/util/BaseGenerateDocumentation.java 0.00% <0.00%> (ø)

... and 1116 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SignorMercurio

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

@SignorMercurio

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants