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

The handle is invalid #185

Open
kfrancis opened this issue Aug 4, 2023 · 3 comments
Open

The handle is invalid #185

kfrancis opened this issue Aug 4, 2023 · 3 comments
Labels
idle Inactive for 14 days waiting-for-user Waiting for inputs from user

Comments

@kfrancis
Copy link

kfrancis commented Aug 4, 2023

When attempting to run a script migration, I'm getting this endlessly until it either times out or I cancel.

2023-08-04 14 45 55

Run azure/[email protected]
  with:
    connection-string: ***
    path: ./migration-38.sql
  env:
    BUILD_CONFIGURATION: Release
    AZURE_HTTP_USER_AGENT: 
    AZUREPS_HOST_ENVIRONMENT: 
  
##[debug]isExplicit: 1.0.0
##[debug]explicit? true
##[debug]checking cache: C:\hostedtoolcache\windows\go-sqlcmd\1.0.0\x64
##[debug]not found
##[debug]Downloading https://github.com/microsoft/go-sqlcmd/releases/download/v1.0.0/sqlcmd-v1.0.0-windows-x64.zip
##[debug]Destination D:\a\_temp\81a[35](https://github.com/[redacted]/actions/runs/5765555095/job/15631847638#step:5:35)bc3-5e90-4525-b0ed-3e91a0bac914.zip
##[debug]download complete
##[debug]Using pwsh at path: C:\Program Files\PowerShell\7\pwsh.exe
"C:\Program Files\PowerShell\7\pwsh.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ; try { [System.IO.Compression.ZipFile]::ExtractToDirectory('D:\a\_temp\81a35bc3-5e90-4525-b0ed-3e91a0bac914.zip', 'D:\a\_temp\6506c02c-80c5-4b8e-a902-ac3f8e41[36](https://github.com/[redacted]/actions/runs/5765555095/job/15631847638#step:5:36)ff', $true) } catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath 'D:\a\_temp\81a35bc3-5e90-4525-b0ed-3e91a0bac914.zip' -DestinationPath 'D:\a\_temp\6506c02c-80c5-4b8e-a902-ac3f8e4136ff' -Force } else { throw $_ } } ;"
##[debug]Caching tool go-sqlcmd 1.0.0 x64
##[debug]source dir: D:\a\_temp\6506c02c-80c5-4b8e-a902-ac3f8e4136ff
##[debug]destination C:\hostedtoolcache\windows\go-sqlcmd\1.0.0\x64
##[debug]finished caching tool
##[debug]Get action inputs.
::add-mask::***
::add-mask::***
##[debug]Validating if client has access to 'master' on '[redacted].database.windows.net'.
##[debug]Begin executing sql script
sqlcmd.exe -S [redacted].database.windows.net -d [redacted] -U *** -i ./migration-[38](https://github.com/[redacted]/actions/runs/5765555095/job/15631847638#step:5:39).sql
read ./migration-38.sql: The handle is invalid.
read ./migration-38.sql: The handle is invalid.
read ./migration-38.sql: The handle is invalid.
read ./migration-38.sql: The handle is invalid.
read ./migration-38.sql: The handle is invalid.

Here's the migration step yaml:

      - name: Run DB Migration Script
        uses: azure/[email protected]
        with:        
          connection-string: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
          path: './migration-${{ github.run_number }}.sql'

Any ideas?

@kfrancis kfrancis added the need-to-triage Requires investigation label Aug 4, 2023
@github-actions
Copy link

This issue is idle because it has been open for 14 days with no activity.

@github-actions github-actions bot added the idle Inactive for 14 days label Aug 18, 2023
@dzsquared
Copy link
Collaborator

Looks like a windows agent instead of a linux agent, so it's probably choking on ./filename.sql

I'd swap it to just filename.sql

@dzsquared dzsquared removed need-to-triage Requires investigation idle Inactive for 14 days labels Nov 1, 2023
@dzsquared dzsquared added the waiting-for-user Waiting for inputs from user label Nov 9, 2023
Copy link

This issue is idle because it has been open for 14 days with no activity.

@github-actions github-actions bot added the idle Inactive for 14 days label Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle Inactive for 14 days waiting-for-user Waiting for inputs from user
Projects
None yet
Development

No branches or pull requests

2 participants