88fantasy commented on PR #12210:
URL: https://github.com/apache/seatunnel/pull/12210#issuecomment-7300052599

   Thanks @SEZ9 for the follow-up. The source read was on `7fd85ac088`. The 
current head is `5cec184142`, which also includes the later terminal-send fixes 
(`f8f7ba2f9`) and a JobManager parent-loader IT for the `execute(StreamGraph)` 
registration path. Item-to-source/test mapping below.
   
   **Already accepted in source (F8, F10)**
   Agreed. No further change on those points.
   
   **F3 (heartbeat interval vs stalling other jobs)**
   I am not adding an upper bound for `openlineage_heartbeat_min_interval_ms`. 
A very large value only widens the gap between heartbeat sends (or disables 
heartbeats when set to `0`). It does not lengthen a single HTTP send, and the 
send path does not block for that interval. The risk of one job holding up 
others on a session JobManager is already bounded by the per-call caps: timeout 
1..60000 ms and retries 0..10. Heartbeats also run on a per-job daemon 
scheduler rather than a shared thread.
   
   **F4 (worst-case blocking time)**
   `LineageRuntime.eventSetBudgetNanos` sets one event-set budget:
   
   `(retryTimes + 1) * 3 * timeoutMs + backoff + 1000 ms`
   
   The factor of 3 is because one HTTP attempt can spend `timeoutMs` in each of 
the connect, connection-request, and socket phases. At the maximum caps (60000 
ms, 10 retries, backoff 550 ms) the budget is 1,981,550 ms (about 33 minutes).
   
   The budget is checked between sends and does not interrupt a send already in 
progress. After a full first cycle, about 1 second of slack can remain, so a 
second send may still start and then run another full cycle. The resulting 
worst-case blocking time for one `emitEach` call is therefore about 3,961,100 
ms (about 66 minutes). That bound applies both to the submitting thread (client 
START, and FAIL when the job never starts) and to the JobManager thread (hook 
COMPLETE/FAIL/ABORT, and RUNNING heartbeats).
   
   Coverage: 
`LineageRuntimeTest.skipsOutputsThatWouldStartAfterTheEventSetBudget` advances 
a test clock after the first successful `tryEmit` and asserts later outputs are 
not started; `LineageRuntimeTest.stopsTheEventSetAfterTheFirstFailedDelivery` 
covers stop-on-failure. Those tests do not assert the millisecond figure above; 
that figure comes from `eventSetBudgetNanos`.
   
   **F5 (token key in the YAML example)**
   The job `env {}` HOCON example correctly omits the token. The Flink cluster 
YAML example does not yet include `openlineage.auth_token`. I will add a 
placeholder key there in a follow-up commit (no real token, and it will stay 
out of the job example).
   
   **F7 (packaging and E2E)**
   On the current head, a JDK 17 run of 
`TestPackagedFlinkLineageHooksIT.packagedStarterReportsLineageSupported` passed 
(1/1).
   
   `TestLineageSubmitIT` was rewritten as a forked-JVM parent-loader IT: the 
client still builds the graph through `FlinkLineageSupport.register`, which is 
the `execute(StreamGraph)` registration path. `StreamGraph` itself is not 
serializable, so the test compiles the `JobGraph` Flink would submit, copies 
`seatunnel-lineage-flink-*-shaded.jar` into a temporary `lib/`, and a child JVM 
whose parent classpath is Flink plus that jar deserializes and runs it with 
MiniCluster. It asserts the hook `CodeSource` is the copied shaded jar and that 
the stub receiver gets START and COMPLETE. The negative case 
`jobGraphWithoutTheLibJarCannotLoadTheHook` fails with 
`ClassNotFoundException`/`NoClassDefFoundError` for `LineageJobStatusHook`. 
Both tests passed on JDK 17 (2/2).
   
   A full Docker/standalone Flink cluster preflight is not included in this PR; 
it remains a later step if needed.
   
   **F2 (cluster-level control)**
   Agreed that token protection is not a cluster-level kill switch. The 
JobManager still resolves non-sensitive fields with job/env/cluster precedence, 
so a job can still override enablement or the target URL. I will document this 
limit explicitly rather than add a new cluster-side setting that a job cannot 
override, unless you would rather have that control in this PR.
   
   **F6 (Flink 1.13/1.15)**
   Yes. In `FlinkExecution` the constructor calls 
`LineageConfig.rejectJobAuthToken` first, then 
`FlinkLineageSupport.isSupported()`, and only then 
`FlinkLineageSupport.resolveConfig` (`FlinkExecution.java:112-122`). On 
unsupported starters, illegal timeout/retry/URL values do not fail 
construction; a job-level auth token is still rejected. Tests: 
`FlinkLineageSupportTest.unsupportedStarterDoesNotFailConstructionWhenLineageOptionsAreIllegal`
 and `unsupportedStarterStillRejectsAJobAuthToken`.
   
   Please take a look at `5cec184142` when convenient.
   


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