[go: up one dir, main page]

Skip to content

Move workspace state indicator logic to backend

The following discussion from !163093 (merged) should be addressed:

  • @cwoolley-gitlab started a discussion: (+1 comment)

    suggestion (non-blocking): Early in the feature development for workspaces, there was some server-side logic that had a concept of calculating the displayed_state based on the combination of actual_state and desired_state.

    But we ended up removing that for some reason, I think because we thought it wasn't necessary anymore, and we could always just display the actual_state in the UI. Maybe @vtak remembers more, or we could dig into the commig/MR history.

    But based on all this logic here, it appears that hasn't turned out to be the case, and now we have all this domain logic living on the frontend.

    I would instead prefer that this logic be moved back to the backend, and just expose a new displayed_state field on the workspace via the GraphQL API.

    Not only to have the logic live on the backend instead of frontent, but also so it's available to any other API consumers other than the Vue client - e.g. reports, third party integrations, etc.

    If there's agreement on this, lets make a follow-up issue to do that. WDYT?