sparse-intern-71089
11/17/2020, 4:07 PMbillowy-army-68599
billowy-army-68599
clever-sunset-76585
11/17/2020, 4:15 PMbut no output fromThe GitLab integration adds notes to the MR foris added afterwards..pulumi up
pulumi preview
only. I am curious — are you running pulumi up
in the MR or are you running it once the MR is merged?
Also I realize it isn’t the same thing but you can now subscribe to stack update (i.e. pulumi up
) success/failure from the Pulumi Console and get email notifications. If you go to the Pulumi Console for the stack in question, you should see a “Watch” button to the right and just below the avatar button that’ll let you subscribe to updates.agreeable-ram-97887
11/17/2020, 4:15 PMrhythmic-napkin-82334
11/17/2020, 4:19 PMpulumi up
in the MR?
Would be highly appreciated! 🙏rhythmic-napkin-82334
11/17/2020, 4:20 PMpulumi preview
for only: merge_request
and pulumi up
for only: main, dev
.clever-sunset-76585
11/17/2020, 4:23 PMWhy does the GitLab integration not provide output ofin the MR?pulumi up
Would be highly appreciated!That’s good feedback! I will take that feedback back to our team.
PS: Until now we ranDo you meanforpulumi_up
andonly: merge_request
forpulumi up
.only: main, dev
pulumi preview
for only: merge_request
…?rhythmic-napkin-82334
11/17/2020, 4:29 PMpulumi up
would be really helpful! 🙂
Getting email notifications for that are also nice, but it would be better to have all the information and links to pulumi UI on the merge request (as is already the case for pulumi preview
).clever-sunset-76585
11/17/2020, 4:36 PMrhythmic-napkin-82334
11/17/2020, 4:44 PMonly: merge_requests
and when: manual
for pulumi up
) :
assert-formatting:
stage: format
before_script:
- pip install black
script:
- black --check __main__.py
only:
- merge_requests
- dev
- master
pulumi-preview:
stage: infrastructure-preview
script:
- ./scripts/pulumi-run.sh -o ${CI_PROJECT_ROOT_NAMESPACE} -p ${CI_PROJECT_NAME} -s ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} -c "preview --suppress-outputs" -r "eu-central-1" > pulumi-log.txt
# Create an artifact archive with just the pulumi log file,
# which is created using console-redirection in run-pulumi.sh.
artifacts:
paths:
- pulumi-log.txt
expire_in: 1 week
only:
- merge_requests
##################################
## Updating
pulumi-up:
stage: infrastructure-update
script:
- ./scripts/pulumi-run.sh -o ${CI_PROJECT_ROOT_NAMESPACE} -p ${CI_PROJECT_NAME} -s ${CI_COMMIT_REF_NAME} -c "up --yes --suppress-outputs" -r ${AWS_DEFAULT_REGION}
only:
- merge_requests
when: manual
And we like the process of this!
However, we still don't get the pulumi up
output (as you said), instead three times the pulumi preview
output 🤷clever-sunset-76585
11/17/2020, 4:47 PMHowever, we still don’t get theYeah each note corresponds to a specific exceution of theoutput (as you said), instead three times thepulumi up
outputpulumi preview
preview
command. That is, each time you push an update to that same MR, a new comment is added related to the execution triggered by the latest commit to that MR.clever-sunset-76585
11/17/2020, 4:51 PMrhythmic-napkin-82334
11/17/2020, 4:54 PMpulumi up
failed.
And the Update
link brings us to the respective error message.
If only that error message could be also output into the MR, we would be already happy! 😊rhythmic-napkin-82334
11/17/2020, 4:56 PMOh interesting. Just noticed that that last comment in your screenshot is an actual update. Hmm I guess you ran the actual update in the MR pipeline?Yes, as mentioned above we run
pulumi up
in only: merge_request
with when: manual
.
PS: Just corrected the typo in the code shared above (only: merge_request
applied everywhere).clever-sunset-76585
11/17/2020, 4:57 PMYes, as mentioned above we runOk yeah I was suspecting it was a typo but I guess not 🙂 Do you run ainpulumi up
withonly: merge_request
.when: manual
destroy
or something if it is successful then?rhythmic-napkin-82334
11/17/2020, 4:58 PMclever-sunset-76585
11/17/2020, 5:03 PMpreview
in the MR pipeline and merging the approved changes to let the push build be the only pipeline where you apply the update.clever-sunset-76585
11/17/2020, 5:05 PMagreeable-ram-97887
11/17/2020, 5:18 PMpulumi up
error notification in the merge request 😕. So since it is just the two of us on our backend team, I think we can be careful about it for the time being. But you're right that this is definitely an issue that we will run into in the future as our team grows. So we'll be keen to hear about any updates from Pulumi 🙂clever-sunset-76585
11/17/2020, 5:36 PMagreeable-ram-97887
11/17/2020, 7:09 PMCreate issue -> Initialize MR -> Develop -> See pulumi preview -> Manually accept update -> Discover error -> Document discussion -> Develop -> Preview -> Manually accept update -> See that pulumi update was successful -> Merge
Is a more effective strategy than:
Create issue -> Initialize MR -> Develop -> See pulumi preview -> Merge ("successfully") -> Wait for email -> Discover error -> Document discussion (somewhere?) -> Reopen issue -> Initialize new MR (tenuously tied to the former) -> Develop -> See preview -> Merge -> Wait for email -> See that pulumi update was successful -> Party
Hopefully that makes our current concern a bit clearer? But of course in the future, when we are working on more than one infrastructure-related issue at a time and when the changes are more marginal and less likely to fail during the update, then the route you suggest is definitely the better option!clever-sunset-76585
11/17/2020, 8:30 PMpulumi preview
in your MR pipeline isn’t giving you the failure you might see once it is merged. I recommend digging into that and look at ways to surface that in the preview. So that your MR pipeline is reliable and you have an assurance that the changes will pass when merged.
On a slightly related note, you could also look into our integration test framework that could help you test your infrastructure effectively. Although depending on what you are doing in your infrastructure app it can cause your pipeline build times to become long. The integration test framework is good for setting up and tearing-down the infrastructure.