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

It stopped to work #8

Closed
Leksat opened this issue Apr 14, 2022 · 14 comments
Closed

It stopped to work #8

Leksat opened this issue Apr 14, 2022 · 14 comments

Comments

@Leksat
Copy link

Leksat commented Apr 14, 2022

Got error message today:

In PackageDiff.php line 135:

  Could not open file ad66625dce6fd04da4b628f870a7230cce53fd10:apps/silverbac  
  k-drupal/composer.lock or find it in git as ad66625dce6fd04da4b628f870a7230  
  cce53fd10:apps/silverback-drupal/composer.lock 

I tried to debug it by adding a new job step:

git show ad66625dce6fd04da4b628f870a7230cce53fd10:apps/silverback-drupal/composer.lock

This one worked without any issues.

Debugging here: AmazeeLabs/silverback-mono#1021

@Leksat
Copy link
Author

Leksat commented Apr 14, 2022

Hmm, when I run the same code as in \IonBazan\ComposerDiff\PackageDiff::getFileContents, it works just fine.

Could it be that the action needs some kind of a GitHub permission to read from the git history?

@adam-delaney
Copy link

I am experiencing the same issue. I've checked the workflow permissions on the repo I'm running the action on and it appears to have read permission to the repo.

@IonBazan
Copy link
Owner

Thanks for the reporting! I will have a closer look at this after Easter.
My first guess would be that it's related to actions/checkout v3 - I am still using v2 in my projects and it worked last time. @Leksat can you help to check if reverting to v2 helps?

@weitzman
Copy link

Affecting me too. I'm pinned to actions/checkout@v2 and it isn't helping. Debug run at https://github.com/massgov/openmass/runs/6047519645?check_suite_focus=true

@Leksat
Copy link
Author

Leksat commented Apr 17, 2022

Confirming. Downgrading actions/checkout tov2 does not help.

@oradwell
Copy link

oradwell commented Apr 20, 2022

we're also having this issue :/ on actions/checkout v2

@Leksat
Copy link
Author

Leksat commented Apr 20, 2022

@IonBazan could you add git show output and exit code to the exception here?

It could give us some hint.

@IonBazan
Copy link
Owner

@Leksat @oradwell I found that it's caused by actions/checkout#760 - I will be fixing it now here.

@IonBazan
Copy link
Owner

IonBazan commented Apr 20, 2022

The issue should be now fixed. Please help to verify, @Leksat @oradwell @adam-delaney @weitzman. Here is one of successful runs after the fix: IonBazan/composer-diff-example#1

I have also released v1.6.1 of Composer-Diff which improves git command logging and fixes some minor compatibility problems.

Please note that it only works for repositories referenced in $GITHUB_WORKSPACE - any other repo would require adding git config --global --add safe.directory <path> to the workflow but at least the error will show some more details on how to fix this problem from now.

@Leksat
Copy link
Author

Leksat commented Apr 21, 2022

The error is gone 🎉 Thank you!

Now there is a new little issue. When there are no composer changes, the action output is not empty, but is set to the following:
::set-output name=composer_diff_exit_code::0
Screen Shot 2022-04-21 at 08 36 00

@IonBazan
Copy link
Owner

I believe f4eb9f4 should fix that - please try to use IonBazan/composer-diff-action@master to see if that works.

@Leksat
Copy link
Author

Leksat commented Apr 21, 2022

@IonBazan it works like a charm on master branch 🎉

@IonBazan
Copy link
Owner

@Leksat great! Closing this issue then 🚀

@oradwell
Copy link

thanks both. I can confirm it works flawlessly

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

5 participants