PowerShell / PowerShellGallery

234 stars 65 forks source link

Insufficient Information returned when publishing fails #42

Open SQLDBAWithABeard opened 5 years ago

SQLDBAWithABeard commented 5 years ago

A dbachecks release to the gallery via Azure DevOps Pipeline (but also replicated locally) failed and the information returned was

VERBOSE: info : Pushing dbachecks.1.1.167.nupkg to 'https://www.powershellgallery.com/api/v2/package/'... 2019-01-29T17:46:28.0049911Z 2019-01-29T17:46:28.0050057Z info : PUT https://www.powershellgallery.com/api/v2/package/ 2019-01-29T17:46:28.0050425Z 2019-01-29T17:46:28.0050718Z info : An error was encountered when fetching 'PUT https://www.powershellgallery.com/api/v2/package/'. The request will 2019-01-29T17:46:28.0050850Z now be retried. 2019-01-29T17:46:28.0050989Z 2019-01-29T17:46:28.0051110Z info : An error occurred while sending the request. 2019-01-29T17:46:28.0051205Z 2019-01-29T17:46:28.0051350Z info : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote 2019-01-29T17:46:28.0051467Z host. 2019-01-29T17:46:28.0051580Z 2019-01-29T17:46:28.0051697Z info : An existing connection was forcibly closed by the remote host 2019-01-29T17:46:28.0051795Z 2019-01-29T17:46:28.0051932Z info : PUT https://www.powershellgallery.com/api/v2/package/ 2019-01-29T17:46:28.0052028Z 2019-01-29T17:46:28.0052154Z info : An error was encountered when fetching 'PUT https://www.powershellgallery.com/api/v2/package/'. The request will 2019-01-29T17:46:28.0052301Z now be retried. 2019-01-29T17:46:28.0052392Z 2019-01-29T17:46:28.0052528Z info : An error occurred while sending the request. 2019-01-29T17:46:28.0052624Z 2019-01-29T17:46:28.0052771Z info : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote 2019-01-29T17:46:28.0052928Z host. 2019-01-29T17:46:28.0053021Z 2019-01-29T17:46:28.0053137Z info : An existing connection was forcibly closed by the remote host 2019-01-29T17:46:28.0053254Z 2019-01-29T17:46:28.0053369Z info : PUT https://www.powershellgallery.com/api/v2/package/ 2019-01-29T17:46:28.0053668Z 2019-01-29T17:46:28.0054445Z error: An error occurred while sending the request. 2019-01-29T17:46:28.0054631Z 2019-01-29T17:46:28.0054827Z error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote 2019-01-29T17:46:28.0054988Z host. 2019-01-29T17:46:28.0055113Z 2019-01-29T17:46:28.0055296Z error: An existing connection was forcibly closed by the remote host 2019-01-29T17:46:28.1040958Z Publish-PSArtifactUtility : Failed to publish module 'dbachecks': 'info : Pushing dbachecks.1.1.167.nupkg to 2019-01-29T17:46:28.1041142Z 'https://www.powershellgallery.com/api/v2/package/'... 2019-01-29T17:46:28.1041860Z info : PUT https://www.powershellgallery.com/api/v2/package/ 2019-01-29T17:46:28.1042002Z info : An error was encountered when fetching 'PUT https://www.powershellgallery.com/api/v2/package/'. The request 2019-01-29T17:46:28.1042063Z will now be retried. 2019-01-29T17:46:28.1042140Z info : An error occurred while sending the request. 2019-01-29T17:46:28.1042206Z info : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote 2019-01-29T17:46:28.1042453Z host. 2019-01-29T17:46:28.1042504Z info : An existing connection was forcibly closed by the remote host 2019-01-29T17:46:28.1042609Z info : PUT https://www.powershellgallery.com/api/v2/package/ 2019-01-29T17:46:28.1042880Z info : An error was encountered when fetching 'PUT https://www.powershellgallery.com/api/v2/package/'. The request 2019-01-29T17:46:28.1043005Z will now be retried. 2019-01-29T17:46:28.1043145Z info : An error occurred while sending the request. 2019-01-29T17:46:28.1043632Z info : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote 2019-01-29T17:46:28.1044146Z host. 2019-01-29T17:46:28.1044331Z info : An existing connection was forcibly closed by the remote host 2019-01-29T17:46:28.1044528Z info : PUT https://www.powershellgallery.com/api/v2/package/ 2019-01-29T17:46:28.1045903Z error: An error occurred while sending the request. 2019-01-29T17:46:28.1046011Z error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote 2019-01-29T17:46:28.1046108Z host. 2019-01-29T17:46:28.1046176Z error: An existing connection was forcibly closed by the remote host 2019-01-29T17:46:28.1046415Z '. 2019-01-29T17:46:28.1046493Z At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.0.3\PSModule.psm1:10883 char:17 2019-01-29T17:46:28.1046575Z + ... Publish-PSArtifactUtility @PublishPSArtifactUtility_Param ... 2019-01-29T17:46:28.1047033Z + ~~~~~~~~~~~~~ 2019-01-29T17:46:28.1047143Z + CategoryInfo : InvalidOperation: (:) [Write-Error], WriteErrorException 2019-01-29T17:46:28.1047412Z + FullyQualifiedErrorId : FailedToPublishTheModule,Publish-PSArtifactUtility 2019-01-29T17:46:28.1047461Z
2019-01-29T17:46:28.2783289Z ##[error]PowerShell exited with code '1'.

as can be seen here

https://dev.azure.com/sqlcollaborative/dbachecks/_releaseProgress?_a=release-environment-logs&releaseId=92&environmentId=92

To gather the actual error required emailing someone at Microsoft to get info from the logs

System.InvalidOperationException: There were errors extracting PowerShell metadata: Unexpected element encountered: ""

Date 29/01/2019

Added skip for authentication scheme #257 Added WhatIf to Update-DbcPowerBiDataSource Thank you @shaneis #590 $null to the left Thank you @jwmoss #588

was the particular error which pointed me directly to the pesky $ in the release notes in the psd1 which are the titles of the GitHub issues fixed and which I didnt think about included the $ (more fool me)

Please can these exceptions be surfaced to the user to enable troubleshooting.

Incidentally, this also passed Test-ModuleManifest - Does an issue need to be raised there also ?