shivaam commented on code in PR #69295:
URL: https://github.com/apache/airflow/pull/69295#discussion_r3569572438
##########
ts-sdk/src/coordinator/runtime.ts:
##########
@@ -103,10 +103,37 @@ export function parseArgs(argv: readonly string[]):
ParsedArgs {
return { commAddr, logsAddr };
}
+export const AIRFLOW_METADATA_FLAG = "--airflow-metadata";
+
+/** Marks the manifest line on stdout, which import-time logging may also
reach. */
+export const AIRFLOW_METADATA_SENTINEL = "__AIRFLOW_METADATA__ ";
+
+/** Bundle manifest fields only the built bundle itself knows: the schema
+ * version it was compiled against and the Dag/task pairs it registered.
+ * `airflow-ts-pack` runs `node bundle.mjs --airflow-metadata` to read this.
*/
+export interface BundleManifest {
+ supervisor_schema_version: string;
+ dags: Record<string, { tasks: string[] }>;
+}
Review Comment:
I am thinking if we should move this to a separate file called manifest.ts —
BundleManifest, buildBundleManifest, AIRFLOW_METADATA_FLAG and the sentinel.
Right now pack.ts imports these from the runtime, so the build-time stuff sits
in the runtime.
It will also help when the source/integrity follow-up comes, we can change
the introspection payload or add a version field without touching runtime.ts.
Not a blocker
##########
ts-sdk/src/coordinator/runtime.ts:
##########
@@ -103,10 +103,37 @@ export function parseArgs(argv: readonly string[]):
ParsedArgs {
return { commAddr, logsAddr };
}
+export const AIRFLOW_METADATA_FLAG = "--airflow-metadata";
+
+/** Marks the manifest line on stdout, which import-time logging may also
reach. */
+export const AIRFLOW_METADATA_SENTINEL = "__AIRFLOW_METADATA__ ";
+
+/** Bundle manifest fields only the built bundle itself knows: the schema
+ * version it was compiled against and the Dag/task pairs it registered.
+ * `airflow-ts-pack` runs `node bundle.mjs --airflow-metadata` to read this.
*/
+export interface BundleManifest {
+ supervisor_schema_version: string;
+ dags: Record<string, { tasks: string[] }>;
+}
Review Comment:
I am thinking if we should move this to a separate file called manifest.ts —
BundleManifest, buildBundleManifest, AIRFLOW_METADATA_FLAG and the sentinel.
Right now pack.ts imports these from the runtime, so the build-time stuff sits
in the runtime.
Not a blocker
--
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]