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

RTD Docs: Fields Reference example links are broken #12453

Closed
3 tasks done
agilgur5 opened this issue Jan 4, 2024 · 6 comments · Fixed by #12465
Closed
3 tasks done

RTD Docs: Fields Reference example links are broken #12453

agilgur5 opened this issue Jan 4, 2024 · 6 comments · Fixed by #12465
Assignees
Labels
area/docs Incorrect, missing, or mistakes in docs P2 Important. All bugs with >=3 thumbs up that aren’t P0 or P1, plus: Any other bugs deemed important solution/suggested A solution to the bug has been suggested. Someone needs to implement it. type/bug type/regression Regression from previous behavior (a specific type of bug)

Comments

@agilgur5
Copy link
Member

agilgur5 commented Jan 4, 2024

Pre-requisites

  • I have double-checked my configuration
  • I can confirm the issues exists when I tested with :latest
  • I'd like to contribute the fix myself (see contributing guide)

What happened/what you expected to happen?

In the Fields Reference on RTD at https://argo-workflows.readthedocs.io/en/latest/fields/ all of the "Examples" dropdowns are currently not rendering markdown properly and are displaying raw text. See below screenshot:

Screenshot 2024-01-03 at 11 19 35 PM

As a result the list is not displaying correctly and you can't directly click the links either.

I'm actually not yet sure why this is happening, which is why I filed an issue instead of a PR currently

Regression from #12360, although again not entirely sure how/why, potentially due to mkdocs dep version changes?

Version

https://argo-workflows.readthedocs.io/en/latest/fields/

Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

n/a this is specific to the docs

Logs from the workflow controller

n/a this is specific to the docs

Logs from in your workflow's wait container

n/a this is specific to the docs
@agilgur5 agilgur5 added type/bug type/regression Regression from previous behavior (a specific type of bug) area/docs Incorrect, missing, or mistakes in docs P2 Important. All bugs with >=3 thumbs up that aren’t P0 or P1, plus: Any other bugs deemed important labels Jan 4, 2024
@jmeridth
Copy link
Member

jmeridth commented Jan 4, 2024

It's the <details> sections for the examples (code). I know that is a GitHub markdown thing but don't know if it is through another extension in mkdocs. Definitely a plugin/extension that went missing. I'm looking into this.

@jmeridth
Copy link
Member

jmeridth commented Jan 4, 2024

Possibly related? squidfunk/mkdocs-material#4084

@agilgur5
Copy link
Member Author

agilgur5 commented Jan 4, 2024

We do use pymdownx.details which is mentioned in squidfunk/mkdocs-material#4084 (comment). It's included as part of mkdocs-material.

Although the code you linked above (which is generated by hack/docgen.go) actually doesn't use the syntax from pymdownx.details... 🤔
I wonder if potentially it just happened to work in one version and then broke as it wasn't intended to be used like that anyway.

We'd want to use the md_in_html extension then and add the markdown attribute to all the details blocks. I do want to investigate a bit more before implementing that though

@agilgur5
Copy link
Member Author

agilgur5 commented Jan 4, 2024

I figured it out.

make docs will create the correct docs, but mkdocs build won't. Specifically there's a line in the Makefile:

# fix the fields.md document
go run -tags fields ./hack parseexamples

That will end up running hack/parse_examples.go which modifies the rendered output from mkdocs.

And that code is not currently running in RTD's build.

It probably makes sense to have this work with a mkdocs extension instead of a custom hack, so I'm going to go ahead and modify it as such.

@agilgur5 agilgur5 self-assigned this Jan 4, 2024
@jmeridth
Copy link
Member

jmeridth commented Jan 4, 2024

@agilgur5 nice catch. agreed re: not using a hack. Sorry I missed this.

@agilgur5 agilgur5 added the solution/suggested A solution to the bug has been suggested. Someone needs to implement it. label Jan 4, 2024
@agilgur5
Copy link
Member Author

agilgur5 commented Jan 4, 2024

I missed it during review too; I suppose that's one of the problem with hacks, they can be missed easily if you don't know about them 😅

But good thing we are now removing a handful of hacks with these updates!

@agilgur5 agilgur5 added this to the v3.5.x patches milestone Apr 9, 2024
@argoproj argoproj locked as resolved and limited conversation to collaborators Jul 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/docs Incorrect, missing, or mistakes in docs P2 Important. All bugs with >=3 thumbs up that aren’t P0 or P1, plus: Any other bugs deemed important solution/suggested A solution to the bug has been suggested. Someone needs to implement it. type/bug type/regression Regression from previous behavior (a specific type of bug)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants