Skip to content

PAT-1832 Enable auto-resume for apps in dev mode#2610

Merged
pepamartinec merged 1 commit into
mainfrom
worktree-pat-1832-enable-auto-resume-for-apps-in-dev-mode
Jun 2, 2026
Merged

PAT-1832 Enable auto-resume for apps in dev mode#2610
pepamartinec merged 1 commit into
mainfrom
worktree-pat-1832-enable-auto-resume-for-apps-in-dev-mode

Conversation

@pepamartinec
Copy link
Copy Markdown
Contributor

Release Notes

https://linear.app/keboola/issue/PAT-1832/enable-auto-resume-for-apps-in-dev-mode

Dev-mode data apps no longer stay Stopped when accessed through apps-proxy. Previously a Stopped dev-mode app served the "Application Disabled" page; now it auto-resumes on request (wakeup + spinner) exactly like a normal app, so a developer returning to a preview after some time away (e.g. the next morning) just has to refresh to bring it back.

Auto-resume is now governed solely by the App CRD's spec.autoRestartEnabled (default true); dev mode is orthogonal to it. This reverses the proxy-side behavior added in PAT-1782 — the AppInfo.DevMode field is retained because it still gates the kai-preview iframe-auth path. A dev-mode app with spec.autoRestartEnabled=false still shows the "Application Disabled" page, so an explicit operator opt-out is respected.

Plans for customer communication

None.

Impact analysis

Affects dev-mode data apps only: a Stopped dev-mode app now wakes up on request instead of showing the disabled page. No change for production apps or for apps with spec.autoRestartEnabled=false.

Change type

Improvement

Justification

Resuming a dev-mode preview automatically on refresh is a better developer experience than a manual redeploy button (per PAT-1832 / Slack discussion).

Deployment

Merge & automatic deploy.

Rollback plan

Revert of this PR.

Post release support plan

None.

@linear
Copy link
Copy Markdown

linear Bot commented Jun 2, 2026

PAT-1832

@pepamartinec pepamartinec force-pushed the worktree-pat-1832-enable-auto-resume-for-apps-in-dev-mode branch from 7bbbff2 to 284280e Compare June 2, 2026 10:27
@pepamartinec pepamartinec marked this pull request as ready for review June 2, 2026 10:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Enables auto-resume (wakeup + spinner) for dev-mode apps when accessed through apps-proxy, aligning behavior with non-dev apps and making spec.autoRestartEnabled the sole control for restart behavior (defaulting to true when absent).

Changes:

  • Update upstream handling to allow wakeup for Stopped dev-mode apps when autoRestartEnabled is true/default.
  • Extend router tests to cover dev-mode auto-resume and the autoRestartEnabled=false opt-out case.
  • Update AppInfo.DevMode documentation to reflect its remaining responsibility (kai-preview gating).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
internal/pkg/service/appsproxy/proxy/proxy_test.go Updates/extends integration-style router tests for dev-mode wakeup vs restart-disabled behavior.
internal/pkg/service/appsproxy/proxy/apphandler/upstream/upstream.go Removes dev-mode as a special-case block for auto-resume; only AutoRestartEnabled now gates wakeup.
internal/pkg/service/appsproxy/dataapps/k8sapp/appinfo.go Updates DevMode field comment to match current usage (kai-preview path gating).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/pkg/service/appsproxy/proxy/proxy_test.go
@pepamartinec pepamartinec force-pushed the worktree-pat-1832-enable-auto-resume-for-apps-in-dev-mode branch from 284280e to 86ff5e4 Compare June 2, 2026 10:41
@pepamartinec pepamartinec requested a review from Copilot June 2, 2026 10:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread internal/pkg/service/appsproxy/proxy/proxy_test.go Outdated
Comment thread internal/pkg/service/appsproxy/proxy/proxy_test.go Outdated
@pepamartinec pepamartinec force-pushed the worktree-pat-1832-enable-auto-resume-for-apps-in-dev-mode branch from 86ff5e4 to b435c48 Compare June 2, 2026 10:51
@pepamartinec pepamartinec requested a review from Copilot June 2, 2026 10:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread internal/pkg/service/appsproxy/proxy/proxy_test.go Outdated
Dev-mode data apps previously did not auto-resume: a Stopped dev-mode app
served the "Application Disabled" page instead of waking up. This made it
harder to continue a preview after time away (e.g. the next morning).

Auto-resume is now governed solely by spec.autoRestartEnabled (default
true); dev mode is orthogonal. A Stopped dev-mode app auto-resumes like
any other app — unless autoRestartEnabled is explicitly false.

This reverses the proxy-side behavior added in 997528b (PAT-1782). The
AppInfo.DevMode field is retained: it still gates the kai-preview
iframe-auth path.

Changes:
* upstream.ServeHTTPOrError: drop the DevMode term from the
  restart-disabled branch, so Stopped dev-mode apps fall through to
  wakeup + spinner.
* k8sapp.AppInfo.DevMode: update the now-stale doc comment.
* proxy_test: replace dev-mode-no-wakeup with dev-mode-auto-resume
  (asserts spinner + the wakeup patch fires) and add
  dev-mode-restart-disabled (autoRestartEnabled=false stays disabled).

PAT-1832
@pepamartinec pepamartinec force-pushed the worktree-pat-1832-enable-auto-resume-for-apps-in-dev-mode branch from b435c48 to 610ec35 Compare June 2, 2026 11:06
@pepamartinec pepamartinec requested a review from Copilot June 2, 2026 11:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@pepamartinec pepamartinec merged commit addc2ec into main Jun 2, 2026
41 of 44 checks passed
@pepamartinec pepamartinec deleted the worktree-pat-1832-enable-auto-resume-for-apps-in-dev-mode branch June 2, 2026 11:56
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.

3 participants