jason810496 commented on code in PR #69328:
URL: https://github.com/apache/airflow/pull/69328#discussion_r3549000601
##########
airflow-e2e-tests/tests/airflow_e2e_tests/conftest.py:
##########
@@ -570,6 +576,114 @@ def _setup_go_sdk_integration(dot_env_file, tmp_dir):
os.environ["ENV_FILE_PATH"] = str(dot_env_file)
+def _setup_ts_sdk_integration(dot_env_file, tmp_dir):
+ """Set up the ts_sdk E2E test mode.
+
+ Builds the ts-sdk example bundle with pnpm inside an ephemeral Node
+ container (the host needs no Node toolchain), drops it with its
+ airflow-metadata.yaml sidecar into the directory ``NodeCoordinator``
+ scans, copies the Python stub Dag, and writes the coordinator
+ configuration.
+
+ The worker has no Node runtime of its own; the node-provider service in
+ ``ts.yml`` copies the node binary out of the same image used here for the
+ build, so the bundle executes on the runtime it was built for.
+ """
+ # --user keeps build outputs owned by the current user (not root); HOME
+ # points at a writable, gitignored dir so the pnpm store and corepack
+ # cache persist between runs. corepack resolves the pnpm version pinned
+ # by ts-sdk/package.json's packageManager field.
+ TS_SDK_BUILD_HOME_PATH.mkdir(parents=True, exist_ok=True)
+ # Shims go into a writable dir on PATH (the container user cannot write to
+ # /usr/local/bin) so nested `pnpm run ...` invocations resolve pnpm too.
+ build_script = (
+ 'export PATH="$HOME/bin:$PATH"'
+ ' && mkdir -p "$HOME/bin"'
+ ' && corepack enable --install-directory "$HOME/bin"'
+ " && cd /repo/ts-sdk"
+ " && pnpm install --frozen-lockfile"
+ " && pnpm run build"
+ " && cd example"
+ " && pnpm install"
+ " && pnpm run build"
Review Comment:
How about waiting for the `airflow-ts-pack` one to exercise the real packing?
--
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]