Skip to content

[INF-7324] (opt-in) hpa for jse deployment - #363

Merged
lukefoster11 merged 10 commits into
mainfrom
lfoster/jse-hpa
Aug 24, 2026
Merged

[INF-7324] (opt-in) hpa for jse deployment#363
lukefoster11 merged 10 commits into
mainfrom
lfoster/jse-hpa

Conversation

@lukefoster11

@lukefoster11 lukefoster11 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Easy to enable hpa for the js-executor deployment. Scale on 70% mem and 70% cpu usage.
Ask from Colgate

@greptile-apps

greptile-apps Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
charts/retool/templates/deployment_js_executor.yaml Adds the gated JS executor HPA, matching-request validation, and conditional omission of Deployment replicas.
charts/retool/values.yaml Adds the chart’s public JS executor autoscaling defaults and configuration guidance.
values.yaml Keeps the repository-level values copy synchronized with the deployable chart defaults.
charts/retool/ci/test-js-executor-hpa-option.yaml Adds a fixture covering HPA rendering, CPU and memory targets, replica ownership, and scaling behavior.
charts/retool/Chart.yaml Increments the chart patch version for the new opt-in feature.

Reviews (6): Last reviewed commit: "simplify" | Re-trigger Greptile

Comment thread charts/retool/templates/deployment_js_executor.yaml
@lukefoster11 lukefoster11 changed the title (opt-in) hpa for jse deployment [INF-7324] (opt-in) hpa for jse deployment Aug 14, 2026
@lukefoster11

Copy link
Copy Markdown
Contributor Author

@greptile review me again

Comment thread charts/retool/templates/deployment_js_executor.yaml Outdated
@lukefoster11

Copy link
Copy Markdown
Contributor Author

@greptile review me again pls

Comment thread charts/retool/templates/deployment_js_executor.yaml Outdated
@lukefoster11

Copy link
Copy Markdown
Contributor Author

@greptile can you review again

@lukefoster11

Copy link
Copy Markdown
Contributor Author

@greptile review me again pls

@lukefoster11
lukefoster11 marked this pull request as ready for review August 18, 2026 20:18
@init-b
init-b self-requested a review August 24, 2026 17:49

@init-b init-b left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! just wondering what happens to JS executions when it scales down?

@lukefoster11

Copy link
Copy Markdown
Contributor Author

LGTM! just wondering what happens to JS executions when it scales down?

The replicacount will just go down to the min replica count (1 by default but configurable). JSE shouldn't hit performance issues while cpu and mem utilization are below 70% so JS execution speed shouldn't be affected. One thing I just realized is that this HPA depends on having metrics-server enabled, so I will add a comment that if that isn't enabled then the HPA won't work properly and will stay at the min replica count.

@init-b

init-b commented Aug 24, 2026

Copy link
Copy Markdown

LGTM! just wondering what happens to JS executions when it scales down?

The replicacount will just go down to the min replica count (1 by default but configurable).

@lukefoster11 any implications about the in-flight process in the container we kill? I really don't know how that currently works in our Cloud environment.

@lukefoster11

Copy link
Copy Markdown
Contributor Author

LGTM! just wondering what happens to JS executions when it scales down?

The replicacount will just go down to the min replica count (1 by default but configurable).

@lukefoster11 any implications about the in-flight process in the container we kill? I really don't know how that currently works in our Cloud environment.

It's a graceful termination, same as when we terminate all jse pods when we restart a deployment. In-flight requests complete before the pod spins down

Keep JS executor HPA config and take terminationGracePeriodSeconds from main.
Bump the chart to 6.11.22 since main already shipped 6.11.21.

Co-authored-by: Cursor <cursoragent@cursor.com>
@init-b

init-b commented Aug 24, 2026

Copy link
Copy Markdown

LGTM! just wondering what happens to JS executions when it scales down?

The replicacount will just go down to the min replica count (1 by default but configurable).

@lukefoster11 any implications about the in-flight process in the container we kill? I really don't know how that currently works in our Cloud environment.

It's a graceful termination, same as when we terminate all jse pods when we restart a deployment. In-flight requests complete before the pod spins down

Thanks for the context Luke!

@lukefoster11
lukefoster11 merged commit de6d719 into main Aug 24, 2026
23 of 25 checks passed
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