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

Problem with cache hit permissions (macOS, Linux?) #1087

Open
1 of 2 tasks
AlexWayfer opened this issue Oct 21, 2022 · 6 comments
Open
1 of 2 tasks

Problem with cache hit permissions (macOS, Linux?) #1087

AlexWayfer opened this issue Oct 21, 2022 · 6 comments
Assignees
Labels

Comments

@AlexWayfer
Copy link
Contributor

Expected Behavior

Restored from CI cache executable has correct permissions.

After cache reset: https://cirrus-ci.com/build/5438662258196480

Real Behavior

codecov/uploader
/var/folders/xx/vl5f934s6k927z1vyyl9cxth0000gn/T/scripts5fb90badb37c5821b6d95526a41a9504.sh: line 5: codecov/uploader: cannot execute binary file
Exit status: 126

https://cirrus-ci.com/task/6095845136269312?logs=codecov#L0

Related Info

This is a (tick one of the following):

  • Website issue
    • Link to page:
  • Task issue
    • OS: macOS
    • Task name: Test on darwin
    • Script/cache name (if applies): codecov_cache

Configuration

env:
  CODECOV_OS: macos

codecov_uploader_cache:
  folder: codecov
  fingerprint_script:
    - curl -Os https://uploader.codecov.io/latest/${CODECOV_OS}/codecov.SHA256SUM
  populate_script:
    - mkdir -p codecov
    - curl -s https://uploader.codecov.io/latest/${CODECOV_OS}/codecov -o codecov/uploader
    - chmod +x codecov/uploader

codecov_script: codecov/uploader
@AlexWayfer
Copy link
Contributor Author

AlexWayfer commented Oct 21, 2022

@AlexWayfer AlexWayfer changed the title Cache hit macOS permissions Problem with cache hit permissions (macOS, Linux?) Oct 21, 2022
@edigaryev
Copy link
Contributor

Unfortunately, I wasn't able to reproduce your example: https://cirrus-ci.com/task/5442098164924416.

Here's a full .cirrus.yml:

env:
  CODECOV_OS: macos

task:
  macos_instance:
    image: monterey-base

  codecov_uploader_cache:
    folder: codecov
    fingerprint_script:
      - curl -Os https://uploader.codecov.io/latest/${CODECOV_OS}/codecov.SHA256SUM
    populate_script:
      - mkdir -p codecov
      - curl -s https://uploader.codecov.io/latest/${CODECOV_OS}/codecov -o codecov/uploader
      - chmod +x codecov/uploader

  codecov_script: codecov/uploader

Or I am missing something here?

@AlexWayfer
Copy link
Contributor Author

Or I am missing something here?

I don't see any valuable difference.

The project is open, you can see current complete configuration here: https://github.com/filewatcher/filewatcher/blob/0ad47c5/.cirrus.yaml

I've cleared cache today and PR had successful runs: https://cirrus-ci.com/task/6080908112429056

After merge there is the same problem: https://cirrus-ci.com/task/4662261959622656

@fkorotkov fkorotkov self-assigned this Oct 24, 2022
@edigaryev
Copy link
Contributor

Have you tried clearing caches on master/main? It seems that you're using a custom cache fingerprint, which may result in re-using of an older cache entry (if any) without chmod +x instruction.

@AlexWayfer
Copy link
Contributor Author

Have you tried clearing caches on master/main? It seems that you're using a custom cache fingerprint, which may result in re-using of an older cache entry (if any) without chmod +x instruction.

  1. The checkbox is "Clean all repository caches", not "branch caches".
  2. From the issue description: https://cirrus-ci.com/build/5438662258196480
    It's in main branch, as you can see. Successful after cleaning. And failing again.

@AlexWayfer
Copy link
Contributor Author

I don't think this is related, but I saw that Cirrus CI is moving from Intel to M1 instances, and Codecov (the problematic executable) doesn't support it yet: codecov/uploader#523 (comment)

So, theoretically this issue will be non-relevant sometimes.

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

No branches or pull requests

3 participants