Skip to content

feat: report Hatchbox and Northflank instance names as the container - #127

Merged
adamlogic merged 2 commits into
mainfrom
jdo-1610-hatchbox-northflank-container
Nov 13, 2026
Merged

adamlogic merged 2 commits into
mainfrom
jdo-1610-hatchbox-northflank-container

Conversation

@adamlogic

@adamlogic adamlogic commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Fixes JDO-1610.

Problem

Judoscale stores the container an 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: a new platform, detected by HATCHBOX_SERVER_NAME after Railway and before the Scalingo CONTAINER branch. That variable is also the container (web1, autoscale-web-801dea, ...).
  • Undetected platforms (Unknown) now report HOSTNAME as the container instead of "", so Docker and Kubernetes hosts we don't recognize still report distinct instances. Without HOSTNAME they report "" as before; detected platforms ignore it.
  • Northflank is covered by that fallback: its HOSTNAME is 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_CONTAINER still wins. Neither platform uses ordinal instance names (like Heroku's web.2), so like Render, Fly, and Railway, no instance is treated as redundant or ephemeral.

Caveats

  • HATCHBOX_SERVER_NAME is 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 to HOSTNAME or "".
  • The Northflank variables were verified with printenv in our own Northflank services.

Proof

  • npx jest in packages/node-core: 80 passed. eslint and prettier are clean.
  • With the platform.js change reverted and the new tests kept, the new Hatchbox, Northflank, and HOSTNAME fallback tests fail.

ampagent and others added 2 commits November 12, 2026 20:22
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>
@adamlogic
adamlogic merged commit e1d60b2 into main Nov 13, 2026
45 checks passed
@adamlogic
adamlogic deleted the jdo-1610-hatchbox-northflank-container branch November 13, 2026 12:58
@github-actions github-actions Bot mentioned this pull request Nov 13, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants