gcs-cache-action icon indicating copy to clipboard operation
gcs-cache-action copied to clipboard

Fails by simply dumping the script

Open gajus opened this issue 3 years ago • 11 comments

Here is how we have it setup:

- uses: actions/setup-node@v2
  with:
    node-version: '16'
- name: Cache node_modules
  id: node-modules-cache
  uses: mansagroup/[email protected]
  with:
    bucket: github-action-runner-cache
    path: node_modules
    key: node_modules-${{ hashFiles('**/yarn.lock') }}
    restore-keys: node_modules-${{ hashFiles('**/yarn.lock') }}

Here is how it fails:

Screen Shot 2022-03-08 at 7 30 55 PM

gajus avatar Mar 09 '22 01:03 gajus

Installing zstd took it a step further.

Screen Shot 2022-03-08 at 7 46 34 PM

gajus avatar Mar 09 '22 01:03 gajus

I think this time it is a permission issue. Whatever the issue, the real issue is that gcs-cache-action is not surfacing these errors.

gajus avatar Mar 09 '22 01:03 gajus

I had it working for a while, but then it started failing with the same dump of script, and I have no clue how to debug it. @BasileNouvellet any chance there is a quick fix for error reporting?

gajus avatar Mar 09 '22 19:03 gajus

I am not familiar with GitHub actions SDK, but it looks like all we are missing is some sort of try..catch here:

https://github.com/MansaGroup/gcs-cache-action/blob/main/src/post.ts#L47

gajus avatar Mar 09 '22 19:03 gajus

I will take a look tomorrow to add some error checking, sorry about that!

jeremylvln avatar Mar 09 '22 21:03 jeremylvln

I will take a look tomorrow to add some error checking, sorry about that!

Thanks a lot for publishing this action. Saved a ton of time!

gajus avatar Mar 09 '22 21:03 gajus

Hi @gajus, I've pushed on main some error checking. Let me know what do you think. If it's okay for you I'll publish a new release :)

jeremylvln avatar Mar 10 '22 17:03 jeremylvln

@IamBlueSlime Could you please publish this under 1.0.3 tag?

gajus avatar Mar 14 '22 18:03 gajus

@gajus Did you test the main branch? To not publish a version which does not work :)

jeremylvln avatar Mar 14 '22 18:03 jeremylvln

I cannot. Our CI agents are configured not to allow untagged actions. It has to have a version tag in semver form and a hash.

I can try to replicate it on a public repository if that helps, though that won't be an accurate test.

gajus avatar Mar 14 '22 18:03 gajus

I cannot. Our CI agents are configured not to allow untagged actions. It has to have a version tag in semver form and a hash.

I can try to replicate it on a public repository if that helps, though that won't be an accurate test.

Fair enough, I will publish a pre-release ASAP, if it still blocked I will publish a real one

jeremylvln avatar Mar 14 '22 18:03 jeremylvln