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

Incoherence between documented behaviour and runtime with Stack.StackStatus.LastUpdate.State field #98

Closed
rodcloutier opened this issue Nov 6, 2020 · 2 comments
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@rodcloutier
Copy link

rodcloutier commented Nov 6, 2020

Problem description

According to the documentation/comment, in StackStatus.LastUpdate.State field we should see either succeeded or failed. We instead see the current commit (ie master).

State string `json:"state,omitempty"`

This seems to be a misconception and used throughout the code:

Compare with commit

if !isStackMarkedToBeDeleted && (instance.Status.LastUpdate != nil && instance.Status.LastUpdate.State == instance.Spec.Commit) {

Assigned a failed message

instance.Status.LastUpdate = &pulumiv1alpha1.StackUpdateState{
State: pulumiv1alpha1.FailedStackStateMessage,
Permalink: permalink,
}

Assigned a commit

if instance.Status.LastUpdate == nil {
instance.Status.LastUpdate = &pulumiv1alpha1.StackUpdateState{
State: instance.Spec.Commit,
Permalink: permalink,
}
} else {
instance.Status.LastUpdate.State = instance.Spec.Commit
instance.Status.LastUpdate.Permalink = permalink
}

@lukehoban
Copy link
Contributor

@vivek I believe this was fixed with #107?

@viveklak
Copy link
Contributor

viveklak commented Dec 3, 2020

Fixed by #107. Closing.

@viveklak viveklak closed this as completed Dec 3, 2020
@infin8x infin8x added the kind/bug Some behavior is incorrect or out of spec label Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

5 participants