Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support disabling instance launcher "auto safe mode" #4922

Merged
merged 12 commits into from
Dec 19, 2024

Conversation

Steve-Mcl
Copy link
Contributor

@Steve-Mcl Steve-Mcl commented Dec 16, 2024

closes #4920

Description

Adds setting for launcher: disableAutoSafeMode
Updates UI to permit setting of disableAutoSafeMode
Updates unit test to ensure value is persisted

image

Related Issue(s)

owner: #4920
parent: #4552

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production

Labels

  • Includes a DB migration? -> add the area:migration label

Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.65%. Comparing base (bdf5dae) to head (3b3b6a8).
Report is 59 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4922      +/-   ##
==========================================
+ Coverage   78.63%   78.65%   +0.02%     
==========================================
  Files         324      324              
  Lines       15265    15280      +15     
  Branches     3507     3513       +6     
==========================================
+ Hits        12003    12018      +15     
  Misses       3262     3262              
Flag Coverage Δ
backend 78.65% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@hardillb hardillb left a comment

Choose a reason for hiding this comment

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

Just need a nr-launcher version gate on showing the settings so the user knows to upgrade the stack to enable the feature

frontend/src/pages/instance/Settings/LauncherSettings.vue Outdated Show resolved Hide resolved
@hardillb
Copy link
Contributor

hardillb commented Dec 16, 2024

Also when I toggle the checkbox the "save settings" button is not being enabled (or changing the health check timeout)

The data section doesn't appear to have been updated to include the new value so it's not getting tracked.

@Steve-Mcl
Copy link
Contributor Author

Also when I toggle the checkbox the "save settings" button is not being enabled (or changing the health check timeout)

The data section doesn't appear to have been updated to include the new value so it's not getting tracked.

That was working for me, but good spot on missing data entries (now added)

@hardillb
Copy link
Contributor

Toggling the checkbox is still now marking the save settings button as active

@Steve-Mcl
Copy link
Contributor Author

Toggling the checkbox is still now marking the save settings button as active

What browser?

Works for me in Chrome.

chrome_z2llehlDSn

@hardillb
Copy link
Contributor

@Steve-Mcl take hte 5000 out of the box at the top, the default is empty

@Steve-Mcl
Copy link
Contributor Author

@Steve-Mcl take hte 5000 out of the box at the top, the default is empty

Ah, ok. This was existing behaviour but now there is more than one setting on the form, it matters!

I'll modify the form to show the default health value so the validation works.

@Steve-Mcl Steve-Mcl requested a review from hardillb December 16, 2024 16:31
@Steve-Mcl
Copy link
Contributor Author

ok, fingers crossed, 3rd time is sure to be the charm.

I've added the v-else message that some settings are not available until stack is upgraded.

I set the local health value input to the launchers default (even if not set in the DB settings) - this way, there are no validation errors and the Auto Safe Mode toggle can be operated/changed/saved.

Lastly I made sure settings are only passed/updated if changed.

Copy link
Contributor

@hardillb hardillb left a comment

Choose a reason for hiding this comment

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

But not merging as the updated stacks won't be available until release.

We should merge this on release day along with #4900

@hardillb hardillb merged commit 937a83b into main Dec 19, 2024
18 checks passed
@hardillb hardillb deleted the 4920-disable-auto-safe-mode-option branch December 19, 2024 10:36
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.

Update FlowFuse to present and persist disabling auto safe mode option
2 participants