Repository navigation
Java SDK: Add setVariable and deleteVariable to the task Client - #72676
Merged
jason810496 merged 2 commits intoSep 14, 2026
Merged
Conversation
FrankYang0529
force-pushed
the
airflow-java-sdk-variable-write
branch
from
September 8, 2026 02:44
19664bc to
8236bb2
Compare
FrankYang0529
marked this pull request as ready for review
September 8, 2026 04:17
FrankYang0529
requested review from
amoghrajesh,
ashb,
bugraoz93,
gopidesupavan,
jason810496,
jscheffl,
potiuk and
uranusjr
as code owners
September 8, 2026 04:17
jason810496
reviewed
Sep 8, 2026
jason810496
left a comment
Member
There was a problem hiding this comment.
Thanks for filling up the gap, no major concern from me. LGTM overall, thanks.
FrankYang0529
force-pushed
the
airflow-java-sdk-variable-write
branch
2 times, most recently
from
September 8, 2026 12:11
79c506c to
1ff0335
Compare
Signed-off-by: PoAn Yang <payang@apache.org>
Signed-off-by: PoAn Yang <payang@apache.org>
FrankYang0529
force-pushed
the
airflow-java-sdk-variable-write
branch
from
September 8, 2026 13:17
1ff0335 to
72b72e2
Compare
jason810496
approved these changes
Sep 8, 2026
1 task done
1 task done
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
setVariableanddeleteVariableto the Java SDK taskClient, which completes thevariable-read-writeruntime capability.How
Client.setVariable(key, value, description)andClient.deleteVariable(key).descriptiondefaults to null.setVariablehas@JvmOverloads, like the existinggetXComandsetXCom, because Java cannot use Kotlin default arguments. With the annotation, Java code can call it with two arguments.CoordinatorClient,setVariablesends aPutVariablemessage to the supervisor.deleteVariablesendsDeleteVariableand waits for the supervisor'sOKResponse.Frame.ktserializesPutVariablewith@JsonInclude(ALWAYS). jsonschema2pojo annotates generated models withNON_NULL, so without the mixin a nulldescriptionwould be missing from the wire map. The supervisor would then fail validation and never reply, and the JVM would block forever.Verification
./gradlew :sdk:test :sdk:ktlintCheckbreeze testing airflow-e2e-tests --e2e-test-mode java_sdk tests/airflow_e2e_tests/java_sdk_tests/test_java_sdk_dag.pyWas generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.