jason810496 commented on code in PR #73437:
URL: https://github.com/apache/airflow/pull/73437#discussion_r4089833384
##########
ts-sdk/src/cli/pack.ts:
##########
@@ -217,10 +237,29 @@ export async function runPack(argv: readonly string[]):
Promise<void> {
target: "node22",
// A digest is only worth taking over an artifact nobody reads or edits
in place.
minify: true,
+ plugins: [taskIds.plugin],
// The manifest is read by running the staged bundle, so the metadata
describes what ships.
outfile: stagingPath,
});
+ for (const [file, ids] of taskIds.resolved) {
+ const names = ids.map(({ taskId }) => taskId).join(", ");
+ process.stderr.write(`note: ${file}: task id taken from the handler
name: ${names}\n`);
+ }
+ // A call whose first argument is not provably a handler is left as
written,
+ // and a task with no id then falls back to `handler.name` — the minified
+ // name, which changes from build to build. Said out loud, because the
+ // alternative is a task silently renamed by the bundler.
+ for (const [file, calls] of taskIds.unresolved) {
+ for (const { line, call } of calls) {
+ process.stderr.write(
+ `warning: ${file}:${line}: no task id could be read from ${call}\n` +
+ ' if this declares a task, name it — dag.task("my_task",
handler) — ' +
+ "or the minified handler name becomes the task id\n",
+ );
+ }
+ }
Review Comment:
Ditto, nothing is resolved at pack time any more now.
--
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]