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

Occasionally getting candidates is not iterable error #903

Open
2 of 5 tasks
jonathonlacher opened this issue Jul 1, 2024 · 6 comments
Open
2 of 5 tasks

Occasionally getting candidates is not iterable error #903

jonathonlacher opened this issue Jul 1, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@jonathonlacher
Copy link

Description:
I'm occasionally getting the following error when this Action is ran:

Run actions/setup-python@v5
Installed versions
  Version 3.12.3 was not found in the local cache
  Error: candidates is not iterable

image

Action version:
v5.1.0

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

3.12.3

Repro steps:
Repo is on GHES, so not able to link to it.

  1. I have a reusable workflow that is used by a number of other projects.
  2. The reusable workflow has a step that uses the setup-python action.
    ...
    runs:
      using: "composite"
      steps:
      - uses: actions/setup-python@v5
        with:
          python-version: '3.12.3'
  3. On occasion, I think starting with in the last day, I sometimes see the error. A re-run typically works successfully.

Not sure if the complexities of GHES are the cause, though I have seen some indications searching all of github.com that at least 1 other person has gotten this error before when using this action.

They potentially say it's related to rate limiting, though the error, at least to me, isn't clear enough to indicate that.

This also might be relevant: setup-python is one of the default bundled Actions with GHES, so my understanding is the that the runner should only be calling out to github.com for accessing the python-versions maniest and corresponding release.

Expected behavior:

Here is what I expect, for the Action to download the release tar.

image

Actual behavior:

The action fails to find the version available for downloading.

@jonathonlacher jonathonlacher added bug Something isn't working needs triage labels Jul 1, 2024
@jonathonlacher
Copy link
Author

At the very least, it seems the error message isn't clear enough to understand the actual issue.

@HarithaVattikuti
Copy link
Contributor

Hello @jonathonlacher
Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.

@mahabaleshwars
Copy link

Hello @jonathonlacher, Thank you once again for bringing this issue to our attention. We attempted to reproduce the problem but were unsuccessful. Upon further investigation, we identified the following potential causes for the failure:

  • Network Interruptions: Intermittent network issues might cause failures in downloading the specified Python version. These issues could be transient and may not occur during subsequent attempts.
  • GHES Complexities: Specific complexities or configurations related to GitHub Enterprise Server (GHES) might influence the action's behavior.
    It would be very helpful if we could obtain the detailed logs of the failed run or a link to a public repository that reproduces the problem . As we understand from your description, the issue is not consistent, and these logs would aid us in identifying the root cause more effectively.

@aparnajyothi-y
Copy link
Contributor

aparnajyothi-y commented Aug 13, 2024

Hello @jonathonlacher, we attempted to reproduce the issue on the GHES server but were unsuccessful even after more than 150 runs. Please review the above feedback, which likely identifies the cause of the issue. I have attached a screenshot for reference.
Screenshot 2024-08-07 at 12 04 14

@jonathonlacher
Copy link
Author

@aparnajyothi-y @mahabaleshwars do you have any suggestions on how to capture more logs or which logs would be helpful?

What specifically is throwing the error ( Error: candidates is not iterable)?

@HarithaVattikuti
Copy link
Contributor

Hello @jonathonlacher,
To capture more detailed logs in your GitHub Actions workflow, you can enable additional debugging by setting the following environment variables:

env:
  ACTIONS_RUNNER_DEBUG: true
  ACTIONS_STEP_DEBUG: true

To check the logs in the runner, follow these steps:

  1. Navigate to the Runner Directory: Go to the directory where the self-hosted runner is installed.
  2. Check the _diag Directory: Within the runner installation directory, locate the _diag directory. It contains diagnostic logs.

These settings will generate detailed logs to help diagnose issues. However, we currently cannot pinpoint the exact cause of the "Error: candidates is not iterable" message.

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

4 participants