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] Looking for __init__.py is failing #582

Closed
3 tasks done
giladlevy7 opened this issue Dec 15, 2022 · 12 comments
Closed
3 tasks done

[BUG] Looking for __init__.py is failing #582

giladlevy7 opened this issue Dec 15, 2022 · 12 comments
Labels
bug Something isn't working

Comments

@giladlevy7
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Does this issue exist in the latest version?

  • I'm using the latest release

Describe the bug?

I'm trying to use this GH workflow to verify whether a specific init.py file was modified or not.
I've tried to use regex, specific paths, and other options as well but it keeps failing with the following error:
image

Step content:
- name: Get changed files id: changed-files uses: tj-actions/changed-files@v34.6.1 with: files: | commons/__init__.py

To Reproduce

Add the following step:

      - name: Get changed files
        id: changed-files
        uses: tj-actions/changed-files@v34.6.1
        with:
          files: |
            commons/__init__.py

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-20.04

Expected behavior?

To succeed

Relevant log output

grep: : No such file or directory
  grep: : No such file or directory
  grep: : No such file or directory
  grep: : No such file or directory
  /home/runner/work/_actions/tj-actions/changed-files/v34.6.1/get-changed-paths.sh: line 91: echo: write error: Broken pipe

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@giladlevy7 giladlevy7 added the bug Something isn't working label Dec 15, 2022
@jackton1
Copy link
Member

@giladlevy7 Does the file exists in the repo ?

@giladlevy7
Copy link
Author

@jackton1 yes, it exist (but it should work even if it doesn't, right?)

@github-actions
Copy link

Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience.

@jackton1
Copy link
Member

@giladlevy7 Can you also include your configuration of the https://github.com/actions/checkout?

@giladlevy7
Copy link
Author

@jackton1 of course, thanks for helping.

     - uses: amannn/action-semantic-pull-request@v4
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      matrix:
        python-version: [ 3.10.0 ]
    runs-on: ubuntu-20.04

@jackton1
Copy link
Member

jackton1 commented Dec 16, 2022

@giladlevy7 Can you upgrade actions/checkout@v2 to v3

@jackton1
Copy link
Member

@giladlevy7 Closing this issue, for now, since a new version has been released. Let me know if the issue persists and I can reopen the issue. I also recommend that you enable debugging and post the entire log output i.e including the checkout and the changed files actions steps

@giladlevy7
Copy link
Author

@jackton1
I would still appreciate your assistance
this is what I'm using now:

    runs-on: ubuntu-20.04
    timeout-minutes: 30
    if: ${{ github.event_name == 'workflow_dispatch' || github.event.pull_request.base.ref == 'main' }}
    strategy:
      fail-fast: true
      matrix:
        python-version: [ 3.10.0 ]

    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v3
        with:
          python-version: ${{ matrix.python-version }}
        # First, we verify that init file was changed
      - name: Get changed files
        id: changed-files
        uses: tj-actions/changed-files@v34.6.1
        with:
          files: |
            __init__.py

and unfortunately it still fails:

  Resolving repository path: /home/runner/work/rivery_commons/rivery_commons/.
  Retrieving changes between 3b5505aff40fd730ffaa9df6f346de0c591ff9ba (main) → 6db88282523513365b8f565651a6ae2e7253c41f (fix/gilad/linter-issue)
  grep: : No such file or directory
  grep: : No such file or directory
  grep: : No such file or directory
  grep: : No such file or directory
  /home/runner/work/_actions/tj-actions/changed-files/v34.6.1/get-changed-paths.sh: line 91: echo: write error: Broken pipe

is it working for you with finding init.py file?

i don't think it's the code checkout since if I'm looking for another file - it works, or without any filter - also works
failing only on init

@giladlevy7
Copy link
Author

hi @jackton1 !

can we reopen that?
were you able to use the "files" filter for init.py file?

@jackton1 jackton1 linked a pull request Dec 18, 2022 that will close this issue
@jackton1
Copy link
Member

@giladlevy7 See the link PR

Screenshot 2022-12-17 at 10 02 41 PM

@jackton1 jackton1 transferred this issue from tj-actions/changed-files Dec 18, 2022
@github-actions
Copy link

Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience.

@giladlevy7
Copy link
Author

@jackton1 thanks!

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

Successfully merging a pull request may close this issue.

2 participants