jason810496 commented on code in PR #75445:
URL: https://github.com/apache/airflow/pull/75445#discussion_r4358563088


##########
airflow-core/docs/authoring-and-scheduling/language-sdks/typescript.rst:
##########
@@ -595,23 +595,25 @@ for the full concept, including the equivalent Python API.
       let jobId = await store.get<string>("job_id");
       if (jobId == null) {
         jobId = await submitSparkJob();
-        await store.set("job_id", jobId, { retentionMs: NEVER_EXPIRE });
+        await store.set("job_id", jobId, { retentionSeconds: NEVER_EXPIRE });
       }
 
       const result = await waitForSparkJob(jobId);
       await store.delete("job_id");
       return result;
     }
 
-**Retention.** ``retentionMs`` is milliseconds to retain the key, counted from 
the time of the write:
+**Retention.** ``retentionSeconds`` is seconds to retain the key, counted from 
the time of the write.
+Every duration in this SDK is a number of seconds, ``executionTimeout`` and 
``retryDelay`` included:

Review Comment:
   Addressed in aaab63f6.



##########
ts-sdk/src/sdk/client-types.ts:
##########
@@ -63,14 +63,14 @@ export const NEVER_EXPIRE: unique symbol = 
Symbol("apache-airflow-ts-sdk/NEVER_E
 /** Options for a task state store write. */
 export interface TaskStateStoreSetOpts {
   /**
-   * Milliseconds to retain the key, counted from the write; `0` expires it
+   * Seconds to retain the key, counted from the write; `0` expires it
    * immediately.
    *
    * Omitting it follows the deployment's `[state_store] 
default_retention_days`,
    * which the coordinator passes to the runtime. Pass {@link NEVER_EXPIRE} to
    * store the key with no expiry regardless of that default.
    */
-  retentionMs?: number | typeof NEVER_EXPIRE;
+  retentionSeconds?: number | typeof NEVER_EXPIRE;

Review Comment:
   Renamed to retention in dd97f5e2. timeoutSeconds is renamed to timeout in 
377ed146.



##########
ts-sdk/src/coordinator/client.ts:
##########
@@ -161,24 +162,25 @@ function toExpiresAt(ms: number): string {
   const at = new Date(Date.now() + ms);
   if (Number.isNaN(at.getTime()) || at.getUTCFullYear() > 9999) {
     throw new RangeError(
-      `retention of ${ms}ms overflows the wire timestamp; use NEVER_EXPIRE 
instead`,
+      `a retention that ends ${ms}ms from now overflows the wire timestamp; ` +
+        "use NEVER_EXPIRE instead",

Review Comment:
   Addressed in 3ca4fa5d.



-- 
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