Open gillespi314 opened 3 months ago
@marko-lisica to sort the API out and get back to @gillespi314
Hey @georgekarrv and @gillespi314 during design review yesterday we decided to push adding the payload for pending MDM commands in the UI/API. The Figma is updated here.
Instead we're tracking this addition is this issue as a follow up story for later.
I removed the :release
and 4.46.0-tentative
milestone. Please let me know if y'all have a different understanding.
FYI @getvictor and @jacobshandling because y'all are working on the iOS/iPadOS App Store app story.
Also, @gillespi314, my understanding is that we're still shipping the UI/API changes for NotNow
response as shown in Figma here).
Is that right?
@noahtalerman @gillespi314 I think we need to create a separate, ~unreleased-bug
to fix the UI then! right now the user will see an error message
Thanks @roperzh!
When attempting to view install details for a pending VPP app install, the UI will display an error even though the API response returns successfully.
More info:
We have any specs for what the
GET /commands/results?command_uuid=:command_uuid
API response should be where the command exists but we don't have results yet.This oversight is most likely because this endpoint goes all the way back to the original POC for MDM and was until now only really used by the CLI.
Up to now, it didn’t matter, because our struct for the response type make the fleetctl client think that there is a results field present with the default value even if the body was {}. So the client just displayed an empty table in that case.
There are two ways we could tackle this:
{ results: [] }
to the JSON response body (which mirrors what the CLI client implicitly does in this case) and leave it to the frontend to piece together the other info it needs to display the pending UI.If we go with option 2, we’d need to decide what to return for
status
,updated_at
andresult
, I think. Here’s the shape expected where there are results.Note that
status
for this API endpoint has historically been the raw status from Apple (i.e., “Acknowledged”, “NotNow”, etc.) rather than Fleet’s derived status (e.g., “Pending”). Forupdated_at
andresult
, we’d need to decide on whether we want the default value to be empty strings or something else.Thanks to @mostlikelee for raising this issue in Slack.