Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant Instance.Status.AggregatedStatus field #1474

Merged
merged 2 commits into from
Apr 30, 2020

Commits on Apr 20, 2020

  1. Remove redundant Instance.Status.AggregatedStatus field

    Summary:
    #1442 introduced new `Instance.Spec.PlanExecution.Status` field which duplicates part of the `Instance.Spec.PlanStatus` information . With that, plan execution status is now saved three times: in `planExecution`, `aggregatedStatus` and the corresponding `planStatus` fields e.g.:
    
    ```yaml
    apiVersion: kudo.dev/v1beta1
    kind: Instance
    spec:
      planExecution:
        planName: deploy
        status: IN_PROGRESS
    status:
      aggregatedStatus:
        activePlanName: deploy
        status: IN_PROGRESS
      planStatus:
        deploy:
          name: deploy
          phases:
          - name: deploy
            status: IN_PROGRESS
            steps:
            - name: app
              status: IN_PROGRESS
          status: IN_PROGRESS
    ```
    
    `aggregatedStatus` is completely duplicating `planExecution` while `planStatus` provides extended information on individual phases and steps. This PR removes `aggregatedStatus` field in favour of `planExecution`.
    
    The only caveat is that we previously kept `aggregatedStatus.status` value even **after** the plan was finished to signal how _last_ plan execution ended. However, `kudo plan status` already calculates and displays this information from the corresponding `planStatus`. Additionally, having `aggregatedStatus.activePlanName` populated when no plan is active is somewhat broken to begin with.
    
    Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
    zen-dog committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    86262b5 View commit details
    Browse the repository at this point in the history
  2. Rebase remnants

    Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
    zen-dog committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    0cf956d View commit details
    Browse the repository at this point in the history