cross-platform-actions / action

Cross-platform GitHub action
MIT License
128 stars 19 forks source link

Temporary fix for failing to sync files #51

Open albinahlback opened 1 year ago

albinahlback commented 1 year ago

I have a problem where, occasionally, the runner cannot sync the files before exiting the emulator. The job seems to work fine, it is just this issue.

As a temporary fix (as I know that this is already reported as an issue in #29), I would like to indicate to the runner that some steps was completed, and that a timeout and error is fine. I did this by setting

  my-freebsd-job:
    name: FreeBSD
    runs-on: macos-latest
    steps:
      - uses: cross-platform-actions/action@v0.10.0
        timeout-minutes: 25
        continue-on-error: true
        # Create some files if successful
      - name: "next step"
        # Check if the files exist

However, if it did time out, the runner will not find the files, regardless of whether it was successful or not. I have also tried to set output variables via echo "myvar=true" >> $GITHUB_OUTPUT, but that should also save the variables to a file, so it should also not work.

Perhaps cross-platform-actions/action works inside another directory? Perhaps these files exists, just that they are in another directory? If so, what is its path?

jacob-carlborg commented 1 year ago

Hmm, I looked at https://github.com/flintlib/flint2/actions/runs/4497220469/jobs/7912619166?pr=1307. It seems like it timed out while syncing the files from the VM to the runner. I'm guessing the files were never synced.

Perhaps cross-platform-actions/action works inside another directory? Perhaps these files exists, just that they are in another directory? If so, what is its path?

No, it uses the default working directory for the runner.

albinahlback commented 1 year ago

Yeah, happens quite often. So if the job is aborted, will it still remove files? Or where do the files go to? Anyway, feel free to close.

jacob-carlborg commented 1 year ago

So if the job is aborted, will it still remove files? Or where do the files go to?

There is no live syncing of files. Files are synced once in the beginning from the runner to the VM when the VM is ready. Then, when the command is complete, files are synced once from the VM to the runner. If the last sync is not completed before the job terminates, then there might be missing files.

kobalicek commented 10 months ago

BTW I'm playing with sync_files: runner-to-vm and this didn't fix any issues for me. I still have shutdown failures unfortunately.