Skip to content

[DOCS] Add option to make GH issue link required for experimental/beta macros #1710

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

Closed
1 of 4 tasks
jrodewig opened this issue Jan 21, 2020 · 6 comments
Closed
1 of 4 tasks
Labels
asciidoc Asciidoc and our Asciidoctor extensions defer docs-build Relates to the build tooling and scripts

Comments

@jrodewig
Copy link
Contributor

jrodewig commented Jan 21, 2020

We add the experimental::[] and beta::[] macros to Elasticsearch documentation not ready for GA. However, these tags don't currently indicate what steps are needed to get a feature to GA.

To solve this, we can require a related GH issue link for any experimental::[] or beta::[] tag. We should investigate whether that requirement is technically feasible in our docs build and tests.

To Do

  • Add arg for issue links to beta::[] and experimental::[] block macros. _source field not being returned when a script field is specified elasticsearch#1705

  • Create a doc build option flag to enable/disable link checks for beta::[] and experimental::[] block macros. This flag should be settable in conf.yaml and default to false to avoid impacting other doc books.

    When enabled, this flag should only work on the latest branch (e.g. master for Elasticsearch). This means we won't have to update the macros in branches that are no longer maintained.

    See Introduce MIGRATION warnings #686 for a loose example.

  • Create an Asciidoctor preprocessor extension to check for links or {issue} attributes in the beta::[] and experimental::[] block macros. The extension should emit a warning if the link is not included.

    See /elastic_compat_preprocessor/extension.rb for an example preprocessor extension with logic for catching beta and experimental block macros.

    See migration_log.rb for an example warning implementation.

  • Enable the link check option for the Elasticsearch book build in conf.yaml.

@jrodewig jrodewig self-assigned this Jan 21, 2020
@elasticmachine
Copy link

Pinging @elastic/es-docs (:Docs)

@nik9000
Copy link
Member

nik9000 commented Jan 21, 2020

To solve this, we can require a related GH issue link for any [[experimental]] or [[beta]] tag. We should investigate whether that requirement is technically feasible in our docs build or tests.

The docs have a "migration" warning mechanism that we can use to make this a requirement only for the master branch. OTOH, it'd make this a requirement across all docs, not just Elasticsearch. I can't quite tell how many docs have warnings without a little more work than I'd like to do right now.

@nik9000
Copy link
Member

nik9000 commented Jan 21, 2020

We can certainly make the experimental and beta macros take an argument for the issue url and add the link.

@jrodewig
Copy link
Contributor Author

We can certainly make the experimental and beta macros take an argument for the issue url and add the link.

I put up a PR to support the GitHub issue arg here: #1705

That should make it easier to link GitHub issues, but it's still not the forcing function we're looking for. I'll also plan to research the migration warning mechanism @nik9000 mentioned.

@jrodewig jrodewig transferred this issue from elastic/elasticsearch Jan 24, 2020
@jrodewig
Copy link
Contributor Author

jrodewig commented Jan 24, 2020

I added a "To do" section to this issue based on my research.

This confirms requiring the links is feasible, but it'll take a non-trivial development effort. However, I'm not an experienced developer so there might be better solutions I'm not aware of.

I've also transferred this ticket to the elastic/docs repo, where most of the work will need to take place. While the Elasticsearch team requested this feature, it could be used by other doc books.

I'm unassigning myself from this ticket. While I may attempt to work on these tasks as time permits, my progress is likely to be slow.

@jrodewig jrodewig removed their assignment Jan 24, 2020
@jrodewig jrodewig changed the title [DOCS] Make GH issue link required for experimental/beta macros [DOCS] Add option to make GH issue link required for experimental/beta macros Jan 24, 2020
@gtback gtback added asciidoc Asciidoc and our Asciidoctor extensions docs-build Relates to the build tooling and scripts labels May 14, 2020
@gtback gtback added the defer label Sep 4, 2020
@jrodewig
Copy link
Contributor Author

jrodewig commented Jun 4, 2021

Closing this as it's no longer a priority with the new docs system.

@jrodewig jrodewig closed this as completed Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asciidoc Asciidoc and our Asciidoctor extensions defer docs-build Relates to the build tooling and scripts
Projects
None yet
Development

No branches or pull requests

4 participants