Skip to content

[docs] Migrate docs from AsciiDoc to Markdown #8496

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

Merged
merged 16 commits into from
Mar 7, 2025
Merged

Conversation

eedugon
Copy link
Contributor

@eedugon eedugon commented Feb 27, 2025

Migrates docs from AsciiDoc to Markdown

Preview available at https://docs-v3-preview.elastic.dev/elastic/cloud-on-k8s/pull/8496/reference

This PR should substitute #8494 created by @colleenmcginnis (I didn't have permissions to merge the latest changes in main, and I might need to add a few extra changes to the content).

This PR:

  • Deletes all static .asciidoc files of the previous documentation system (this files can still be updated on the 2.x / 1.x branches).
  • Places new markdown content for reference, release notes, known issues, deprecations and breaking changes sections. This content will eventually be replaced by automatic generated content.

@botelastic botelastic bot added the triage label Feb 27, 2025
@eedugon eedugon added the >docs Documentation label Feb 27, 2025
@botelastic botelastic bot removed the triage label Feb 27, 2025
@eedugon eedugon marked this pull request as ready for review February 27, 2025 13:48
@eedugon eedugon requested review from pebrc and barkbay February 27, 2025 13:48
@eedugon
Copy link
Contributor Author

eedugon commented Feb 27, 2025

