sevaa / githubactions

Azure DevOps extension for running GitHub workflows from AzDevOps pipelines, or downloading artifacts from past runs
3 stars 3 forks source link

"[error]The workflow Build has no successful runs." when successful runs exist. #3

Closed alex8bitw closed 1 year ago

alex8bitw commented 1 year ago

This was working till it suddenly stopped with:

2023-05-30T23:49:31.9821052Z ==============================================================================
2023-05-30T23:49:31.9821507Z Task         : Download GitHub Workflow Artifacts
2023-05-30T23:49:31.9822026Z Description  : Downloads the artifacts from a GitHub workflow run
2023-05-30T23:49:31.9822413Z Version      : 1.0.3
2023-05-30T23:49:31.9822661Z Author       : Seva Alekseyev
2023-05-30T23:49:31.9822929Z Help         : 
2023-05-30T23:49:31.9823173Z ==============================================================================
2023-05-30T23:49:32.0412243Z ##[debug]Using node path: /home/vsts/agents/3.220.2/externals/node16/bin/node
2023-05-30T23:49:32.2949113Z ##[debug]agent.TempDirectory=/home/vsts/work/_temp
2023-05-30T23:49:32.2951264Z ##[debug]loading inputs and endpoints
<snip>
2023-05-30T23:49:32.3017099Z ##[debug]loaded 23
2023-05-30T23:49:32.3022354Z ##[debug]Agent.ProxyUrl=undefined
2023-05-30T23:49:32.3023980Z ##[debug]Agent.CAInfo=undefined
2023-05-30T23:49:32.3025548Z ##[debug]Agent.ClientCert=undefined
2023-05-30T23:49:32.3027191Z ##[debug]Agent.SkipCertValidation=undefined
2023-05-30T23:49:32.3294645Z ##[debug]Agent.Version=3.220.2
2023-05-30T23:49:32.3299012Z ##[debug]gh=xxx
2023-05-30T23:49:32.3301257Z ##[debug]xxx8 exists true
2023-05-30T23:49:32.3303592Z ##[debug]repo=bitwarden/server
2023-05-30T23:49:32.3305339Z ##[debug]workflow=Build
2023-05-30T23:49:32.3307495Z ##[debug]branch=undefined
2023-05-30T23:49:32.3309200Z ##[debug]artNameFilter=Notifications.zip
2023-05-30T23:49:32.3311413Z ##[debug]artNameFilterIsRegex=false
2023-05-30T23:49:32.5568532Z Found the workflow, #1915904/Build.
2023-05-30T23:49:33.7089047Z ##[error]The workflow Build has no successful runs.
2023-05-30T23:49:33.7097568Z ##[debug]Processed: ##vso[task.issue type=error;]The workflow Build has no successful runs.
2023-05-30T23:49:33.7273335Z ##[error]Exit code 1 returned from process: file name '/home/vsts/agents/3.220.2/externals/node16/bin/node', arguments '"/home/vsts/work/_tasks/DownloadArtifacrs_ec0d0d6c-a2f1-421a-ae3b-3870ac0e6b89/1.0.3/DownloadArtifacts.js"'.
2023-05-30T23:49:33.7306925Z ##[debug]Microsoft.VisualStudio.Services.Agent.Util.ProcessExitCodeException: Exit code 1 returned from process: file name '/home/vsts/agents/3.220.2/externals/node16/bin/node', arguments '"/home/vsts/work/_tasks/DownloadArtifacrs_ec0d0d6c-a2f1-421a-ae3b-3870ac0e6b89/1.0.3/DownloadArtifacts.js"'.
   at Microsoft.VisualStudio.Services.Agent.Util.ProcessInvoker.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, InputQueue`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, Boolean continueAfterCancelProcessTreeKillAttempt, CancellationToken cancellationToken) in /home/vsts/work/1/s/src/Agent.Sdk/ProcessInvoker.cs:line 381
   at Microsoft.VisualStudio.Services.Agent.ProcessInvokerWrapper.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, InputQueue`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, Boolean continueAfterCancelProcessTreeKillAttempt, CancellationToken cancellationToken) in /home/vsts/work/1/s/src/Microsoft.VisualStudio.Services.Agent/ProcessInvoker.cs:line 308
   at Microsoft.VisualStudio.Services.Agent.Worker.Handlers.DefaultStepHost.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Boolean inheritConsoleHandler, Boolean continueAfterCancelProcessTreeKillAttempt, CancellationToken cancellationToken) in /home/vsts/work/1/s/src/Agent.Worker/Handlers/StepHost.cs:line 76
   at Microsoft.VisualStudio.Services.Agent.Worker.Handlers.NodeHandler.RunAsync() in /home/vsts/work/1/s/src/Agent.Worker/Handlers/NodeHandler.cs:line 206
   at Microsoft.VisualStudio.Services.Agent.Worker.TaskRunner.RunAsync() in /home/vsts/work/1/s/src/Agent.Worker/TaskRunner.cs:line 407
   at Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken) in /home/vsts/work/1/s/src/Agent.Worker/StepsRunner.cs:line 236
2023-05-30T23:49:33.7313366Z ##[section]Finishing: DownloadArtifacrs

Runs: https://github.com/bitwarden/server/actions?query=branch%3Arc+is%3Asuccess+workflow%3ABuild

Related artifacts: https://github.com/bitwarden/server/actions/runs/5126476189#artifacts

          - task: DownloadArtifacrs@1
            inputs:
              gh: 'XXX'
              repo: 'bitwarden/server'
              workflow: 'Build'
              branch: 'rc'
              artNameFilter: 'Notifications.zip'

Note that the error above shows branch as "undefined".

sevaa commented 1 year ago

Branch name issue aside, it looks like the repo has many runs and they push the top run that the task is interested below the top page of the API results. I'll see what I can do about that, hold on.

sevaa commented 1 year ago

Published an update, task version 1.0.4. See if that helps.

sevaa commented 1 year ago

Is this still an issue?

alex8bitw commented 1 year ago

It's good now, thanks!