Fix/app config save guard#573
Open
psanghvi17 wants to merge 2 commits into
Open
Conversation
-- Add UI and model guards to block config save for non-deployable apps and show a clear reason to users. -- In AppInfo.vue and edit/applications.vue, compute configSaveAllowed/configSaveDisabledReason, render a Banner when save is blocked, and make validation respect configSaveAllowed so the primary Save action is disabled. -- In EpinioApplicationModel, add canSaveConfiguration/cannotSaveConfigurationReason based on image_url and app status (RUNNING or CREATING). -- Refactor epinioExceptionToErrorsArray to normalize multiple backend error shapes into consistent, user-friendly messages.
Only request a restart from the app edit flow when the app is running or its instance count changes, and preserve explicit zero-instance values. This lets recovery edits be saved without breaking scale-up behavior.
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.
PR Checklist
Summary
Updates the application edit flow so configuration changes can still be saved for non-running apps without always forcing an immediate restart, while still triggering restart/deploy when the app is running or when instance count changes require it.
Occurred changes and/or fixed issues
restartshould be sent to the backend:0instance values in app forms and manifest parsing by replacing|| 1with?? 1.Technical notes summary
dashboard/pkg/epinio/models/applications.jscanSaveConfiguration/cannotSaveConfigurationReasonwithcanRestartAfterConfigSavedashboard/pkg/epinio/edit/applications.vueshouldRestartOnSaveupdate({ restart: shouldRestartOnSave })instead of always relying on default restart behaviordashboard/pkg/epinio/components/application/AppInfo.vueinstances: 0using nullish coalescingdashboard/pkg/epinio/components/application/AppSource.vueinstances: 0when loading values from parsed manifest dataAreas or cases that should be tested
Local testing browser: Chrome
Reviewer should ideally test with a different browser.
Save config for a running app:
runningstate.Save config for a non-running app:
Scale from
0 -> 1in the app edit form:0instances.1.Edit config while also changing instances:
0instances or another non-running state.Manifest import / parsed source values:
instances: 0.0and does not silently convert it to1.Areas which could experience regressions
restart0 -> >0