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

Ansible Lint Github Action ansible-lint-requirements.txt\n or **/pyproject.toml not found #4341

Closed
willbrownecs opened this issue Sep 19, 2024 · 10 comments · Fixed by #4342
Closed
Assignees
Labels

Comments

@willbrownecs
Copy link

Summary

Ansible-lint action errors out with No file in /home/runner/work/<redacted>/<redacted> matched to [/home/runner/work/<redacted>/<redacted>/.git/ansible-lint-requirements.txt\n or **/pyproject.toml], make sure you have checked out the target repository

Issue Type
  • Bug Report
OS / ENVIRONMENT
ubuntu-latest
  • ansible installation method: github action
  • ansible-lint installation method: github action
STEPS TO REPRODUCE
---
# .github/workflows/ansible-lint.yml
# https://github.com/marketplace/actions/run-ansible-lint
name: ansible-lint
on:
  pull_request:
    branches: [main, stable, release/v*]
jobs:
  build:
    name: Ansible Lint # Naming the build is important to use it as a status check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run ansible-lint
        uses: ansible/ansible-lint@main # or version tag instead of 'main'

specifically at time of issue the current commit hash of latest/main is 4e3058f

Desired Behavior

ansible-lint executes properly

Possible security bugs should be reported via email to [email protected]

Actual Behavior

Please give some details of what is happening. Include a minimum complete
verifiable example
with:

github action fails to execute with the following error: No file in /home/runner/work/<redacted>/<redacted> matched to [/home/runner/work/<redacted>/<redacted>/.git/ansible-lint-requirements.txt\n or **/pyproject.toml], make sure you have checked out the target repository

Reverting the uses block from uses: ansible/ansible-lint@main to uses: ansible/ansible-lint@571711ffc3036d6893213fbe23d68f9d73b983ce resolves the issue. This commit (at time of writing) is one commit behind main/latest.

@willbrownecs willbrownecs added bug new Triage required labels Sep 19, 2024
@willbrownecs
Copy link
Author

apologies for any poor formatting or incorrect practices, this is my first bug report and I am just trying to help!

@sdodsley
Copy link

I'm seeing this as well. Only started happening in the last few hours

@shaunmcevoy
Copy link

Causing issues here as well. Thanks for workaround @willbrownecs

@ssbarnea
Copy link
Member

ssbarnea commented Sep 19, 2024

I do not see any links to a repository with this failure so I am unable to reproduce/debug this failure.

At minimum some console logs are needed for the action steps, so we can identify what part of the updated action broke it.

@ssbarnea ssbarnea self-assigned this Sep 19, 2024
@willbrownecs
Copy link
Author

I do not see any links to a repository with this failure so I am unable to reproduce/debug this failure.

I am unfortunately unable to link to my repository as it is internal. Maybe one of the other kind folks with the same issue can?

@ssbarnea
Copy link
Member

I do not see any links to a repository with this failure so I am unable to reproduce/debug this failure.

I am unfortunately unable to link to my repository as it is internal. Maybe one of the other kind folks with the same issue can?

At least try to debug it by looking at the logs. It does not do so many things so it should be easy to spot the root cause.

@sdodsley
Copy link

https://github.com/Pure-Storage-Ansible/FlashArray-Collection/actions/runs/10944918604/job/30389000669

ssbarnea added a commit that referenced this issue Sep 19, 2024
@ssbarnea
Copy link
Member

@sdodsley Thanks! #4342 should fix it. What I do not understand is why the test suite passed, that is a real dillema.

@ssbarnea
Copy link
Member

I just merged the fix, I need confirmation from someone using @main that current code is working fine, so I can also tag a new release.

@ssbarnea ssbarnea removed the new Triage required label Sep 19, 2024
@sdodsley
Copy link

Confirmed the fix is good - working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants