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

Adding Java to TA language nav #2714

Merged

Conversation

meghan-kradolfer
Copy link
Contributor

We now have a golden path for setting up Java repos, so we should update the docs to allow customers to easily find the documentation on setup.

At the moment a customers have to go to References -> Importing JUnit XML. It would be easier for them just to see Java in the languages and then link to this page.

@buildkite-docs-bot
Copy link
Collaborator

Preview URL: https://2714--bk-docs-preview.netlify.app

@meghan-kradolfer
Copy link
Contributor Author

Note: Because the new page goes to the same page as 'Importing JUnit XML' both nav items are highlighted. Is this ok? Or is better to create seperate views?
Screenshot 2024-03-14 at 11 09 05 AM

@KatieWright26
Copy link
Contributor

Note: Because the new page goes to the same page as 'Importing JUnit XML' both nav items are highlighted. Is this ok? Or is better to create seperate views? Screenshot 2024-03-14 at 11 09 05 AM

It does seem a bit weird / the duo highlighting might be unclear as to why we're doing that. I feel like people would raise it as a bug. Does the highlighting work similarly to the _nav.html.erb where you can pass a param action to signify which nav element to highlight?

@pda
Copy link
Member

pda commented Mar 13, 2024

Interesting re. the nav highlighting.

It gets me thinking: nav highlighting aside, would people find it odd/sneaky/something that multiple nav items go to a single page which is more generic than some of those nav items suggest?

I guess the ideal thing would be adding a new Java-specific page which gives some guidance on how to get JUnit XML reports out of their Java test suite, and then links to the general Importing JUnit XML page.

@meghan-kradolfer
Copy link
Contributor Author

Does the highlighting work similarly to the _nav.html.erb where you can pass a param action to signify which nav element to highlight?

Nope, the nav items are added through a yaml file. So the highlighting is done programming based of the url/path

@meghan-kradolfer
Copy link
Contributor Author

It gets me thinking: nav highlighting aside, would people find it odd/sneaky/something that multiple nav items go to a single page which is more generic than some of those nav items suggest?

I guess the ideal thing would be adding a new Java-specific page which gives some guidance on how to get JUnit XML reports out of their Java test suite, and then links to the general Importing JUnit XML page.

What if we remove the 'Importing JUnit XML' nav and just have that under Java instead? It sounds like we only import JUnit XML so people would be looking for languages - Java anyway?

@pda
Copy link
Member

pda commented Mar 14, 2024

What if we remove the 'Importing JUnit XML' nav and just have that under Java instead? It sounds like we only import JUnit XML so people would be looking for languages - Java anyway?

I don't think so, because JUnit XML is the common format emitted by multiple non-Java languages.
e.g. a Rust test runner: https://nexte.st/book/junit.html

@meghan-kradolfer
Copy link
Contributor Author

What if we remove the 'Importing JUnit XML' nav and just have that under Java instead? It sounds like we only import JUnit XML so people would be looking for languages - Java anyway?

I don't think so, because JUnit XML is the common format emitted by multiple non-Java languages. e.g. a Rust test runner: https://nexte.st/book/junit.html

Ohh right, good to know! Hmm, maybe the best option is adding a new Java specific page. @gchan keen to get your reckons on this as well?

@gchan
Copy link
Contributor

gchan commented Mar 14, 2024

@meghan-kradolfer Yep, I agree with creating Java-specific page to get around the double highlighting in the nav.

I went through setting up a Java Junit test suite and documented my process

I got a little stuck on finding where the XML files are created so having some guidance on a new Java page on where to retrieve them and how to configure the plugin would be ideal.

For example, when using the Maven Surefire Plugin the files are generated in ${basedir}/target/surefire-reports/TEST-*.xml by default. So I configured the plugin like so

 - test-collector#v1.10.1:
     files: "target/surefire-reports/TEST-*.xml"
     format: "junit"

https://github.com/buildkite/ta-ingestion/blob/e4556f3a30682f044ecc17ff64d3eb1dbb8da22b/.buildkite/pipeline.yaml#L30C1-L32C26

@gilesgas
Copy link
Contributor

gilesgas commented Mar 14, 2024

It might be worthwhile considering implementing a redirect, similar to when you click on the Clusters > Queue metrics nav item in the Pipelines area of the docs and it redirects you to the Cluster queue metrics page of the docs.

Screenshot 2024-03-15 at 8 58 48 am

That way, you can avoid the odd multiple-page highlighting issue you described above.

Take a look at how this is implemented in the source code and let me know if you need help.

I hope to document some more best practices on how to contribute to the Buildlkite Docs at some point in the near future, when time permits.

@meghan-kradolfer
Copy link
Contributor Author

Thanks @gilesgas! @pda and @gchan how do you feel about this PR being just to set up that redirect, so then it solves the initial issue of Java language not being immediately findable?

I think if we are adding a whole new set of instructions for Java then we may also need to do this in the suite setup page in TA and I can write a couple of extra tickets to do that

@meghan-kradolfer meghan-kradolfer force-pushed the pie-2342-update-docs-to-add-java-to-language-nav branch from 695f2c4 to 9626bd7 Compare March 18, 2024 22:24
config/routes.rb Outdated
@@ -126,6 +126,7 @@
get "/docs/agent/upgrading", to: redirect("/docs/agent/v3/upgrading", status: 301)
get "/docs/agent/upgrading-to-v3", to: redirect("/docs/agent/v3/upgrading", status: 301)
get "/docs/clusters/queue-metrics", to: redirect("/docs/pipelines/cluster-queue-metrics", status: 301)
get "/docs/test-analytics/java", to: redirect("/docs/test-analytics/importing-junit-xml", status: 301)
Copy link
Contributor

Choose a reason for hiding this comment

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

not a biggie but it would be nice to align the to: on this line and the line previous!

Copy link
Contributor

@gilesgas gilesgas left a comment

Choose a reason for hiding this comment

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

Just had a quick chat with @meghan-kradolfer and will approve this now (to unblock merging).
However, please feel free to seek approval from another colleague before merging this.

Copy link
Contributor

@niceking niceking left a comment

Choose a reason for hiding this comment

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

Nice! ✨ Just the one style comment but not a blocker to merging

@meghan-kradolfer meghan-kradolfer merged commit 6f57c1c into main Mar 18, 2024
3 checks passed
@meghan-kradolfer meghan-kradolfer deleted the pie-2342-update-docs-to-add-java-to-language-nav branch March 18, 2024 22:55
@pda
Copy link
Member

pda commented Mar 18, 2024

how do you feel about this PR being just to set up that redirect, so then it solves the initial issue of Java language not being immediately findable?

Good pragmatic step in the right direction; maintain momentum 💪🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants