Skip to content

Conversation

@newtork
Copy link
Contributor

@newtork newtork commented Oct 15, 2025

Context

Follow up from
#866

Backlog:
https://github.com/SAP/cloud-sdk-java-backlog/issues/482

Workflow:
https://github.com/SAP/cloud-sdk-java/actions/workflows/javadoc.yaml

Generated PR in Documentation Portal:
SAP/cloud-sdk#2274

Feature scope:

  • JavaDoc Aggregate
  • Make part of (prepare) release process
  • Hide non-production modules
    PROJECTS: "!:rfc,!:dwc-cf,!:datamodel-metadata-generator,!:odata-generator,!:odata-generator-maven-plugin,!:odata-generator-utility,!:odata-v4-generator,!:odata-v4-generator-maven-plugin,!:s4hana-connectivity,!:soap,!:testutil,!:s4hana-core" 
    

Usage

In upcoming dedicated workflow:

  1. Clone repo
  2. Install locally
  3. Run Delombok
  4. Replace source code with delombok'ed generated code
  5. Run Javadoc
  6. (Not depicted: Upload to documentation portal)
git clone --branch rel/5.24.0 --single-branch https://github.com/SAP/cloud-sdk-java.git
cd cloud-sdk-java

mvn install -DskipTests

PROJECTS='!:rfc,!:dwc-cf,!:datamodel-metadata-generator,!:odata-generator,!:odata-generator-maven-plugin,!:odata-generator-utility,!:odata-v4-generator,!:odata-v4-generator-maven-plugin,!:s4hana-connectivity,!:soap,!:testutil,!:s4hana-core'

mvn process-sources -Drelease --fail-at-end --projects $PROJECTS

find . -type d -path "*/target/delombok" -exec sh -c 'cp -r "$1"/* "$(dirname $(dirname "$1"))/src/main/java/"' _ {} \;

mvn clean javadoc:aggregate -Drelease -Djava.failOnWarning=false -Djavadoc.sourcepath=src/main/java --projects $PROJECTS

Find HTML in ./target/reports/apidocs/

Sample output

apidocs.zip

See Screenshot image

Definition of Done

  • Functionality scope stated & covered
  • Tests cover the scope above
  • Error handling created / updated & covered by the tests above
  • Documentation updated
  • Release notes updated

@newtork newtork marked this pull request as draft October 15, 2025 15:49
@newtork newtork added please merge Request to merge a pull request please review Request to review a pull request labels Oct 16, 2025
@newtork newtork marked this pull request as ready for review October 16, 2025 12:30
Copy link
Contributor

@CharlesDuboisSAP CharlesDuboisSAP left a comment

Choose a reason for hiding this comment

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

Why did you create a standalone job instead of putting it into the release like it was before?

@newtork
Copy link
Contributor Author

newtork commented Oct 16, 2025

Why did you create a standalone job instead of putting it into the release like it was before?

It allows for custom branch/tag selection, but primarily because I felt like I don't want to add another point of failure to the release job again. :/

It's a bit awkward we have so many secondary actions in the release, that are technically not functional requirements. But they break the process if something goes wrong.

I'm okay with putting it to the release process, but maybe we can find a way to address this concern in the future.

@Jonas-Isr
Copy link
Member

I like the outlook of having a slimmer release process. It makes both troubleshooting and rerunning the workflow(s) faster. The downside is that it is slightly less automation then, i.e., one more button press the releasing person has to do themself. I would still be of the opinion that having it as a separate workflow is better. If we want to have an aggregated javadoc created for each release, we should then add an additional point to the release PR message in the prepare-release workflow.

Copy link
Member

@Jonas-Isr Jonas-Isr left a comment

Choose a reason for hiding this comment

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

Minor points, besides that I like it :)

Comment on lines 95 to 107
- name: "Create JavaDoc PR"
id: create-javadoc-pr
if: ${{ steps.replace-javadoc.outputs.CREATE_PR == 'true' }}
working-directory: ./.cloud-sdk-docs
run: |
PR_TITLE="Java: Update JavaDocs for release ${{ needs.bump-version.outputs.release-version }}"
PR_BODY="Replace the contents of v${{ steps.determine-major-version.outputs.MAJOR_VERSION }} API docs with the latest release of the SDK."
PR_URL=$(gh pr create --title "$PR_TITLE" --body "$PR_BODY" --repo "${{ env.DOCS_REPO }}")
echo "PR_URL=$PR_URL" >> $GITHUB_OUTPUT
echo "PR: $PR_URL" >> $GITHUB_STEP_SUMMARY
env:
GH_TOKEN: ${{ secrets.BOT_SDK_JS_FOR_DOCS_REPO_PR }}
Copy link
Member

Choose a reason for hiding this comment

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

We should add a TODO to the PR created in the prepare-release workflow to review, approve, and merge this JavaDoc PR after the release.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the workflow is triggered async, I can't put a direct URL to the upcoming JavaDoc PR.
However I used a generic link which should suffice, IMHO

Copy link
Member

@Jonas-Isr Jonas-Isr left a comment

Choose a reason for hiding this comment

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

LGTM

@newtork newtork merged commit 56d111b into main Oct 28, 2025
14 checks passed
@newtork newtork deleted the javadoc-aggregate-delombok branch October 28, 2025 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

please merge Request to merge a pull request please review Request to review a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants