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

Feature: Scope Fleet-maintained apps and custom packages via labels #24976

Merged
merged 31 commits into from
Dec 23, 2024

Conversation

gillespi314
Copy link
Contributor

Issue #22813

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

mna and others added 30 commits December 10, 2024 11:40
> Related issue: #24534

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
…els (#24793)

relates to #24538, #24542, #24540, #24537

implements the UI for scoping software to fleet maintained apps and
custom packages. This includes:

**adding custom target label selection to fleet maintained app form**

<img width="824" alt="image"
src="https://github.com/user-attachments/assets/b0e18841-e5c5-406a-b83f-ce2b5a8f8472"
/>

**adding custom target label selection to custom package form**

<img width="821" alt="image"
src="https://github.com/user-attachments/assets/06279121-69bd-4663-aebd-930cd7c02190"
/>

***adding custom target label selection on edit software modals**

<img width="796" alt="image"
src="https://github.com/user-attachments/assets/c15a8236-1b02-4d17-9245-e24967190eaf"
/>

also includes various small copy changes.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [ ] Added/updated tests
- [x] Manual QA for all new/changed functionality
#24843)

> Related issue: #24533

- We're still running the policy, but in the handler for the results we
check if the software is in label scope. If not, we set the policy to be
"undetermined" and we do not add an installation request
- Added checks for label scoping to the "install software" and "self
service install" endpoints

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
> Related issue: #24646

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Added/updated tests
…bels feature (#24888)

relates to #24828, #24792

This updates the UI activities software including a new software details
show details modal:

<img width="825" alt="image"
src="https://github.com/user-attachments/assets/3dd3019b-c94c-427b-9c52-d678a311c4bc"
/>

It also includes tests and api integration work for the creating and
reading of scoped software via labels.

> NOTE: still need to do the editing which we can do in another PR when
the API is ready.

- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
relates to #24828

Finish up the UI integration for the API to edit a custom package

- [x] Manual QA for all new/changed functionality
relates to #24537

updates the delete label error when label is used for software

- [x] Manual QA for all new/changed functionality
…24963)

> Issue found during testing

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 79.48980% with 201 lines in your changes missing coverage. Please review.

Project coverage is 63.74%. Comparing base (ad6d473) to head (c79875c).
Report is 37 commits behind head on main.

Files with missing lines Patch % Lines
server/datastore/mysql/software_installers.go 81.79% 43 Missing and 18 partials ⚠️
frontend/services/entities/software.ts 0.00% 29 Missing ⚠️
ee/server/service/software_installers.go 86.17% 17 Missing and 9 partials ⚠️
...ents/SoftwareDetailsModal/SoftwareDetailsModal.tsx 17.85% 23 Missing ⚠️
...onents/TargetLabelSelector/TargetLabelSelector.tsx 70.27% 11 Missing ⚠️
frontend/pages/hosts/ManageHostsPage/helpers.ts 16.66% 10 Missing ⚠️
server/service/software_installers.go 79.06% 9 Missing ⚠️
...04_AddVppAppTeamAndSoftwareInstallerLabelsTable.go 87.50% 6 Missing and 2 partials ⚠️
.../DashboardPage/cards/ActivityFeed/ActivityFeed.tsx 22.22% 7 Missing ⚠️
server/service/maintained_apps.go 28.57% 5 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24976      +/-   ##
==========================================
+ Coverage   63.57%   63.74%   +0.17%     
==========================================
  Files        1607     1610       +3     
  Lines      152300   153167     +867     
  Branches     3967     3962       -5     
==========================================
+ Hits        96822    97643     +821     
+ Misses      47762    47735      -27     
- Partials     7716     7789      +73     
Flag Coverage Δ
backend 64.60% <86.16%> (+0.21%) ⬆️
frontend 53.38% <34.64%> (-0.23%) ⬇️

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
Member

@marko-lisica marko-lisica left a comment

Choose a reason for hiding this comment

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

I reviewed docs/Contributing/Audit-logs.md and it looks good.

@georgekarrv georgekarrv merged commit 38fcc30 into main Dec 23, 2024
31 checks passed
@georgekarrv georgekarrv deleted the feat-labels-scoped-software branch December 23, 2024 17:38
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