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

Edit packages #20404

Closed
23 of 29 tasks
marko-lisica opened this issue Jul 12, 2024 · 15 comments
Closed
23 of 29 tasks

Edit packages #20404

marko-lisica opened this issue Jul 12, 2024 · 15 comments
Assignees
Labels
~apple-mdm-maturity Contributes to maturity in macOS, iOS, or iPadOS MDM product category. ~csa Issue was created by or deemed important by the Customer Solutions Architect. customer-deebradel customer-flacourtia customer-reedtimmer ~dogfood Issue resulted from Fleet's product dogfooding. ~experimental This feature is experimental, breaking changes may be made. #g-endpoint-ops Endpoint ops product group P2 Prioritize as urgent :product Product Design department (shows up on 🦢 Drafting board) story A user story defining an entire feature
Milestone

Comments

@marko-lisica
Copy link
Member

marko-lisica commented Jul 12, 2024

Goal

User story
As an IT admin,
I want to edit a package by uploading a new package and/or editing the package's attributes (pre-install condition, install script, post-install script, self-service, etc.)
so that I can update the software on my workstations.

Context

Changes

Product

Engineering

  • Reference documentation changes: TODO
  • Usage documentation changes: TODO
  • Database schema migrations: TODO
  • Load testing: TODO

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

QA

Risk assessment

  • Requires load testing: TODO
  • Risk level: Low / High TODO
  • Risk description: TODO

Manual testing steps

