Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Fix UI for workflows with multiple async lifecycle steps #759

Merged
merged 3 commits into from
Dec 12, 2018

Conversation

Rob0h
Copy link
Contributor

@Rob0h Rob0h commented Dec 12, 2018

What I Did

  • Fix UI for workflows with multiple async lifecycle steps

How I Did it

  • Previously, we were finding routes via the current phase that we are in (e.g. kubectl, terraform, etc.) Route phases are not unique as multiple kubectl steps will have the same phase. In order to reconcile this, the route id is now being used as it is unique to the each step.

How to verify it

  • Run ship init fixtures/kubectl/ship.yml to observe fixed functionality
  • Previous functionality can be verified via ship init fixtures/terraform/ship.yaml and ship init ${helm_chart}

Description for the Changelog

  • Fix UI for workflows with multiple async lifecycle steps

Picture of a Boat (not required but encouraged)

🛶

@ebramanti ebramanti self-requested a review December 12, 2018 18:43
const { startPollingStep, location, routeId } = this.props;
startPollingStep(location, routeId);
const { startPollingStep, currentRoute } = this.props;
if (currentRoute.phase === RENDER_PHASE) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This logic is here for these async steps to guard against re-polling. These components are re-rendered as the transition happens to the next phase as we're directly outputting JSX from the renderStep in DetermineComponentForRoute

routeId: "",
currentRoute: {
phase: TERRAFORM_PHASE,
id: "hotdog",
Copy link
Contributor

Choose a reason for hiding this comment

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

😂

@Rob0h Rob0h merged commit 9bfedaf into replicatedhq:master Dec 12, 2018
@Rob0h Rob0h deleted the render branch December 12, 2018 19:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants