[HDX-2712] Unified hyperdx entrypoint script for API and tasks#1951
Merged
kodiakhq[bot] merged 9 commits intomainfrom Mar 20, 2026
Merged
Conversation
Replace duplicated node startup commands across Dockerfiles and entry scripts with a single `packages/api/bin/hyperdx` shell script. This script is the sole place that knows the build output layout and required node flags, so future build changes (like the esbuild introduction/revert that caused HDX-2690) only need updating in one place. The script supports two subcommands: - `hyperdx api` - starts the API server - `hyperdx task <name>` - runs a named task (e.g., check-alerts) Made-with: Cursor
🦋 Changeset detectedLatest commit: dc36740 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Made-with: Cursor
Contributor
E2E Test Results✅ All tests passed • 92 passed • 3 skipped • 931s
Tests ran across 4 shards in parallel. |
Contributor
PR Review✅ No critical issues found. The new
Docker changes look correct — |
The start script is not used by any Docker or CI path, so keep it as the plain node command to avoid silently adding OTel tracing. Made-with: Cursor
Made-with: Cursor
…-for-both-hyperdx-api-and
Made-with: Cursor
…-for-both-hyperdx-api-and
The hyperdx script is referenced by full path in all Dockerfiles and entry scripts. The bin field only adds a node_modules/.bin symlink that nothing uses, and it requires a yarn.lock update. Made-with: Cursor
Remove bin field and revert any lockfile drift so these files have no diff against main. Made-with: Cursor
pulpdrew
approved these changes
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The node commands to start the API server and alert task are duplicated across 4+ files, each hardcoding the build output path and node require flags. When the build process changed (esbuild introduction/revert per HDX-2690), the downstream operator and helm chart broke because their entrypoint commands were stale.
This PR introduces
packages/api/bin/hyperdx, a single shell script that is the sole source of truth for how to launch API and task processes. It resolves the build directory relative to its own location, applies the correct node flags (-r @hyperdx/node-opentelemetry/build/src/tracing), and exposes two subcommands:hyperdx api-- starts the API serverhyperdx task <name>-- runs a named task (e.g.,check-alerts)All Dockerfiles and entry scripts now delegate to this script instead of inlining the node command. Future build changes only need updating in one place.
How to test locally or on Vercel
Testing performed: All three Docker image targets were built and verified locally. The standalone API image started node via
hyperdx apicorrectly (crashed on missing MongoDB as expected). The all-in-one image passed health checks on bothlocalhost:18080/api/healthandlocalhost:18000/health, with all three processes (API, APP, ALERT-TASK) confirmed running inside the container using the new entry point script.References
ClickHouse/ClickStack-helm-chartsto use./packages/api/bin/hyperdx task check-alertsMade with Cursor