Skip to content

Conversation

Kira-Pilot
Copy link
Member

Resolves #4098

We didn't have the latest template on our machine context so we weren't sending down the correct template.active_version_id when posting a new build.

@Kira-Pilot Kira-Pilot requested a review from a team as a code owner September 27, 2022 18:59
@Kira-Pilot Kira-Pilot requested review from greyscaled, bpmct and BrunoQuaresma and removed request for a team and greyscaled September 27, 2022 18:59
Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just a minor question, during the refreshTemplate state, does the UI show a loader? So the user knows the workspace is updating?

@BrunoQuaresma
Copy link
Collaborator

Also, something that could be done is to encapsulate those states so it is easier to know they are related like:

updatingWorkspace: {
    initial: "refreshingTemplate",
    states: {
        refreshingTemplate: {...},
        startingWithLatest: {...},
    }
}

@@ -271,6 +271,20 @@ export const workspaceMachine = createMachine(
},
},
},
refreshTemplate: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be refreshTemplateAndStart instead? It could be a bit misleading since it doesn't just refresh.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kylecarbs It does just refresh actually, but I agree - it's part of a larger plan and the naming doesn't capture that. Would it feel better if I applied Bruno's grouping suggestion?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, yup I think that'd make sense!

@Kira-Pilot
Copy link
Member Author

LGTM. Just a minor question, during the refreshTemplate state, does the UI show a loader? So the user knows the workspace is updating?

It does now!

@Kira-Pilot Kira-Pilot merged commit 65ff604 into main Sep 27, 2022
@Kira-Pilot Kira-Pilot deleted the fix-update-button/kira-pilot branch September 27, 2022 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workspace with Outdated status does not update the first time you click update
3 participants