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

Error: "Not Found" when pushing a new branch #10

Open
rickifunk opened this issue Aug 13, 2020 · 11 comments
Open

Error: "Not Found" when pushing a new branch #10

rickifunk opened this issue Aug 13, 2020 · 11 comments

Comments

@rickifunk
Copy link

When i branch off from master, edit something and push the commit with the branch to remote, the action fails with:

Run jitterbit/get-changed-files@v1
Base commit: 0000000000000000000000000000000000000000
Head commit: 2c782e73f6c1676f7ae88c551f5a80f61216a68c
##[error]Not Found

However if i then push something on that branch afterwards, it works.

Tbf, it might just be me, not understanding exactly how github and branching works, but would love some guidance on whether or not i can get it to run on the very first push.

@bates64
Copy link

bates64 commented Aug 18, 2020

https://github.com/trilom/file-changes-action appears to have the same issue

@bates64
Copy link

bates64 commented Aug 18, 2020

Duplicate of #7

@StephanBijzitter
Copy link

I just got the same:

2020-11-27T16:05:27.8751688Z Download action repository 'jitterbit/get-changed-files@v1'
2020-11-27T16:05:30.2770644Z ##[group]Run jitterbit/get-changed-files@v1
2020-11-27T16:05:30.2771401Z with:
2020-11-27T16:05:30.2772388Z   token: ***
2020-11-27T16:05:30.2772939Z   format: space-delimited
2020-11-27T16:05:30.2773460Z ##[endgroup]
2020-11-27T16:05:30.9512274Z Base commit: d183460a254d5a6dd7e0ae065f30468dd80ae114
2020-11-27T16:05:30.9513311Z Head commit: 225a3b33a84926736a04acecffd762ca761a5052
2020-11-27T16:05:30.9517423Z ##[error]Not Found

Both of these commits are present, however. Next to that, I can restart the workflow, push new commits or do anything else... nothing seems to work. It just started happening a few minutes ago.

Turns out, https://www.githubstatus.com/ shows that Github Actions having issues. So I'd say it's quite likely that @nanaian had the same bad luck. Nothing you can do but wait 👍

@bates64
Copy link

bates64 commented Nov 27, 2020

Turns out, https://www.githubstatus.com/ shows that Github Actions having issues. So I'd say it's quite likely that @nanaian had the same bad luck. Nothing you can do but wait 👍

@StephanBijzitter no, I've repeatedly had this issue for a while. It's a bug in get-changed-files.

@chris-hinds
Copy link

Im getting the exact same error, seems to be on first commit.

@kevthehermit
Copy link

I am also seeing this on the first commit

##[debug]Evaluating condition for step: 'Modified Files'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Modified Files
##[debug]Loading inputs
##[debug]Evaluating: github.token
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'token'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Run jitterbit/get-changed-files@v1
  with:
    format: json
    token: ***
##[debug]Payload keys: after,base_ref,before,commits,compare,created,deleted,forced,head_commit,organization,pusher,ref,repository,sender
Base commit: 0000000000000000000000000000000000000000
Head commit: c3a16591c471f62eb50053fbd6ee493211e09183
Error: Not Found
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Modified Files

every additional commit works fine

@z0ph
Copy link

z0ph commented Mar 30, 2021

Same error here with commitid: 0000000000000000000000000000000000000000

@compmodder26
Copy link

I get the same as well:

Run jitterbit/get-changed-files@v1
Base commit: 0000000000000000000000000000000000000000
Head commit: 54c32e2b81e8974fdf448eb6d7ba127a737d234a
Error: Not Found

@ybensoussan
Copy link

Run jitterbit/get-changed-files@v1
Base commit: 0000000000000000000000000000000000000000
Head commit: 62a5dce8086db6f4bf5332096103da166787751e

Same issue for me on pushing a new branch

@wlnt360
Copy link

wlnt360 commented Oct 28, 2021

I get the same issues as well on new branch

@Jolg42
Copy link

Jolg42 commented Jan 13, 2022

I also got into this and was so confused because it was working on one project but not another one and I found out how to handle it:

It seems the source code is here https://github.com/jitterbit/get-changed-files/blob/master/src/main.ts#L28-L36
The code handles 2 different events from GitHub Actions push & pull_request.

  • When creating a new branch for a PR, push will be triggered immediately before the PR gets created
  • The GitHub API / GitHub context base commit is then 0000000000000000000000000000000000000000
  • The get-changed-files action needs to have a non 0/empty base commit to be able to diff
  • Defining both push (and specify the branches) and pull_request solves the problem
    Example
on:
  push:
    branches:
      # Push events our default branch
      - main
      # Push events to branches matching refs/heads/renovate/...
      - 'renovate/**'
  pull_request:
    paths-ignore:
      - '*.md'
      - 'renovate.json'

It makes sense to me as a new branch does not have a base / reference where it's from, it's "floating" around, it's when creating the PR that the base branch is selected.

A solution could be to always diff on the default branch, another could be to document this ⬆️

Originally posted by @Jolg42 in Ana06#12 (comment)

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

No branches or pull requests

10 participants