action-rsyncer icon indicating copy to clipboard operation
action-rsyncer copied to clipboard

Example how to limit upload time if host is unavailable / not writable

Open marehr opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe ⚡️

We recently had the problem that one of our servers had wrong writing permissions.

https://github.com/seqan/seqan3/actions/runs/102633544

https://github.com/seqan/seqan3/runs/667513448?check_suite_focus=true#step:9:16

The build was killed after 6h by ci. Normally a CI-Job takes around 15 minutes that means that we wasted 24x the normal time of one job when a failure occurred.

Config:

      - name: Deploy User Documentation
        uses: Pendect/action-rsyncer@master
        env:
          DEPLOY_KEY: ${{ secrets.DEPLOY_HOST_SSH_KEY }}
          REMOTE_HOST: ${{ secrets.DEPLOY_HOST }}
          REMOTE_USER: ${{ secrets.REMOTE_USER }}
          TARGET: ${{ secrets.REMOTE_TARGET }}
        with:
          flags: '-avzr --delete'
          src: 'doc-build/doc_usr/html/'
          dest: '$REMOTE_USER@$REMOTE_HOST:$TARGET/3-master-user'

Describe the solution you'd like ✨

I would want that the upload fails earlier if I encounter some network or server issues. Since most people just copy-paste examples, I would suggest that this use-case should be included and how to avoid this.

Describe alternatives you've considered 🎡

Nothing yet, I also haven't looked into what flags for rsync should be used to limit upload retries to 1 and a time limit of 10s if unreachable / unwriteable.

Additional context 🖼

~~Add any other context or screenshots about the feature request here.~~

marehr avatar May 17 '20 13:05 marehr