Skip to content

Improve UX when there is no corresponding provisioner for a workspace/template #15048

Description

@bpmct

Since more and more of our users are using external provisioners and provisioner tags, especially with Organizations, we should explore ways to improve the UX when a provisioner is not running.

Current state

Create/duplicate template

Image

Template Editor

Screen.Recording.2024-10-12.at.8.24.16.AM.mov

Suggestion: "No provisioners are running with the tag provisioner=missing in the data-science org. Learn more about provisioners in the Coder documentation"

Create workspace

Image

Suggestion: "No provisioners are running with the tag provisioner=missing in the data-science org.
Learn more about provisioners in the Coder documentation"

Desired state

  • Some meaningful and actionable error. One suggestion:

    No provisioners are running with the tag provisioner=missing in the data-science org
    Learn more about provisioners in the Coder documentation"

  • Perhaps a custom troubleshooting URL for users, similar to the agent as the organization/template may have internal docs about provisioners work in their organization.

Activity

  1. bpmct commented on Oct 12, 2024

    @bpmct
    MemberAuthor
  2. matifali commented on Oct 12, 2024

    @matifali
    Contributor

    Related to #12331

  3. added
    design needed
    on Oct 21, 2024
  4. chrifro commented on Oct 23, 2024

    @chrifro
    Collaborator

    Related/duplicated issue #14845

  5. chrifro commented on Oct 23, 2024

    @chrifro
    Collaborator

    Here are the mockups for the three different pages with the error messages. I marked the changes with comments. What do you think @BrunoQuaresma @bpmct ?

  6. chrifro commented on Oct 24, 2024

    @chrifro
    Collaborator

    Ben has approved the new error states. They will look like this
    Image
    Image
    Image

    The exact changes are marked in Figma.

  7. added
    design ready
    and removed
    design needed
    on Oct 24, 2024
  8. removed their assignment
    on Oct 24, 2024
  9. self-assigned this
    on Nov 4, 2024
  10. SasSwart commented on Nov 4, 2024

    @SasSwart
    Collaborator

    My current understanding of this issue yields the following backend requirements:

    • determine how best to provide provisioner status to the frontend (as api documentation)
    • determine how to collect the information required for the new/updated endpoint
    • implement the endpoint with a mock response
    • do the plumbing to gather the required information and serve it via the endpoint

    Each of these steps will require attention paid to tests, logging, documentation, etc.

  11. 1 remaining item

  12. SasSwart commented on Nov 5, 2024

    @SasSwart
    Collaborator

    @johnstcn Makes sense. Instead of a preflight api call, I was thinking of making the current call return this:
    https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503

    If there are no matching provisioners currently available.

  13. johnstcn commented on Nov 5, 2024

    @johnstcn
    Member

    @johnstcn Makes sense. Instead of a preflight api call, I was thinking of making the current call return this: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503

    If there are no matching provisioners currently available.

    The problem with that approach is that it requires the user to click 'submit' in order to determine if the job can be even accomplished. As far as I can tell, the proposed UX requires that the user is able to know a priori if the job can be actioned with its current set of tags.

  14. SasSwart commented on Nov 7, 2024

    @SasSwart
    Collaborator

    Proposed API:

    // @Summary Get recently seen provisioner daemons by tags
    // @ID get-recently-seen-provisioner-daemons-by-tags
    // @Security CoderSessionToken
    // @Produce json
    // @Tags Enterprise
    // @Param organization path string true "Organization ID" format(uuid)
    // @Param tags query []string false "Tags required by acceptable provisioners"
    // @Success 200 {array} codersdk.ProvisionerDaemon
    // @Router /organizations/{organization}/provisionerdaemons/recentlyseen [get]
    

    The idea is that you can request this endpoint from the frontend to determine whether any provisioners with the required tags were recently seen. If it returns an empty list, then you can display the error. If it returns any elements at all, then we have confidence that at least one provisioner can accept the and we can therefore allow the user to proceed with the flow.

    For provisioning jobs that are already in progress, where we currently display a loading screen, you might have to poll this endpoint occasionally to determine if the error is still applicable. As an optimisation, we could later do this over websocket if we find it necessary.

    The definition of "recently seen" would be abstracted by the backend. It would be based on some measure of the heartbeat of the provisioners. To start with probably simply the last seen value as per the database.

    Any thoughts or considerations?

    I'm building this already, because even if we change the contract there is already some backend work that can be done.

    cc @BrunoQuaresma @johnstcn

  15. johnstcn commented on Nov 7, 2024

    @johnstcn
    Member

    We could alternatively piggy-back on the existing provisioner daemon endpoint either and allow filtering by tags?

    /api/v2/organizations/:id/provisionerdaemons?tags=foo%3Dbar%2Crazzle%3Ddazzle
    
  16. BrunoQuaresma commented on Nov 8, 2024

    @BrunoQuaresma
    Contributor

    Question: When creating a template, how do I know which tags should I use to get this data?

  17. johnstcn commented on Nov 8, 2024

    @johnstcn
    Member

    Question: When creating a template, how do I know which tags should I use to get this data?

    You actually don't! I'm working on this right now #15087

  18. removed their assignment
    on Dec 2, 2024
  19. bpmct commented on Dec 2, 2024

    @bpmct
    MemberAuthor

    I see we did this on template-level for v2.18. Looks super nice! @SasSwart

    Image

    Any plans for workspace-level?

    Image

  20. johnstcn commented on Dec 2, 2024

    @johnstcn
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

design ready

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions