Skip to content

Java SDK: Rewrite the user docs around Dag definition - #74701

Merged
jason810496 merged 5 commits into
apache:mainfrom
jason810496:docs/java-sdk/align-user-docs
Oct 23, 2026
Merged

jason810496 merged 5 commits into
apache:mainfrom
jason810496:docs/java-sdk/align-user-docs

Conversation

@jason810496

@jason810496 jason810496 commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Why

The Java SDK guide started from stub tasks of a Python Dag and did not cover conditions, switches or TriggerDagRun, and the README mixed user docs with the contributor and release guide.

What

  • java.rst: rewrite it in the same order as the TypeScript guide.
    • Quick start with a Dag defined in Java, then every Dag-definition feature, annotation style first and interface style second.
    • New sections for @Airflow.If / dag.If, @Airflow.Switch / dag.Switch and TriggerDagRun.
    • Then stub TaskHandlers, with a table of how arguments bind by position and by name.
    • Tables for the Client methods and the logging integrations.
  • java-sdk/README.md: keep installation, a quick start, links to the guide and the compatibility matrix.
  • java-sdk/DEVELOPMENT.md: new, holding the build, release and contributing content moved from the README. References to it are updated.
  • java-sdk/example/README.md: new, listing the example Dags under "Dag definition" and "Python Dag with stub TaskHandler".
  • java-sdk/sdk/module.md (API reference landing page): add a quick start.

Was generative AI tooling used to co-author this PR?

@jason810496
jason810496 force-pushed the docs/java-sdk/align-user-docs branch 2 times, most recently from 6cf0e4f to bd256f1 Compare October 20, 2026 02:07
@jason810496
jason810496 marked this pull request as ready for review October 20, 2026 03:55
@jason810496 jason810496 added the backport-to-v3-4-test Backport to v3-4-test label Oct 20, 2026
@jason810496 jason810496 added this to the Airflow 3.4.0 milestone Oct 20, 2026

@FrankYang0529 FrankYang0529 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR. Leave some comments.

Comment thread airflow-core/docs/authoring-and-scheduling/language-sdks/java.rst
Comment thread java-sdk/example/README.md
Comment thread airflow-core/docs/authoring-and-scheduling/language-sdks/java.rst
Comment thread java-sdk/sdk/module.md
Comment thread airflow-core/docs/authoring-and-scheduling/language-sdks/java.rst Outdated
Comment thread airflow-core/docs/authoring-and-scheduling/language-sdks/java.rst Outdated
Comment thread airflow-core/docs/authoring-and-scheduling/language-sdks/java.rst Outdated
Comment thread airflow-core/docs/authoring-and-scheduling/language-sdks/java.rst Outdated

@jason810496 jason810496 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for the review.

Comment thread airflow-core/docs/authoring-and-scheduling/language-sdks/java.rst
Comment thread java-sdk/example/README.md
Comment thread airflow-core/docs/authoring-and-scheduling/language-sdks/java.rst
Comment thread java-sdk/sdk/module.md
Comment thread airflow-core/docs/authoring-and-scheduling/language-sdks/java.rst Outdated
Comment thread airflow-core/docs/authoring-and-scheduling/language-sdks/java.rst Outdated
Comment thread airflow-core/docs/authoring-and-scheduling/language-sdks/java.rst Outdated
Comment thread airflow-core/docs/authoring-and-scheduling/language-sdks/java.rst Outdated
@jason810496
jason810496 force-pushed the docs/java-sdk/align-user-docs branch from c75ec90 to dc14053 Compare October 22, 2026 04:21
@jason810496
jason810496 requested a review from uranusjr October 22, 2026 07:59
@jason810496
jason810496 force-pushed the docs/java-sdk/align-user-docs branch from dc14053 to c289b5a Compare October 22, 2026 08:31
Comment thread airflow-core/docs/authoring-and-scheduling/language-sdks/java.rst Outdated
Comment thread java-sdk/sdk/module.md Outdated

@uranusjr uranusjr left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Pending depended #74538 being merged first.

@jason810496
jason810496 force-pushed the docs/java-sdk/align-user-docs branch from c289b5a to b6f358f Compare October 22, 2026 12:48
jason810496 and others added 5 commits October 23, 2026 03:06
Reorder the Java SDK guide to start from a Dag defined in Java, document
conditions, switches and TriggerDagRun, and add a table of how stub task
arguments bind. Split the README into a user landing page and
DEVELOPMENT.md, and add an example README.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Set the queue once on the Dag in every example, now that a Java Dag takes
one, and bump the documented version to 1.0.0-beta2 everywhere. Add a prek
hook that fails when the guide, the README and the Dokka landing page name
different versions. Restore the TaskInput constraints, correct the
LocalExecutor wording, and drop the Python Label comparison.

Co-Authored-By: Claude <noreply@anthropic.com>
The quick start appears on three pages. The guide owns it now, between
SHARED SNIPPET markers, and the sync-java-sdk-docs hook copies it into the
other two and still checks that all three install the same version.

Co-Authored-By: Claude <noreply@anthropic.com>
The three pages that show how to install the SDK pinned a release that is
not out yet, which also held the PR back. They now install `<version>` and
link to Maven Central, and the sync hook fails when a page names a release
instead. The parse-failure bullet leads with the SDK release a JAR was built
with, and keeps the supervisor schema version as the explanation.

Co-Authored-By: Claude <noreply@anthropic.com>
@jason810496
jason810496 force-pushed the docs/java-sdk/align-user-docs branch from b6f358f to 1b80207 Compare October 23, 2026 03:07
@jason810496
jason810496 merged commit a419633 into apache:main Oct 23, 2026
147 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-4-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
❌ v3-4-test Commit Link

You can attempt to backport this manually by running:

cherry_picker a419633 v3-4-test

This should apply the commit to the v3-4-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants