uranusjr commented on code in PR #75445:
URL: https://github.com/apache/airflow/pull/75445#discussion_r4358111277
##########
ts-sdk/example/src/hitl.ts:
##########
@@ -134,4 +134,7 @@ form.task("rollout", async ({ answer }: { answer:
HITLResult }) => ({
approvedBy: answer.respondedByUser?.name,
}))({ answer: sized });
-await new Bundle(release, regions, nightly, strict, assigned, form).serve();
+/** The Dags this module declares, exported so another bundle can serve them
too. */
+export const dags = [release, regions, nightly, strict, assigned, form];
+
+await new Bundle(...dags).serve();
Review Comment:
This is done both here and in ai-approval at module level. Another bundle
that imports the newly exported Dags also starts serving them, which sets the
SDK’s global “already served” flag and opens the connection to Airflow. That
bundle’s own `serve()` call would then throw _bundle.serve() was already
called_.
The fix is to move the Dag declarations into their own module, and keep a
thin file that only serves them. Since nothing in the repo imports these Dags
yet, the other option is to drop this part; it’s unrelated to the rename anyway.
--
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]