Because @xpkoala is out, leaving initials and date of final QA
QA DRI: @RachelElysia

  • RP 9/17 Only populate install/uninstall scripts when adding software but not editing software
  • RP 9/17 Ability to edit and save new software file, self-service, and all advanced options
  • RP 9/17 Ability to edit all advanced options (for each: blank o populated, populated to different populated, and populated to blank)
  • RP 9/17 Ensure pending install and uninstall counts reset after editing
  • RP 9/17 Ensure failed install and uninstalled count do not reset after editing (editing everything but the package)
  • IL&RP 9/17 Ensure failed install and uninstalled count do reset after updating the package
  • IL&RP 9/17 Ensure installed count do not reset after editing (editing everything but the package)
  • IL&RP 9/17 Ensure installed count do reset after updating the package
  • RP 9/17 Ensure backend return error state "The selected package is for different software."
  • RP 9/17 Ensure backend return error state "The selected package is for different file type."
  • RP 9/17 Ensure adding software loading behavior
  • RP 9/17 Ensure cancels pending uninstall and install with Save changes? modal upon all changes
  • RP 9/17 all counts do not reset and pending actions are not cancelled when only self-service is changed (unreleased bug found)
  • RP 9/17 Editing software should save changes and stay on the same page (unreleased bug found and fixed in (Unreleased bugs) Fleet UI: 20404 edit software feature #22168)
  • IL 9/13 Test for no teams packages
  • RP 9/17 initial & date Test for team packages
  • RP 9/17 Global activity is created for editing software with no bugs (unreleased unspecced bug found, updating spec and BE to surface software_package to match adding software activity fixed in Use previous package filename for activity if installer edit doesn't change the package #22177)

GitOps QA workflow found on the gitops ticket: #21612

Testing notes

Confirmation

  1. Engineer (@____): Added comment to user story confirming successful completion of QA.
  2. QA (@____): Added comment to user story confirming successful completion of QA.
@marko-lisica marko-lisica added :product Product Design department (shows up on 🦢 Drafting board) ~feature fest Will be reviewed at next Feature Fest ~dogfood Issue resulted from Fleet's product dogfooding. labels Jul 12, 2024
@noahtalerman
Copy link
Member

Thanks for tracking this @marko-lisica!

This is a clear UX improvement and probably a quick win so it makes sense to take this as part of the upcoming design sprint.

I think I've heard this request come from several customers and folks at Fleet internally.

cc @lukeheath @pintomi1989 @ddribeiro @zayhanlon @Patagonia121

@noahtalerman noahtalerman removed the :product Product Design department (shows up on 🦢 Drafting board) label Jul 12, 2024
@noahtalerman
Copy link
Member

noahtalerman commented Jul 12, 2024

@marko-lisica I think it makes sense to include editing "self-service" as part of this story too.

Closing out the "Switch software to self-service after it has already been uploaded" story (#20372).

cc @pintomi1989

@noahtalerman noahtalerman added :product Product Design department (shows up on 🦢 Drafting board) story A user story defining an entire feature and removed ~feature fest Will be reviewed at next Feature Fest labels Jul 12, 2024
@noahtalerman noahtalerman changed the title Edit software options after upload Edit software Jul 12, 2024
@noahtalerman
Copy link
Member

Hey @marko-lisica heads up, I updated this issue to user story format and moved your original issue description here:

Problem

After the upload, there's no way to edit the software's advanced options (install script, post-install script, etc.). The only way is to remove software package and re-upload with new options. This isn't very pleasant if a user is testing new package and scripts attached to it.

New packages are usually tested before production deployment. IT admin should be able to test different options easily before pushing to production.

I experienced this while dogfooding and testing scripts for .exe installers.

Potential solutions

After the software package is uploaded, allow user to edit stuff in the advanced options modal.

Screenshot 2024-07-12 at 13 34 30

@zayhanlon zayhanlon added the ~apple-mdm-maturity Contributes to maturity in macOS, iOS, or iPadOS MDM product category. label Jul 24, 2024
@nonpunctual nonpunctual added the ~csa Issue was created by or deemed important by the Customer Solutions Architect. label Jul 24, 2024
@lukeheath lukeheath added Epic DO NOT USE. Auto-created by ZenHub, cannot be disabled. and removed Epic DO NOT USE. Auto-created by ZenHub, cannot be disabled. labels Jul 29, 2024
@noahtalerman noahtalerman added the ~feature fest Will be reviewed at next Feature Fest label Aug 1, 2024
@noahtalerman noahtalerman removed the ~feature fest Will be reviewed at next Feature Fest label Aug 2, 2024
@noahtalerman
Copy link
Member

Mike: Let's be aware of where this heads w/ Andriod i.e. esper (and iOS)

@lukeheath lukeheath added P2 Prioritize as urgent #g-endpoint-ops Endpoint ops product group labels Aug 22, 2024
@marko-lisica marko-lisica added the ~feature fest Will be reviewed at next Feature Fest label Aug 26, 2024
@iansltx
Copy link
Member

iansltx commented Sep 7, 2024

So, while we lock down playform by holding extension constant (400 if it changes), someone could switch from a .pkg to a .app-with-a-.pkg-extension or vice versa, looks like. Probably prevented from client-side, but I'm guessing that if someone uploads something that switches, we just swap the source on the existing installer entry, which is fine since we're zeroing out install counts anyway.

@noahtalerman that sound right?

@iansltx
Copy link
Member

iansltx commented Sep 7, 2024

Actually looks like things are keyed by source pretty heavily, so we should bail if there's a source mismatch. Going with that approach here.

@iansltx
Copy link
Member

iansltx commented Sep 11, 2024

Known frontend issues as of now:

  • Software installer package update form is inoperable
  • Install script change detection (for save button) doesn't work
  • Need more tests

Known backend issues as of now:

  • Expose bundle IDs in software installer struct, switch to using rather than existing file metadata
  • Expose installer extension in software installer struct (will be added to Uninstall packages #20320 work), switch to using rather than existing file metadata
  • Cancel uninstalls on installer changes (currently only cancels installs)
  • Handle minor PR feedback from @mostlikelee
  • Add tests

Plus, GitOps items:

  • Cancel installs/uninstalls on installer changes
  • Reset counts on installer package changes

Also, guide updates for:

  • Edit software
  • Uninstall

@sharon-fdm
Copy link
Collaborator

QA DRI - @RachelElysia

iansltx added a commit that referenced this issue Sep 17, 2024
## Issue
Cerra #20404

## Description
- Add frontend/API backend for editing software packages. GitOps will be
a separate PR.

## More
- Please see subtasks for change lists
  - #21611 
  - #21613

# 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] Manual QA for all new/changed functionality

Automated tests will follow in another PR.

---------

Co-authored-by: Ian Littman <iansltx@gmail.com>
Co-authored-by: Luke Heath <luke@fleetdm.com>
Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
Co-authored-by: Victor Lyuboslavsky <victor.lyuboslavsky@gmail.com>
RachelElysia added a commit that referenced this issue Sep 17, 2024
## Issue
Cerra #20404

## Description
- Add frontend/API backend for editing software packages. GitOps will be
a separate PR.

## More
- Please see subtasks for change lists
  - #21611 
  - #21613

# 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] Manual QA for all new/changed functionality

Automated tests will follow in another PR.

---------

Co-authored-by: Ian Littman <iansltx@gmail.com>
Co-authored-by: Luke Heath <luke@fleetdm.com>
Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
Co-authored-by: Victor Lyuboslavsky <victor.lyuboslavsky@gmail.com>
@lukeheath lukeheath added :product Product Design department (shows up on 🦢 Drafting board) and removed :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. labels Sep 24, 2024
noahtalerman added a commit that referenced this issue Sep 26, 2024
Permissions changes for this story: #20404
rachaelshaw pushed a commit that referenced this issue Sep 26, 2024
Permissions changes for this story:
#20404
@noahtalerman
Copy link
Member

Hey @zayhanlon heads up we shipped this user story in 4.57 🎉

@fleet-release
Copy link
Contributor

Software's ebb and flow,
Edit packages, ease the change,
Workstations aglow.

@noahtalerman noahtalerman added the ~experimental This feature is experimental, breaking changes may be made. label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~apple-mdm-maturity Contributes to maturity in macOS, iOS, or iPadOS MDM product category. ~csa Issue was created by or deemed important by the Customer Solutions Architect. customer-deebradel customer-flacourtia customer-reedtimmer ~dogfood Issue resulted from Fleet's product dogfooding. ~experimental This feature is experimental, breaking changes may be made. #g-endpoint-ops Endpoint ops product group P2 Prioritize as urgent :product Product Design department (shows up on 🦢 Drafting board) story A user story defining an entire feature
Projects
None yet
Development

No branches or pull requests