HDDS-11072. Publish user-facing configs to the doc site#6916
HDDS-11072. Publish user-facing configs to the doc site#6916sarvekshayr wants to merge 25 commits intoapache:masterfrom
Conversation
…t.xml and ozone-default-generated.xml
|
@devabhishekpal could you please take a look at the changes, thanks. |
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @sarvekshayr for working on this.
hadoop-hdds/common/src/main/java/com/google/protobuf/XmlToMarkdown.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/common/src/main/java/com/google/protobuf/XmlToMarkdown.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/common/src/main/java/com/google/protobuf/XmlToMarkdown.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/common/src/main/java/com/google/protobuf/XmlToMarkdown.java
Outdated
Show resolved
Hide resolved
|
Thanks for working on this @sarvekshayr. The PR description mentions automation and publishing, but I don't see any automated way of running this in the PR currently. This is important to work out because it affects the implementation:
Since it looks like the configs require outputs from the Ozone build, not just the source, I'm assuming the plan for automation will look something like this:
|
|
Hi @sarvekshayr, thanks for adding this patch and @errose28 for your inputs.
@sarvekshayr please refer below on how you might be able to share the data between the workflows: And for pushing the commit you can check the changes that were done for dependabot if you want to add the generated markdown file to the same PR. This is the reference to the line where that step is being executed. Or you can use the bot to raise a separate PR for better tracking via GitHub actions. @errose28 @adoroszlai let me know your thoughts as well. |
|
Thanks for the input @devabhishekpal. Here's what I'm thinking based on the extra info you shared:
Some thoughts:
|
.github/workflows/doc.yml
Outdated
| ref: 'HDDS-9225-website-v2' | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| path: ozone-site | ||
|
|
There was a problem hiding this comment.
Similar hash check step needs to be aded here to check if the config file was outdated i.e some new config was added in some commit
devabhishekpal
left a comment
There was a problem hiding this comment.
Hi @sarvekshayr,
Thanks for the commit, I just had a few minor comments. Please take a look at them
|
Hello @errose28 @adoroszlai.
Which one do you think would be better? |
errose28
left a comment
There was a problem hiding this comment.
Thanks for the updates @sarvekshayr. When testing this out, you can modify the workflow to run against your forks of ozone and ozone-site to make sure the changes pass CI for the new ozone-site branch.
dev-support/ci/xml_to_md.py
Outdated
| markdown.append("---\n") | ||
| markdown.append("title: \"Ozone configurations\"\n") | ||
| markdown.append("summary: Ozone configurations\n") |
There was a problem hiding this comment.
The current website doesn't require front matter. The new website will fail the build if disallowed front matter keys are used like title and summary. I would change this to use sidebar_label only if the label in the docs sidebar should be different than the page title given by the first heading. sidebar_laebl is only used by the new website. The current website will ignore this key.
I would check the hash if the file exists, and raise a PR if the file does not exist. That way the workflow is not dependent on the initial repo state it is running on in order to succeed. If we are doing PRs instead of commits we have a chance to fix it manually if needed. |
|
Thinking back on #6916 (comment), do you think we should also have this run for 1.4.0 branch or run for older release branches as well? |
This is a good question. I think defining a mapping between release branches and locations in the docs may be difficult to maintain. This is true whether the docs live in the ozone or ozone-site repo, since doc versions are stored in different directories. We could come up with some regex type thing but that seems fragile. There likely won't be many config changes to past release lines, so it is probably ok to leave it as just the master branch of ozone and ozone-site for now. |
|
@errose28 @sarvekshayr |
I think the biggest difference is that the docs content that is merged into the current website is automatically generated and we assume it does not need reviews. However for this config table I think we want the PR to be automatically created but an actual dev to verify the content lines up with the change that it came from, CI passes, etc before publishing. So the question is: should ozone-site pull the changes and create a PR, or should ozone push the changes and create a PR. Since changes are being reviewed, it would be good to have a way to trace back which ozone changes led to which config changes needed in the docs, and have one doc update PR per config change commit in Ozone. Easiest way I see to do this is to use a push model, so Ozone can attach information about the commit that triggered the push in the ozone-site pull request. |
In that case current approach is fine, I didn't know manual review was desired. |
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @sarvekshayr for working on this. I took a closer look and have some suggestions.
|
This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days. |
|
Thank you for your contribution. This PR is being closed due to inactivity. If needed, feel free to reopen it. |
errose28
left a comment
There was a problem hiding this comment.
Thanks for updating this @sarvekshayr. I'll need to do another pass to go through the github actions section in more detail. Do you have an example of this working between your forks of ozone and ozone-site?
|
Testing: Updated the workflow to enable PR creation and added a PAT to demonstrate that the CI workflow runs successfully across my forks. Fork CI: https://github.com/sarvekshayr/ozone/actions/runs/21586461092/job/62196887793 ozone PR: sarvekshayr#61 cc: @errose28 |
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @sarvekshayr for continuing work on this.
What changes were proposed in this pull request?
This PR introduces a mechanism to automatically generate a markdown (.md) file from the ozone-default.xml and ozone-default-generated.xml files, with the entries sorted by configuration keys. The generated markdown file is then published to a new page under the documentation site.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-11072
How was this patch tested?
Verified the output and format of the markdown (.md) file.