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

Publish-BcContainerApp still hangs when publishing to SaaS #3775

Open
BennoVendrig opened this issue Dec 3, 2024 · 13 comments
Open

Publish-BcContainerApp still hangs when publishing to SaaS #3775

BennoVendrig opened this issue Dec 3, 2024 · 13 comments
Assignees

Comments

@BennoVendrig
Copy link

PLEASE DO NOT INCLUDE ANY PASSWORDS OR TOKENS IN YOUR ISSUE!!!

Describe the issue
When we install our extension to a sandbox environment from a release pipeline in DevOps by using PowerShell the extension is installed/upgraded and visible in extension management but the release pipeline remains running. We need to cancel the pipeline manually so other pipeline in the queue can start.

See also issue #2718 with the same issue.

I have already set the parameter NoOfSecondsToSleepAfterPublishBcContainerApp to 10 seconds in c:\programdata\bccontainerhelper\bccontainerhelper.config.json file but this doesn't work unfortunately. You can see the screenshot the parameters seems to be set correctly.

Scripts used to create container and cause the issue

Publish-BcContainerApp `
    -bcAuthContext $authContext `
    -environment $environment `
    -syncMode "ForceSync" `
    -appFile $app 

Full output of scripts

See screenshot below
...

Screenshots
Image

Additional context

  • does it happen all the time? Yes 8 from 10 times it happens
  • did it use to work? No
@freddydk
Copy link
Contributor

freddydk commented Dec 3, 2024

The other failure came because of multiple apps being installed after each other.
This one seems to be the first installation.
How much time have you tried to wait?
Does it actually install the app?

@BennoVendrig
Copy link
Author

This was just an example. Our solution contains 4 apps: A, B, C and D. Apps B, C and D are dependent on app A. In the release pipeline we execute each app by using the Publish-BcContainerApp statement.
We manually cancel the pipeline after 15 minutes after the last extension is installed.
The pipeline does install all the apps.

@freddydk
Copy link
Contributor

freddydk commented Dec 5, 2024

Do you publish each app using Publish-BcContainerApp (i.e. calling the function 4 times)? or do you call the function with an array of 4 apps?
And... are you saying that the pipeline always ends up installing all apps - but it hangs and never finishes?

@BennoVendrig
Copy link
Author

At this moment we publish each app separately with the Publish-BcContainerApp command. I will make a change to use an array of 4 apps. Hopefully this will fix the issue.

Mostly App A is installed but the pipeline hangs for installing the other 3 apps.

@freddydk
Copy link
Contributor

freddydk commented Dec 5, 2024

Before modifying your scripts - have you tried the preview version of BcContainerHelper?
I did a change in PS7 bridge in that one, which might be related.

@BennoVendrig
Copy link
Author

Thanks for the quick response. You mean 6.0.29-preview1272? I will do the test with this version this evening and let you know the result.

@BennoVendrig
Copy link
Author

Hi Freddy,
I've made 2 changes in the script:

  1. Using BcContainerHelper version 6.0.29-preview1272
  2. Using BcContainerHelper version 6.0.29-preview1272

Image

Unfortunately the installation of the first/core app of our solution is installed successfully but than the installation hangs and the other 3 apps are not updates. I've waited more than 15 minutes.
At this moment I run the Publish-BcContainerApp command for each app and not using an array for installing the 4 apps.

@freddydk
Copy link
Contributor

freddydk commented Dec 8, 2024

You are publishing into the dev scope - if you do this from VS Code (with forcesync) - how much time does it take?
Also, could you try to use PowerShell 5 for the task instead?

@BennoVendrig
Copy link
Author

Hi Freddy,
We have used PS5 always before with the same issue. So no difference between PS5 and PS7.
I've added the useDevEndpoint parameter in the Publish-BcContainerApp command, but unfortunately still unstable to install all 4 apps.

Is there a way to unpublish/uninstall the apps by using a BcContainerHelper command in the BC Online Sandbox environment. If I do this upfront perhaps the Publish-BcContainerApp command for all 4 apps is more stable?

@freddydk
Copy link
Contributor

freddydk commented Dec 9, 2024

I could see in the logs that you where using devendpoint - so obviously no change in adding the parameter.

I would like to hear how much time deploying from VS Code takes?
And whether that is stable - try to change the version number - compile and publish a number of times - that should be exactly the same as what happens in Publish-BcContainerApp with devendpoint.

@BennoVendrig
Copy link
Author

Deployment from VS Code to sandbox SaaS online took approximately 4 to 5 minutes for 4 apps total.

Image

@BennoVendrig
Copy link
Author

Do you have any Idea based on the figures from the deployed from VSCode why the problem occurs in the pipeline and not with VS Code?

@freddydk
Copy link
Contributor

I do not
Does it happen every time - or some times? (how many percentage of the times)
can you .zip the apps together in a .zip file and on your laptop run a script with a few lines to repro this:

$authcontext = new-bcauthcontext -includedevicelogin
Publish-BcContainerApp -appfile $appfileszipped -bcAuthContext $authcontext -environmentName $environmentname

or like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants