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

Bug: Workflow stuck at the Annotating resources step #267

Closed
1 task done
lucafaggianelli opened this issue Dec 6, 2022 · 14 comments
Closed
1 task done

Bug: Workflow stuck at the Annotating resources step #267

lucafaggianelli opened this issue Dec 6, 2022 · 14 comments
Labels
bug Something isn't working

Comments

@lucafaggianelli
Copy link

What happened?

The k8s-deploy action get stuck at the Annotating resources step:

image

Everything goes fine and the pods are correctly deployed, but the Github Actions job get stuck and I need it to cancel it manually or wait for it to timeout, resulting in a failed run.

I tried also to set the option annotate-namespace to false but nothing changes

Version

  • I am using the latest version

Runner

self-hosted

Relevant log output

Debug log of the annotating resources step:

Annotating resources
  ##[debug]Kubectl run with command: /opt/hostedtoolcache/kubectl/1.25.4/x64/kubectl get,pods,-o,json,--namespace,engie-dash
  ##[debug]Getting workflows for repo: gempy/engie-dash
  ##[debug]Re-evaluate condition on job cancellation for step: 'Deploy to Kubernetes'.
  Error: The operation was canceled.
  ##[debug]System.OperationCanceledException: The operation was canceled.
  ##[debug]   at System.Threading.CancellationToken.ThrowOperationCanceledException()
  ##[debug]   at GitHub.Runner.Sdk.ProcessInvoker.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Channel`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
  ##[debug]   at GitHub.Runner.Common.ProcessInvokerWrapper.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Channel`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
  ##[debug]   at GitHub.Runner.Worker.Handlers.DefaultStepHost.ExecuteAsync(IExecutionContext context, String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Boolean inheritConsoleHandler, String standardInInput, CancellationToken cancellationToken)
  ##[debug]   at GitHub.Runner.Worker.Handlers.NodeScriptActionHandler.RunAsync(ActionRunStage stage)
  ##[debug]   at GitHub.Runner.Worker.ActionRunner.RunAsync()
  ##[debug]   at GitHub.Runner.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)
  ##[debug]Finishing: Deploy to Kubernetes
@lucafaggianelli lucafaggianelli added the bug Something isn't working label Dec 6, 2022
@lucafaggianelli lucafaggianelli changed the title Bug: Bug: Workflow stuck at the Annotating resources step Dec 6, 2022
@jaiveerk
Copy link
Collaborator

jaiveerk commented Dec 6, 2022

Hey @lucafaggianelli,
Thanks for raising this issue! Sorry that this has been causing you trouble.

We believe this may be related to #264 which we've already created a fix for, and it will be part of our next release.

@jaiveerk jaiveerk closed this as completed Dec 6, 2022
@lucafaggianelli
Copy link
Author

cool, I'll try the next release thanks!

@jaiveerk
Copy link
Collaborator

jaiveerk commented Dec 6, 2022

Working on getting one out now! Will update as soon as it's out

@jaiveerk
Copy link
Collaborator

jaiveerk commented Dec 6, 2022

Release should be out with 4.8!

@lucafaggianelli
Copy link
Author

thanks for the release but sadly I have a new error (I'm on GH Enterprise):

image

@lucafaggianelli
Copy link
Author

@jaiveerk should I open another issue?

@jaiveerk
Copy link
Collaborator

jaiveerk commented Dec 7, 2022

Hm, that's interesting - not sure how something on our end could cause an error there. I wonder if an intermediate step is failing, would you mind running with debug logs?

Correct me if I'm wrong or misunderstanding, but the timeout message you posted above looks like the action timed out because our step was taking too long, but it looks like here the runner is failing to pull information from your workflows?

@lucafaggianelli
Copy link
Author

Yes because the timeout seems to belong to the Annotating resources group, the rest of the workflow is OK and I don't send any HTTP API request to read the workflow.

image

And this is the workflow code:

name: Deploy to Kubernetes
uses: Azure/k8s-deploy@v4.8
with:
   action: deploy
   namespace: ${{ env.K8S_NAMESPACE }}
   manifests: |
     .deployment/k8s-manifests/deploy.yml
   images: |
     ${{ env.DOCKER_REGISTRY }}/riskpnl/${{ env.NAME }}:${{ github.sha }}
   annotate-namespace: 'false'

@jaiveerk
Copy link
Collaborator

jaiveerk commented Dec 7, 2022

Has this action worked for you in the past? I wonder if the issue is stemming from restricted repo access.

@lucafaggianelli
Copy link
Author

as far as I tried this action, it never worked for me, v4.7 hanged forever at the Annotating resources step (this issue) and now this error. BTW if I remove the k8s-deploy action, the workflow passes

@jaiveerk
Copy link
Collaborator

jaiveerk commented Dec 8, 2022

We believe this may be due to an error with the runner's ability to access your repo due to the fact that you appear to be using a custom-hosted Github repo.

To resolve the issue for now, we've added an extra catch so that your action doesn't fail as a result of one single failed annotation attempt.

@lucafaggianelli
Copy link
Author

lucafaggianelli commented Dec 8, 2022 via email

@jaiveerk
Copy link
Collaborator

jaiveerk commented Dec 8, 2022

Sounds good! I'm waiting on PR approval from my team and we need to cut a new release, but I'll let you know when that's done!

@OliverMKing
Copy link
Collaborator

Reopening to track this until we release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants