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
CloudFormation with ChangeSet - Task fails if there are no changes #97
Comments
The changes were just to suppress the warning message, not skip it and throw, so it shouldn't have caused a regression but...famous last words. Taking a look now. |
@JeffRausch , I must be doing something different to your build as I can't get a build fail when no changes are present. I set up a pipeline that deployed one of the CloudFormation sample templates, then redeployed it, and I'm not seeing an issue. The output below is from the default task settings with the 'log no-change warning' option toggled oin:
The second output below is with the option toggled off - the warning disappears but the task completes successfully -
Can you share the settings you have on your Create/Update Stack task? |
Below is the JSON exported from that task. The only thing I see that may be different is I'm trying to update an already updated stack. So my stack status is "UPDATE_COMPLETE" instead of "CREATE_COMPLETE" as seen with a freshly created stack.
|
Hmmm, updating my pipeline to do a create, update then another update didn't throw up. Something odd going on :-( |
Just to confirm, you Created the stack, then did a stack update with changes, then tried to do a stack update without changes. Other than that I can't think of anything else that may be different. When I try to deploy it creates the change set. I see the change set in the AWS CloudFormation console and it finishes with a status of FAILED. If I go into that failed changeset I see the status as "FAILED - No updates are to be performed". If I get time today I'll try to put together a simple test to reproduce it on my end. Maybe there's something odd with the deployment that I missed or possibly it depends on what I'm trying to deploy since it contains a lambda function or something. |
My sequence was create, update-no-changes, update-no-changes. I'll revise that second step to make a change and see what occurs. |
A sequence of create, update-with-change and update-with-no-change is also proving elusive to repro. Did you manage to get a simplified repro I could try? |
Sorry, I didn't have time yesterday. I just put a small sample together and was able to reproduce it. It was reproduced by creating the stack and then trying to update the stack using the same template with no changes - I did not need to update the stack with changes. Potentially the key is having a lambda function in the stack...? "index.zip" contains the CloudFormation template and a small js file to test the lambda function create. I loaded the zip to a S3 location and then updated that location within the template. |
Thanks, I'll give those a try. |
Ok, I think I see what's happening. If I fire off a pipeline with a create and then a no-op update, the build fails at the VSTS side with this error -
However if I check in the console, the change set has the following message against it:
I can trigger this even if I delete the change set (in the console) and then in my VSTS build just run an update step with no prior create. I don't know yet if this is a change of behavior at the service side or a change of message - the current code is looking for a state of FAILED and a message 'The submitted information didn't contain changes' (this was the only way to detect no-op sadly). The text 'No updates are to be performed' was originally returned only if updating a stack without using a change set - so it's possible the service team have consolidated to one message. I'm going to run some tests to check on either message for a change set update see if that works, then we can try and unblock you. |
…, caused by change of service behavior
Fix for issue #97, no longer detecting 'no work done' on stack update
@JeffRausch , I just pushed v1.1.5 to the marketplace that hopefully fixes the issue for you - I'll leave the issue open pending confirmation, feel free to close if there are no other related problems. |
It's working as expected now. Thanks! |
@steveataws
I'm not sure if the changes done for #91 broke the changes done for issue #28 but now if I deploy a stack that uses a change set and there are no changes I get an error and the release fails. I didn't notice any options that I could change other than the "Log warning during stack update..." that was added for issue #91 . There is a "Continue on error" option under Control Options but we don't want to do that in case there are other issues with the CF deployment.
I get the same error whether the "Log warning during stack update..." option is checked or not.
The deployment without a change set works as expected.
The text was updated successfully, but these errors were encountered: