-
Notifications
You must be signed in to change notification settings - Fork 447
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
SSVL: prevent deletion of a label if used to scope software installers #24644
SSVL: prevent deletion of a label if used to scope software installers #24644
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the frontend needs to catch the backend error to present the desired error message: https://www.figma.com/design/Arh6VAVTQuTbbwWavo8tr9/%2322813-Scope-software-install-to-hosts-by-labels?node-id=5381-7917&node-type=section&t=PlMugpoonZc4FZ2F-0
I updated the relevant frontend ticket to mention this: #24537
I tried to tackle it myself but there is no handling of custom errors in this modal at the moment, it is more involved than just adding a new error check.
s.uploadSoftwareInstaller(t, installer, http.StatusOK, "") | ||
|
||
// associate lbl1 with the installer | ||
// TODO(mna): use API or Datastore method once implemented |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll create a catch-all post-story cleanup sub-task for this and similar stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// Clean software installers in "No team" (the others are deleted in ts.ds.DeleteTeam above). | ||
mysql.ExecAdhocSQL(t, ts.ds, func(q sqlx.ExtContext) error { | ||
_, err := q.ExecContext(ctx, `DELETE FROM software_installers WHERE global_or_team_id = 0;`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must be deleted before labels.
…ete-label-for-software
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feat-labels-scoped-software #24644 +/- ##
==============================================================
Coverage ? 63.57%
==============================================================
Files ? 1598
Lines ? 151405
Branches ? 3828
==============================================================
Hits ? 96259
Misses ? 47487
Partials ? 7659
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…ete-label-for-software
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
#24536
Checklist for submitter
changes/
,orbit/changes/
oree/fleetd-chrome/changes
.See Changes files for more information.
SELECT *
is avoided, SQL injection is prevented (using placeholders for values in statements)