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

Update so locked template fields are not overwritten #4244

Merged
merged 4 commits into from
Jul 26, 2024

Conversation

hardillb
Copy link
Contributor

fix for #4198

Description

When merging snapshots do not overwrite settings that are locked in the template

Related Issue(s)

#4198

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 Jul 24, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.12%. Comparing base (3f397c3) to head (6ab0331).
Report is 82 commits behind head on main.

Files Patch % Lines
forge/db/controllers/ProjectTemplate.js 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4244      +/-   ##
==========================================
- Coverage   78.66%   78.12%   -0.54%     
==========================================
  Files         286      287       +1     
  Lines       13161    13289     +128     
  Branches     2949     2980      +31     
==========================================
+ Hits        10353    10382      +29     
- Misses       2808     2907      +99     
Flag Coverage Δ
backend 78.12% <85.71%> (-0.54%) ⬇️

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

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

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

Ben, Apart from the missing JSDoc, comment this looks fine.

I just need to follow the step by step instructions on pre-staging before I approve

forge/db/controllers/ProjectTemplate.js Show resolved Hide resolved
Copy link
Contributor

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

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

Ben, apart from the missing JSDoc on the function signature you modified (suggestion provided) this appears to be working as expected on the pre-staging env.

If you wish to check out the steps I took, the audit logs on the pre-staging environment for the Plant Enterprise team are fairly descriptive of all the operations but essentially, I setup a prod and dev template and tried several ways to "force" settings from the dev/dev template to get into the prod instance without success.

Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
@hardillb hardillb merged commit 9082b06 into main Jul 26, 2024
13 of 14 checks passed
@hardillb hardillb deleted the dont-overwite-locked-settings branch July 26, 2024 08:33
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.

Instance templates settings get overwritten when deploying different instance using pipelines
2 participants