Skip to content

performUpdate does not mark a release as FAILED on failure #1137

Closed

Description

@technosophos

If an update fails, the release itself is not marked FAILED. I'm not positive about this, but it seems to me that at that point, the release is in a failed state. Unless the failed update simply results in a still-running original version, in which case DEPLOYED is the right status code.

Activity

  1. added this to the 2.0.0-Beta.1 milestone on Oct 7, 2016
  2. technosophos commented on Oct 10, 2016

    @technosophos
    MemberAuthor

    @michelleN can you verify which is the current behavior?

  3. michelleN commented on Oct 10, 2016

    @michelleN
    Member

    At the moment, if there is an error in Kube, it returns the error without modifying the release object's status.
    This is a probelm. Correct behavior should be.
    1.) Update the resources
    2) If there is an error updating, mark old release as superseded and current release as failed.

    In the current state, we're only updating statuses when there is no failure. :(

    
        if err := s.performKubeUpdate(originalRelease, updatedRelease); err != nil {
            return nil, err
        }
    
        // post-upgrade hooks
        if !req.DisableHooks {
            if err := s.execHook(updatedRelease.Hooks, updatedRelease.Name, updatedRelease.Namespace, postUpgrade); err != nil {
                return res, err
            }
        }
    
        originalRelease.Info.Status.Code = release.Status_SUPERSEDED
        if err := s.env.Releases.Update(originalRelease); err != nil {
            return nil, fmt.Errorf("Update of %s failed: %s", originalRelease.Name, err)
        }
    
        updatedRelease.Info.Status.Code = release.Status_DEPLOYED
    
        return res, nil
    
  4. self-assigned this
    on Oct 10, 2016
  5. added 6 commits that reference this issue on Oct 11, 2016
    f16f17c
    e6aa3e0
    37d3b1e
    42a6c77
    31e6215
    57b2e64
  6. added 2 commits that reference this issue on Oct 17, 2016
    4c2e943
    b51a823
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions