fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Software previously installed but no longer in scope still shows "Actions > Install" in host details

Open jmwatts opened this issue 9 months ago • 7 comments

Fleet version: 4.63.0

Web browser and operating system: n/a


💥  Actual behavior

Option to "Install" is present for the app that has already been installed but is no longer in scope. Clicking on "Install results in "Couldn't install. Please try again." message. An error in the fleet log appears but is not very descriptive: level=error ts=2025-02-12T22:33:08.541919Z component=http [email protected] method=POST uri=/api/latest/fleet/hosts/6/software/6311/install took=111.672375ms uuid=1d683562-4b7f-4e83-a8a1-7f5f9d756248

Image

🧑‍💻  Steps to reproduce

  1. Add an FMA or App Store App to a team, scoped so that it's available to a macOS, iPadOS or iOS device
  2. Install the app on the device from /hosts/:id/software page
  3. Once the "Install status" has switched to "Installed", edit the software so that the device is no longer within scope (ex: change the target to "Custom" and "Include any" then select a label that the host does not have.
  4. Go to the /hosts/:id/software page and click "Actions"

🛠️ To fix

  • When software goes out of scope, the software should have an empty (---) "Install status" on the Host details page.
    • The "Installed" count on the Software title page should be decremented
    • The host shouldn't show up in the filtered list of hosts with "Installed" status on the Hosts page.

jmwatts avatar Feb 12 '25 22:02 jmwatts

Found when testing App Store Apps but it was pointed out that this is the current behavior for existing software installers. Having the option to do something that will fail every time is poor user experience. We should not show the option to install if the software is not longer in scope for the device.

jmwatts avatar Feb 12 '25 22:02 jmwatts

The app should show as installed but should not have the option to "Install" in "Actions"

@jmwatts I think we want to be cleaning up the status here. When software goes out of scope, the software should have an empty (---) "Install status" on the Host details page. Also, the "Installed" count on the Software title page should be decremented and the host shouldn't show up in the filtered list of hosts with "Installed" status on the Hosts page.

I updated the "To fix" section to capture this.

noahtalerman avatar Feb 13 '25 16:02 noahtalerman

Hey team! Please add your planning poker estimate with Zenhub @jahzielv @ksykulev

iansltx avatar Feb 17 '25 19:02 iansltx

@mostlikelee it looks like we estimated this one. Do you know why the issue got moved to "Ready to spec" instead of "Estimated"?

noahtalerman avatar Feb 21 '25 14:02 noahtalerman

@mostlikelee it looks like we estimated this one. Do you know why the issue got moved to "Ready to spec" instead of "Estimated"?

@mostlikelee just giving you another ping!

noahtalerman avatar Feb 25 '25 14:02 noahtalerman

Hey @noahtalerman I forgot to add a comment when I moved this bug. We need to draft API changes to make this change. When that is up we'll tag you and Rachel to approve. cc: @jahzielv

mostlikelee avatar Feb 25 '25 20:02 mostlikelee

@mostlikelee after looking at this bug again, unless I'm misunderstanding, I don't think there are any new fields/keys we need in the API. I we don't think we need Rachael's review.

It sounds like the GET /hosts/:id/software endpoint should exclude software that's not in a host's scope. That's what do we for platforms already: GET /hosts/:id/software for Windows hosts doesn't include macOS software.

I could be wrong. Moving this to "Ready to estimate" so we can discuss during estimation.

noahtalerman avatar Feb 26 '25 14:02 noahtalerman

This is somewhat similar to https://github.com/fleetdm/fleet/issues/28328#issuecomment-2864025397

ksykulev avatar May 12 '25 14:05 ksykulev

moving this back to the software board, seems to be resolved with other fixes

mostlikelee avatar May 12 '25 16:05 mostlikelee

Verified. Address in other PRs associated to ListHostSoftware

mostlikelee avatar May 14 '25 21:05 mostlikelee

Out of scope, yet seen, Fleet's software install glitch, Fixed, our canvas clean.

fleet-release avatar May 22 '25 19:05 fleet-release