Repository navigation
feat: report Hatchbox and Northflank instance names as the container - #127
Merged
Merged
Conversation
Refs JDO-1610. Hatchbox and Northflank apps reported no container, so every instance showed as [missing] and per-instance charts collapsed into one series. - Hatchbox: detected by HATCHBOX_SERVER_NAME, which is also the container (e.g. "web1", "autoscale-web-801dea"). - Northflank: detected by NF_OBJECT_ID (the service name); the container is HOSTNAME, the pod name Northflank shows in its UI and logs (e.g. "prod-web-6fbcbdb958-v2jv5"). - Undetected platforms now report HOSTNAME as the container instead of an empty string, so Docker and Kubernetes hosts we don't recognize still report distinct instances. JUDOSCALE_CONTAINER still takes precedence. Neither platform uses ordinal instance names, so no instance is treated as redundant or ephemeral. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d125-03eb-7016-9853-f6d01b58baaf Co-authored-by: Adam McCrea <adam@adamlogic.com>
Refs JDO-1610. The Northflank platform reported HOSTNAME as its container and had no behavior of its own, which is exactly what Unknown now does. Drop the NF_OBJECT_ID branch and the Northflank class; the config tests still check that a Northflank environment reports its pod name. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d125-03eb-7016-9853-f6d01b58baaf Co-authored-by: Adam McCrea <adam@adamlogic.com>
Merged
adamlogic
pushed a commit
that referenced
this pull request
Nov 13, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>judoscale-bull: 2.1.7</summary> ## [2.1.7](judoscale-bull-v2.1.6...judoscale-bull-v2.1.7) (2026-11-13) ### Dependencies * The following workspace dependencies were updated * dependencies * judoscale-node-core bumped from 2.5.6 to 2.6.0 </details> <details><summary>judoscale-bullmq: 2.2.7</summary> ## [2.2.7](judoscale-bullmq-v2.2.6...judoscale-bullmq-v2.2.7) (2026-11-13) ### Dependencies * The following workspace dependencies were updated * dependencies * judoscale-node-core bumped from 2.5.6 to 2.6.0 </details> <details><summary>judoscale-express: 2.3.7</summary> ## [2.3.7](judoscale-express-v2.3.6...judoscale-express-v2.3.7) (2026-11-13) ### Dependencies * The following workspace dependencies were updated * dependencies * judoscale-node-core bumped from 2.5.6 to 2.6.0 </details> <details><summary>judoscale-fastify: 2.4.7</summary> ## [2.4.7](judoscale-fastify-v2.4.6...judoscale-fastify-v2.4.7) (2026-11-13) ### Dependencies * The following workspace dependencies were updated * dependencies * judoscale-node-core bumped from 2.5.6 to 2.6.0 </details> <details><summary>judoscale-nextjs: 2.0.4</summary> ## [2.0.4](judoscale-nextjs-v2.0.3...judoscale-nextjs-v2.0.4) (2026-11-13) ### Dependencies * The following workspace dependencies were updated * dependencies * judoscale-node-core bumped from 2.5.6 to 2.6.0 </details> <details><summary>judoscale-node-core: 2.6.0</summary> ## [2.6.0](judoscale-node-core-v2.5.6...judoscale-node-core-v2.6.0) (2026-11-13) ### Features * report Hatchbox and Northflank instance names as the container ([#127](#127)) ([e1d60b2](e1d60b2)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Fixes JDO-1610.
Problem
Judoscale stores the
containeran adapter reports for each instance. Hatchbox and Northflank apps report nothing, so every instance shows as[missing]and per-instance charts collapse into one series.Fix
HATCHBOX_SERVER_NAMEafter Railway and before the ScalingoCONTAINERbranch. That variable is also the container (web1,autoscale-web-801dea, ...).Unknown) now reportHOSTNAMEas the container instead of"", so Docker and Kubernetes hosts we don't recognize still report distinct instances. WithoutHOSTNAMEthey report""as before; detected platforms ignore it.HOSTNAMEis the Kubernetes pod name Northflank shows as the container ID in its UI and logs (prod-web-6fbcbdb958-v2jv5). Northflank needs no behavior of its own, so it gets no platform branch.An explicit
JUDOSCALE_CONTAINERstill wins. Neither platform uses ordinal instance names (like Heroku'sweb.2), so like Render, Fly, and Railway, no instance is treated as redundant or ephemeral.Caveats
HATCHBOX_SERVER_NAMEis confirmed from a Hatchbox Docker cluster deploy log. Whether classic (non-Docker) Hatchbox clusters set it is unverified; if not, those apps still fall back toHOSTNAMEor"".printenvin our own Northflank services.Proof
npx jestinpackages/node-core: 80 passed. eslint and prettier are clean.platform.jschange reverted and the new tests kept, the new Hatchbox, Northflank, andHOSTNAMEfallback tests fail.