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

pac solution import / export operations shows random % complete when using async flag #511

Closed
dylanhaskins opened this issue Apr 21, 2023 · 3 comments

Comments

@dylanhaskins
Copy link

Hi Team,

When using pac solution import with --async the progress results show a % complete value which is not a true value. It shows a very low % value and usually ends at some random percentage between 1 and 10.

image

@tehcrashxor
Copy link
Member

The phrasing is not really clear here, but that percentage is not a work-done percentage, but a percentage of the max wait time before pac times out. The Dataverse services don't provide any information about the progress of the task other than "running, failed, complete", so it's not possible for pac to give a reasonable work-done percentage.

@tehcrashxor tehcrashxor closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2023
@dylanhaskins
Copy link
Author

Thanks @tehcrashxor , the percentage makes much more sense now :)

For reference though, the statement around Dataverse services not providing information about progress, is not entirely true. Async solution import jobs do provide a progress indicator. Solution Upgrade jobs don't though.

Prior to wanting to use the pac solution import (as we use many of the other pac cli tools too) we were using the ImportSolutionToCrmAsync method of the CrmServiceClient which returns a .progress property. Just FYI ;)

Polling Import for Solution: WSDTBase : In Progress - 90.58%
Polling Import for Solution: WSDTBase : In Progress - 90.58%
Polling Import for Solution: WSDTBase : In Progress - 90.58%
Polling Import for Solution: WSDTBase : In Progress - 90.78%
Polling Import for Solution: WSDTBase : In Progress - 90.78%
Polling Import for Solution: WSDTBase : In Progress - 90.78%
Polling Import for Solution: WSDTBase : In Progress - 90.98%
Polling Import for Solution: WSDTBase : In Progress - 91.38%
Polling Import for Solution: WSDTBase : In Progress - 91.58%
Polling Import for Solution: WSDTBase : In Progress - 92.38%
Polling Import for Solution: WSDTBase : In Progress - 92.79%
Polling Import for Solution: WSDTBase : In Progress - 92.99%
Polling Import for Solution: WSDTBase : In Progress - 100.00%
Polling Import for Solution: WSDTBase : Succeeded - 100.00%
Applying Upgrade to Solution
Async Operation ID: f9e99cb7-e0bb-ed11-83fe-00224818a66b
Polling Promotion status for Solution: WSDTBase : In Progress
Polling Promotion status for Solution: WSDTBase : In Progress
Polling Promotion status for Solution: WSDTBase : In Progress

@tehcrashxor
Copy link
Member

PAC uses the DatverseServiceClient's ImportSolutionAsync(...), which returns an Async Operation ID.
We then poll over GetEntityDataByID("asyncoperation", jobId, ...), but that response does not have any progress property.

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

No branches or pull requests

2 participants