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] fatal: Invalid revision range X..Y when dealing with submodules #978

Closed
3 tasks done
SkyLeite opened this issue Feb 12, 2023 · 3 comments · Fixed by #980
Closed
3 tasks done

[BUG] fatal: Invalid revision range X..Y when dealing with submodules #978

SkyLeite opened this issue Feb 12, 2023 · 3 comments · Fixed by #980
Labels
bug Something isn't working

Comments

@SkyLeite
Copy link

SkyLeite commented Feb 12, 2023

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?

For some reason this action is failing to diff submodules in our repository all of a sudden. I did some digging and couldn't figure out why, but it seems to be happening in get_changed_paths.sh:117.

For our use case we don't need to find changes inside submodules, only if they changed at all. I considered submitting a pull request that disables this functionality, but in get_changed_paths.sh:123 we explicitly tell git diff to ignore submodules so my solution wouldn't work.

You can see it happening here: https://github.com/SteamDeckHomebrew/decky-plugin-database/actions/runs/4153759470/jobs/7185636116#step:3:915

To Reproduce

  1. Check out https://github.com/SteamDeckHomebrew/decky-plugin-database
  2. Add the following environment variables to get-changed-paths.sh (as seen in https://github.com/SteamDeckHomebrew/decky-plugin-database/actions/runs/4153759470/jobs/7185636116#step:3:886)
GITHUB_WORKSPACE="/my/path/to/decky-plugin-database"
GITHUB_EVENT_PULL_REQUEST_BASE_REF="main"
GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FORK="true"
INPUT_FILES_PATTERN_FILE="/tmp/3e729ad0-ee5f-4912-a405-0e58ad18e5b6.txt"
INPUT_SEPARATOR=","
INPUT_PATH="."
INPUT_PREVIOUS_SHA="fd5726dac06f9b5da67045f57f512dc2bd5e4b90"
INPUT_CURRENT_SHA="4d246b71faba638ddb8f7c5a1df2c31f8e2de96e"
INPUT_TARGET_BRANCH="main"
INPUT_CURRENT_BRANCH="main"
INPUT_DIFF=".."
INPUT_QUOTEPATH="true"
INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES="false"
INPUT_OLD_NEW_SEPARATOR=","
INPUT_OLD_NEW_FILES_SEPARATOR=" "
INPUT_DIFF_RELATIVE=""
INPUT_DIR_NAMES="false"
INPUT_DIR_NAMES_MAX_DEPTH=""
INPUT_DIR_NAMES_EXCLUDE_ROOT="false"
INPUT_JSON="false"
INPUT_HAS_CUSTOM_PATTERNS="true"
INPUT_JSON_RAW_FORMAT="false"
  1. Run get-changed-paths.sh

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-20.04

Expected behavior?

A change would be detected in plugins/PowerTools, as seen in git diff --name-only --submodule=diff fd5726dac06f9b5da67045f57f512dc2bd5e4b90 4d246b71faba638ddb8f7c5a1df2c31f8e2de96.

Relevant log output

  Resolving repository path: /home/runner/work/decky-plugin-database/decky-plugin-database/.
  Retrieving changes between fd5726dac06f9b5da67045f57f512dc2bd5e4b90 (main) → 4d246b71faba638ddb8f7c5a1df2c31f8e2de96e (main)
  fatal: Invalid revision range 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db
  fatal: Invalid revision range 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db
  fatal: Invalid revision range 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db
  fatal: Invalid revision range 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db
  fatal: Invalid revision range 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db
  fatal: Invalid revision range 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db
  fatal: Invalid revision range 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db
  fatal: Invalid revision range 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db
  fatal: Invalid revision range 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db
  fatal: Invalid revision range 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db
  fatal: Invalid revision range 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db
  fatal: Invalid revision range 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db
  ##[debug]Non Matching changed files: plugins/PowerTools/::error::Failed to get changed files between: 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db
  fatal: Invalid revision range 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db
  ##[debug]Non Matching modified files: plugins/PowerTools/::error::Failed to get changed files between: 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db
  fatal: Invalid revision range 642dce4a2720919ad7eb9f450179ad5db6314106..33d3ca742c39a85249b93fd56258e0997d2371db

Anything else?

logs_984.zip

https://github.com/SteamDeckHomebrew/decky-plugin-database/actions/runs/4153759470/jobs/7185636116

Code of Conduct

  • I agree to follow this project's Code of Conduct
@SkyLeite SkyLeite added the bug Something isn't working label Feb 12, 2023
@github-actions
Copy link
Contributor

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

@TrainDoctor
Copy link

TrainDoctor commented Feb 16, 2023

While #980 was intended to fix the issue, the same core issue of "fatal bad object ..." occuring despite submodules being properly checked out and initialized via actions/checkout@8230315d06ad95c617244d2f265d237a1682d445.
https://github.com/SteamDeckHomebrew/decky-plugin-database/actions/runs/4195497950/jobs/7275128432
https://github.com/SteamDeckHomebrew/decky-plugin-database/actions/runs/4149078986/jobs/7184851825

Edit: Updating version of checkout used to v3.3.0 did not make any change in the outcome, as seen here: https://github.com/TrainDoctor/decky-plugin-database/actions/runs/4197952091/jobs/7280944628#step:3:118

@jackton1
Copy link
Member

@TrainDoctor This has been resolved in the latest release with a similar test conducted here https://github.com/tj-actions/changed-files/actions/runs/4296676573/jobs/7488697572 let me know if the error still persists and I'll reopen this issue.

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.

3 participants