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

Allow software uninstalls, script-based lock/unlock/wipe, while scripts are globally disabled #24815

Merged
merged 11 commits into from
Dec 30, 2024

Conversation

iansltx
Copy link
Member

@iansltx iansltx commented Dec 16, 2024

For #22875.

Checklist for submitter

If some of the following don't apply, delete the relevant line.

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.
  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements)
  • Added/updated tests
  • If database migrations are included, checked table schema to confirm autoupdate
  • For database migrations:
    • Checked schema for all modified table for columns that will auto-update timestamps during migration.
    • Confirmed that updating the timestamps is acceptable, and will not cause unwanted side effects.
    • Ensured the correct collation is explicitly set for character columns (COLLATE utf8mb4_unicode_ci).
  • Manual QA for all new/changed functionality

Copy link

codecov bot commented Dec 16, 2024

Codecov Report

Attention: Patch coverage is 81.96721% with 11 lines in your changes missing coverage. Please review.

Project coverage is 63.80%. Comparing base (5319156) to head (c54f148).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...tables/20241224000000_InternalHostScriptResults.go 58.33% 4 Missing and 1 partial ⚠️
server/datastore/mysql/scripts.go 91.17% 2 Missing and 1 partial ⚠️
server/service/orbit.go 66.66% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #24815   +/-   ##
=======================================
  Coverage   63.80%   63.80%           
=======================================
  Files        1612     1613    +1     
  Lines      153447   153432   -15     
  Branches     4003     4003           
=======================================
- Hits        97907    97900    -7     
+ Misses      47742    47735    -7     
+ Partials     7798     7797    -1     
Flag Coverage Δ
backend 64.67% <81.96%> (+<0.01%) ⬆️
frontend 53.25% <ø> (ø)

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.

…ed lock/unlock/wipe

TODO:

* Fix tests
* Write scripts to DB as eligible for skipping script disabled, read from DB when scripts disabled
…s pending scripts when script execution is disabled globally
@iansltx iansltx force-pushed the 22875-uninstall-with-scripts-disabled branch from f1aa3d8 to 3e706c4 Compare December 17, 2024 01:19
@iansltx iansltx marked this pull request as ready for review December 18, 2024 16:51
@iansltx iansltx requested review from a team as code owners December 18, 2024 16:51
jacobshandling
jacobshandling previously approved these changes Dec 18, 2024
@iansltx
Copy link
Member Author

iansltx commented Dec 23, 2024

Repushed to renumber the migration as stuff has merged ahead of me. @RachelElysia I've assigned FE review to you as it should be quick.

lucasmrod
lucasmrod previously approved these changes Dec 26, 2024
Copy link
Member

@lucasmrod lucasmrod left a comment

Choose a reason for hiding this comment

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

LGTM!

Left some nit comments and pending merging main (conflict).

changes/22875-uninstall-with-scripts-disabled Outdated Show resolved Hide resolved
ee/server/service/hosts.go Outdated Show resolved Hide resolved
server/service/integration_enterprise_test.go Outdated Show resolved Hide resolved
# Conflicts:
#	ee/server/service/software_installers_test.go
#	server/datastore/mysql/schema.sql
Copy link
Contributor

@ghernandez345 ghernandez345 left a comment

Choose a reason for hiding this comment

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

FE looks good

@iansltx iansltx merged commit 1725eff into main Dec 30, 2024
29 checks passed
@iansltx iansltx deleted the 22875-uninstall-with-scripts-disabled branch December 30, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants