ServiceNow / sncicd-install-app

MIT License
6 stars 6 forks source link

Install App failure when another update operation is active. #9

Open ramyaramdasan opened 3 years ago

ramyaramdasan commented 3 years ago

Hi @chiarnglin,

We encountered an error (pasted below, also attached a screenshot) while deploying an application using the CI/CD pipeline into the live instances. This is a bit concerning as we will see many applications doing parallel deployments. And until we have the hybrid model, we will also see Update sets retrieval done frequently.

Error: Unable to successfully install application package FooBar Custom Scope:4.10.1. Another update operation is being performed: Retrieving update sets from tst2. Try again when it is completed.

install-issue-when-other-transactions-active

Kindly help us out here.

Thanks, Ramya

chiarng commented 3 years ago

Hi @ramyaramdasan, Good to hear from you, hope you're feeling better! And thank you for the feedback. Unfortunately, ServiceNow instances don't allow for parallel installs of applications (or Update Sets, or other updates to the instance). This is partially solved for via our Batch Install feature that was shipped in Quebec, because that allows you to define one pipeline for many applications at once. However, I do hear your point that there's a mix of Update Sets and Apps being installed, so Batch Install doesn't solve for that problem. I'll take your feedback to the engineering team and see if we can come up with some other ideas for addressing this with features (perhaps queuing?). Thanks! Chiarng

Reference documentation: What is Batch Install https://docs.servicenow.com/bundle/quebec-application-development/page/administer/integrationhub-store-spokes/concept/cicd-spoke-batch-install.html Documentation on the JSON manifest used in the Batch Install API call in the API docs https://developer.servicenow.com/dev.do#!/reference/api/quebec/rest/cicd-api#cicd-POST-app-batch-install We're also updating our GitHub Actions with the Batch Install step (not published yet) https://github.com/ServiceNow/sncicd-batch-install

ramyaramdasan commented 3 years ago

Thanks @chiarnglin!

ramyaramdasan commented 3 years ago

Hi @chiarnglin,

To address the issue with parallel installs of applications, I tried adding Retry steps based on the sncicd-install-app step status. We were wondering if the Retry can be added as a part of the sncicd-install-app action itself. Or have a condition to check if there are any ongoing activities on the instance before attempting to install the application? Sharath and I were in a discussion and this idea struck, so thought of bringing it up for a discussion with you :)

chiarng commented 3 years ago

That's a good idea, though more of a workaround to the root issue of serial operations on instances. I'll reopen this Issue as something to explore, though don't have more budget for development on this at the moment. Sorry!

ramyaramdasan commented 3 years ago

Great! we will keep the Retry option (using continue-on-error) until then :-)