This PR cannot be merged until the CI jobs are adjusted (https://buildkite.com/elastic/cloud-on-k8s-operator/builds/10389#019547bc-f8e5-46dd-93a0-1ae3a0f48d99).

Based on @pebrc comments, the steps to take are:

  1. disable the master/main docs build in favour of the new CI checks merged on [docs] Add the new docs CI checks #8493
  2. adjust the repository tooling (which will otherwise fail all builds)
  3. merge this PR.

pebrc added a commit that referenced this pull request Mar 3, 2025
Part of #8498

https://docs-v3-preview.elastic.dev/elastic/cloud-on-k8s/pull/8501/reference/

Adjust the templating for the API reference. Markdown was modelled after #8496

Differences to the manually migrated files: API reference tool creates a single file not a file per group, we could however adjust that if needed.
@pebrc
Copy link
Collaborator

pebrc commented Mar 6, 2025

@eedugon can we get this into a mergeable state? As we are preparing for the 3.0 release and we need to make docs changes it would be good to have the docs as close as possible to the final file layout to avoid double effort on our end maintaining changes in two repos.

@eedugon
Copy link
Contributor Author

eedugon commented Mar 6, 2025

on it @pebrc !
And yes, much better to merge all this in main before creating a 3.0 branch.

@eedugon
Copy link
Contributor Author

eedugon commented Mar 6, 2025

@pebrc : FYI, while fixing the conflicts:

  • File advanced-topics/service-meshes.asciidoc was modified in main branch and we are deleting it in this PR.
  • File release-notes/2.16.0.asciidoc was modified in main branch and we are deleting it in this PR.

The previous files should be updated only in branches different than main or 3.0 (whenever 3.0 branch exists).
The release notes should be markdown (this PR includes a draft).

@eedugon
Copy link
Contributor Author

eedugon commented Mar 6, 2025

@pebrc , the build is failing because of the links auto-generated in third-party-dependencies.md. The docs-builder tool doesn't like them.

The new links look like:

| [https://dario.cat/mergo]($$dario.cat/mergo$$) | v1.0.1 | BSD-3-Clause |
| [https://github.com/Masterminds/sprig]($$github.com/Masterminds/sprig/v3$$) | v3.3.0 | MIT |
| [https://github.com/blang/semver]($$github.com/blang/semver/v4$$) | v4.0.0 | MIT |
| [https://github.com/davecgh/go-spew]($$github.com/davecgh/go-spew$$) | v1.1.2-0.20180830191138-d8f796af33cc | ISC |
| [https://github.com/elastic/go-ucfg]($$github.com/elastic/go-ucfg$$) | v0.8.8 | Apache-2.0 |
| [https://github.com/ghodss/yaml]($$github.com/ghodss/yaml$$) | v1.0.0 | MIT |

And in the static content we had provided they looked like:

| [dario.cat/mergo](https://dario.cat/mergo) | v1.0.1 | BSD-3-Clause |
| [github.com/Masterminds/sprig/v3](https://github.com/Masterminds/sprig) | v3.3.0 | MIT |
| [github.com/blang/semver/v4](https://github.com/blang/semver) | v4.0.0 | MIT |
| [github.com/davecgh/go-spew](https://github.com/davecgh/go-spew) | v1.1.2-0.20180830191138-d8f796af33cc | ISC |
| [github.com/elastic/go-ucfg](https://github.com/elastic/go-ucfg) | v0.8.8 | Apache-2.0 |
| [github.com/ghodss/yaml](https://github.com/ghodss/yaml) | v1.0.0 | MIT |
| [github.com/gkampitakis/go-snaps](https://github.com/gkampitakis/go-snaps) | v0.5.8 | MIT |

I'm sorry I didn't get this in your previous PR. Would you please fix the auto-generated file in main?

As an extra issue, the markdown comments in the new Docs V3 system should be made with % (details here ), so the following won't work as a comment:

<!--- Generated documentation. Please do not edit. --->

It should be:

% Generated documentation. Please do not edit.

@pebrc
Copy link
Collaborator

pebrc commented Mar 6, 2025

@pebrc : FYI, while fixing the conflicts:

* File `advanced-topics/service-meshes.asciidoc` was modified in main branch and we are deleting it in this PR.

I can open a PR against the new docs repo for that.

* File `release-notes/2.16.0.asciidoc` was modified in main branch and we are deleting it in this PR.

We can ignore this change as it was backported to the 2.16 branch already.

@pebrc
Copy link
Collaborator

pebrc commented Mar 6, 2025

You are running into another problem with the build.

cloud-on-k8s/Makefile

Lines 499 to 507 in 95acd68

# Check if the predicate names in upgrade_predicates.go, are equal to the predicate names
# defined in the user documentation in orchestration.asciidoc.
check-predicates: CODE = pkg/controller/elasticsearch/driver/upgrade_predicates.go
check-predicates: DOC = docs/orchestrating-elastic-stack-applications/elasticsearch/orchestration.asciidoc
check-predicates: PREDICATE_PATTERN = [a-z]*_[A-Za-z_]*
check-predicates:
@ diff \
<(grep "name:" "$(CODE)" | grep -o "$(PREDICATE_PATTERN)" ) \
<(grep '\*\* [a-z]' "$(DOC)" | grep -o "$(PREDICATE_PATTERN)" )

This is some code that we added to verify that the documentation was always up to date compared to the code. Unfortunately with the docs moving out of this repo this check won't work anymore and you will have to either remove it or move the documentation of the update predicates back into this repo as reference documenation.

@eedugon
Copy link
Contributor Author

eedugon commented Mar 6, 2025

working on this, @pebrc, thanks for flagging it.

eedugon added a commit to elastic/docs-content that referenced this pull request Mar 6, 2025
Moving the ECK upgrade predicates to reference documentation per
elastic/cloud-on-k8s#8496 (comment)

- [Advanced control during rolling
upgrades](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/697/deploy-manage/deploy/cloud-on-k8s/nodes-orchestration#k8s-advanced-upgrade-control)

@shainaraskas : Let me know your thoughts, as this isn't exactly what we
have talked about :) I'd like to know if you like it this way or if you
prefer to keep the example and all narrative in this doc.

I think it's simpler this way, having only an introduction to the topic
and a link to the reference documentation for the list of predicates and
the use case example.

---------

Co-authored-by: shainaraskas <[email protected]>
@eedugon
Copy link
Contributor Author

eedugon commented Mar 6, 2025

@pebrc : This PR is mergeable now. Feel free to review it.

We have added to docs/reference a new doc with the info about upgrade predicates and the example use case, and updated the Makefile to perform the verification with the new .md file.

In the main nodes orchestration doc we have updated the content with just an introduction and link to reference in the Advanced control during rolling upgrades section.

Let us know your thoughts. We can also change the title of the new reference doc at a later stage.

@pebrc pebrc enabled auto-merge (squash) March 7, 2025 09:27
@pebrc pebrc merged commit 76f867a into elastic:main Mar 7, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs Documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants