Move from using the docker image to java2docfx for docs validation
The docs team has new tooling to generate docs for a given library. The tool is a java library and is currently named com.microsoft:java2docfx. The tool is published to the public tools dev feed and, when officially released, will be published to Maven. This change removes the docker image dependency for docs validation and replaces it with java2docfx, a standalone tool that is used to generate docs.
Note: The changes to template's yml file, to enable docs, will be revered before I turn the draft PR into a real boy.
The big changes are as follows:
- eng/pipelines/templates/steps/mvn-linux-settings-for-docs.yml - This would setup the dev feed for nightly docs verification to setup the java public dev feed but now it also sets up the docs public dev feed so we can grab the java2docfx jar. This was originally some inline PowerShell, however, it wasn't in all the places it needed to be, so I turned it into a template. This needs to be a step before the update-docsms-metadata.yml template.
- eng/pipelines/templates/steps/install-rex-validation-tool.yml - Install the java2docfx jar file into a java2docfx subdirectory of the Build.BinariesDirectory. We need to know exactly where the jar file is because the execution of the tool requires
java -jar <pathToJava2docfx>/java2docfx.jar. The Build.BinariesDirectory is where tools being downloaded are supposed to be installed and the java2docfx subdirectory that's created ensures that running the command shouldn't tangle with anything that's currently there. - eng/scripts/Language-Settings.ps1 - The lion's share of the work was done in here. I removed some dead code and the original validation functions and replaced them with calls to java2docfx. As previously mentioned, the command to run the docs tooling requires us to know exactly where the java2docfx jar file is since the command to run it is
java -jar <pathToJava2docfx>/java2docfx.jar. This is what will be run instead of the original validation which used the docker image.
The rest of the changes were to ensure that the correct templates were used in the correct places of the release ymls. Eventually, we'd like to start doing docs validation after the binaries are built so we validate in PR runs but that's for a later date.
I think we should add a pipeline which checks for a newer version of the tool and opens a PR to upgrade if a newer version is available.
This is done with
UpgradeRexToolin the JS docindex pipeline but could probably be refactored out to a separate pipeline to avoid confusion.
Agreed, but being that the tool hasn't been published outside of their dev feed yet, that pipeline is going to have to wait.
Fixes #39626
Hi @JimSuplizio since this change, release pipeline start to fail on Apply Documentation Updates, seems like jdk version is not compatible, but I didn't find where to control the base version, could you help take a look?
Here are pipeline links:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3853927&view=logs&j=63a32430-92b9-58ea-54f9-42fb3c6d8526&t=b2898b05-3b3c-557a-ea62-390e64f0a3d5
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3940185&view=logs&j=63a32430-92b9-58ea-54f9-42fb3c6d8526&t=b2898b05-3b3c-557a-ea62-390e64f0a3d5
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4030288&view=logs&j=63a32430-92b9-58ea-54f9-42fb3c6d8526&t=b2898b05-3b3c-557a-ea62-390e64f0a3d5
Hi @JimSuplizio since this change, release pipeline start to fail on
Apply Documentation Updates, seems like jdk version is not compatible, but I didn't find where to control the base version, could you help take a look? Here are pipeline links: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3853927&view=logs&j=63a32430-92b9-58ea-54f9-42fb3c6d8526&t=b2898b05-3b3c-557a-ea62-390e64f0a3d5 https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3940185&view=logs&j=63a32430-92b9-58ea-54f9-42fb3c6d8526&t=b2898b05-3b3c-557a-ea62-390e64f0a3d5 https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4030288&view=logs&j=63a32430-92b9-58ea-54f9-42fb3c6d8526&t=b2898b05-3b3c-557a-ea62-390e64f0a3d5
@Netyyyy. so we're clear on this. The tool worked fine against the spring 4.x version and not against the 5.x version. There's an ICM ticket filed for the java2docfx failure and I've emailed you and the tool owner. The two of you can figure this out.
The last thing I'd like to mention is that I'm not happy with you calling out that the "release" pipeline started to fail. Your nightly pipelines have been failing, for main, since your PR was merged in mid-July and it's clear the scheduled builds have been ignored. You need to start paying attention to your pipeline builds.