FrankYang0529 commented on code in PR #73464:
URL: https://github.com/apache/airflow/pull/73464#discussion_r4180392352


##########
java-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/Client.kt:
##########
@@ -65,6 +68,14 @@ class Client internal constructor(
     const val XCOM_RETURN_KEY = "return_value"
   }
 
+  /**
+   * Key-value state scoped to the current task instance.
+   *
+   * Unlike XComs, entries survive retries and later runs of the same task, so
+   * they can carry things like an external job ID across attempts.
+   */
+  @JvmField val taskStateStore: TaskStateStore = TaskStateStore(details, impl)

Review Comment:
   1. Please rebase main and update 
`java-sdk/sdk/src/test/kotlin/org/apache/airflow/sdk/internal/ArgValuesTest.kt`.
 #73596 added the file. Without the change, Java SDK tests cannot be compiled.
   2. Mockito cannot stub `@JvmField val taskStateStore`. On a mock of `Client` 
the field is `null`, so a Java unit test for a task that calls 
`client.taskStateStore.get(...)` fails with a `NullPointerException`. A plain 
`val` would give Java callers `getTaskStateStore()`, and Mockito can stub that 
getter. Did you pick the field on purpose for the shorter Java syntax?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to