microsoft / StoreBroker

A PowerShell module that leverages the Windows Store Submission API to allow easy automation of application submissions to the Windows Store. The master branch is stable and the v2 branch is under active development.
Other
97 stars 40 forks source link

Packages stuck in PendingUpload despite StoreBroker upload success #188

Closed riverar closed 4 years ago

riverar commented 4 years ago

After staging a submission and uploading a package, Get-ApplicationSubmission indicates the new packages still carry a fileStatus of PendingUpload.

Typically this means the package failed validation in some way (per #181) but I was able to manually upload the package with no problems.

Did something break on the backend?

Last MS-CorrelationId before package upload step: 5d279027-3282-4730-b393-f8efa2dab3ce Snippet of StoreBroker logs:

2020-02-23T21:53:08.2347335Z VERBOSE: 2020-02-23 21:53:08 : VssAdministrator : Uploading the package [D:\a\_temp\Submission\xxx.zip] since it
2020-02-23T21:53:08.2347811Z  was provided.
2020-02-23T21:53:09.2174462Z VERBOSE: 2020-02-23 21:53:09 : VssAdministrator : Executing:             Set-SubmissionPackage -PackagePath 
2020-02-23T21:53:09.2175378Z $PackagePath -UploadUrl $uploadUrl -NoStatus:$NoStatus
2020-02-23T21:53:09.2208519Z VERBOSE: 2020-02-23 21:53:09 : VssAdministrator : Attempting to upload the package 
2020-02-23T21:53:09.2209254Z (D:\a\_temp\Submission\xxx.zip) for the submission to 
2020-02-23T21:53:09.2210076Z https://ingestionpackagesprod1.blob.core.windows.net/ingestion/redacted?sv=2017-04-17&sr=b&
2020-02-23T21:53:09.2210985Z sig=redacted&se=2020-02-24T22:07:53Z&sp=rwl...
2020-02-23T21:53:09.2455364Z VERBOSE: 2020-02-23 21:53:09 : VssAdministrator : Looking for Microsoft.WindowsAzure.Storage.dll
2020-02-23T21:53:09.2490644Z VERBOSE: 2020-02-23 21:53:09 : VssAdministrator : Creating temporary directory: 
2020-02-23T21:53:09.2491436Z C:\Users\VSSADM~1\AppData\Local\Temp\d014a219-6489-4644-8940-6e22c2a71bbe
2020-02-23T21:53:09.2524895Z VERBOSE: 2020-02-23 21:53:09 : VssAdministrator : Microsoft.WindowsAzure.Storage.dll is needed and wasn't found.  
2020-02-23T21:53:09.2525327Z Acquiring it via nuget...
2020-02-23T21:53:09.2596787Z VERBOSE: 2020-02-23 21:53:09 : VssAdministrator : Downloading nuget package [WindowsAzure.Storage] to 
2020-02-23T21:53:09.2597324Z [C:\Users\VssAdministrator\AppData\Local\Temp\d014a219-6489-4644-8940-6e22c2a71bbe]
2020-02-23T21:53:09.2629653Z VERBOSE: 2020-02-23 21:53:09 : VssAdministrator : Creating temporary directory: 
2020-02-23T21:53:09.2630148Z C:\Users\VSSADM~1\AppData\Local\Temp\348aff22-ffd0-47ea-a3cd-731fcfeb5db4
2020-02-23T21:53:09.2657265Z VERBOSE: 2020-02-23 21:53:09 : VssAdministrator : Downloading 
2020-02-23T21:53:09.2657619Z https://dist.nuget.org/win-x86-commandline/latest/nuget.exe to 
2020-02-23T21:53:09.2658005Z C:\Users\VssAdministrator\AppData\Local\Temp\348aff22-ffd0-47ea-a3cd-731fcfeb5db4\nuget.exe
2020-02-23T21:53:09.2768815Z VERBOSE: GET https://dist.nuget.org/win-x86-commandline/latest/nuget.exe with 0-byte payload
2020-02-23T21:53:09.5294378Z VERBOSE: received 5803104-byte response of content type application/x-msdownload
2020-02-23T21:53:30.1832876Z 2020-02-23 21:53:30 : VssAdministrator : To avoid this download delay in the future, copy the following file:
2020-02-23T21:53:30.1833632Z   [C:\Users\VssAdministrator\AppData\Local\Temp\d014a219-6489-4644-8940-6e22c2a71bbe\WindowsAzure.Storage.8.1.1\lib\net45\Microsoft.WindowsAzure.Storage.dll]
2020-02-23T21:53:30.1834042Z either to:
2020-02-23T21:53:30.1834242Z   [D:\a\_temp\StoreBroker\StoreBroker]
2020-02-23T21:53:30.1834463Z or to:
2020-02-23T21:53:30.1834734Z   a directory of your choosing, and save that directory path to $SBAlternateAssemblyDir
2020-02-23T21:53:30.1863871Z VERBOSE: 2020-02-23 21:53:30 : VssAdministrator : Looking for Microsoft.WindowsAzure.Storage.DataMovement.dll
2020-02-23T21:53:30.1901435Z VERBOSE: 2020-02-23 21:53:30 : VssAdministrator : Microsoft.WindowsAzure.Storage.DataMovement.dll is needed and wasn't 
2020-02-23T21:53:30.1902165Z found.  Acquiring it via nuget...
2020-02-23T21:53:30.1943465Z VERBOSE: 2020-02-23 21:53:30 : VssAdministrator : Downloading nuget package [Microsoft.Azure.Storage.DataMovement] to 
2020-02-23T21:53:30.1943993Z [C:\Users\VssAdministrator\AppData\Local\Temp\d014a219-6489-4644-8940-6e22c2a71bbe]
2020-02-23T21:53:33.8506652Z 2020-02-23 21:53:33 : VssAdministrator : To avoid this download delay in the future, copy the following file:
2020-02-23T21:53:33.8513643Z   [C:\Users\VssAdministrator\AppData\Local\Temp\d014a219-6489-4644-8940-6e22c2a71bbe\Microsoft.Azure.Storage.DataMovement.0.5.1\lib\net45\Microsoft.WindowsAzure.Storage.DataMovement.dll]
2020-02-23T21:53:33.8514693Z either to:
2020-02-23T21:53:33.8515101Z   [D:\a\_temp\StoreBroker\StoreBroker]
2020-02-23T21:53:33.8515441Z or to:
2020-02-23T21:53:33.8515924Z   a directory of your choosing, and save that directory path to $SBAlternateAssemblyDir
2020-02-23T21:53:35.8358222Z VERBOSE: 2020-02-23 21:53:35 : VssAdministrator : Telemetry has been disabled via $global:SBDisableTelemetry. Skipping 
2020-02-23T21:53:35.8359286Z reporting event.
2020-02-23T21:53:35.8418890Z VERBOSE: 2020-02-23 21:53:35 : VssAdministrator : Successfully uploaded the application package.
HowardWolosky commented 4 years ago

What do you mean by "staging" here? In API v1, the file status won't change in the API until the submission has been committed and enters the certification stage.

riverar commented 4 years ago

@HowardWolosky I'm using staging to refer to my work on DevOps to prepare for StoreBroker use, feeI free to ignore that. If I review the submission in Partner Center, it's missing the packages I uploaded (normal). If I commit the submission manually via Partner Center, and wait for certification stage, then call Get-ApplicationSubmission, anything previously marked as PendingUpload vanishes.

HowardWolosky commented 4 years ago

You definitely don't want to do that. There should have even been a warning in Partner Center that the submission you were looking at had been started with the API.

Partner Center and API v1 don't mix well. If you start a submission with the API, and then commit it in Partner Center, Partner Center will completely drop all changes that the API made -- you'll end up just submitting a copy of the previous submission.

If your desire is to verify that the StoreBroker/API v1 did what you had wanted it to do before actually publishing, then the recommended approach is to commit with -TargetPublishMode Manual. That means that after certification has been completed, it won't actually publish until you hit a button in Partner Center (there is no API in v1 to advance a manual submission from Ready to Publish to Publish...that has to be done in Partner Center).

The only time you should use Partner Center with an API v1 modified submission is once it has entered certification...that's the first time that Partner Center will actually reflect the API changes, and when the API will reflect the current state of the submission.

API v2 solves so that you can go back and forth between the API and Partner Center without messing things up...unfortunately, API v2 is not publicly available at this time.

riverar commented 4 years ago

@HowardWolosky Ahh, thanks. Will make that change in our release pipeline now.