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

The deployment occasionally silently fails #64

Closed
nietaki opened this issue Apr 25, 2023 · 19 comments
Closed

The deployment occasionally silently fails #64

nietaki opened this issue Apr 25, 2023 · 19 comments
Assignees
Labels
bug Something isn't working verified This issue was already verified

Comments

@nietaki
Copy link

nietaki commented Apr 25, 2023

It's happened a couple of times for me already: the jeffreytse/jekyll-deploy-action@v0.4.0 action runs and it gets marked as successful, but doesn't push the built site to the deployment branch.

Looking at the job logs I see the following:

Deploying to nietaki/nietaki.github.io on branch gh-pages
Deploying to ***github.com/nietaki/nietaki.github.io.git
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /github/workspace/build/.git/
[master (root-commit) b482d39] jekyll build from Action c9750a65641e00149d94784206bb9204a98320d1
 158 files changed, 34502 insertions(+)
 create mode 100644 .nojekyll
 (... many lines here cut"
 create mode 100644 til/index.html
error: RPC failed; curl 55 Send failure: Connection reset by peer
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date

It doesn't happen consistently, but only every once in a while, but makes me unable to trust my CI.

I'm not sure what the error...

error: RPC failed; curl 55 Send failure: Connection reset by peer
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly

...refers to specifically, but regardless, I don't think it should be failing silently.

My workflow is pretty standard, with barely anything modified from the defaults:

name: Build and Deploy to Github Pages

on:
  push:
    branches:
      - master
  schedule:
    - cron: '30 5 * * *'

jobs:
  build_and_deploy:
    # permissions: write-all
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      # Use GitHub Actions' cache to cache dependencies on servers
      - uses: actions/cache@v3
        with:
          path: vendor/bundle
          key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
          restore-keys: |
            ${{ runner.os }}-gems-

      # Use GitHub Deploy Action to build and deploy to Github
      - uses: jeffreytse/jekyll-deploy-action@v0.4.0
        with:
          provider: 'github'
          token: ${{ secrets.GITHUB_TOKEN }} # It's your Personal Access Token(PAT)
          repository: ''             # Default is current repository
          branch: 'gh-pages'         # Default is gh-pages for github provider
          jekyll_src: './'           # Default is root directory
          jekyll_cfg: '_config.yml'  # Default is _config.yml
          jekyll_baseurl: ''         # Default is according to _config.yml
          bundler_ver: '>=0'         # Default is latest bundler version
          cname: 'nietaki.com'                  # Default is to not use a cname
          actor: ''                  # Default is the GITHUB_ACTOR
          pre_build_commands: ''     # Installing additional dependencies (Arch Linux)

Let me know if there are any other details I should provide

@jeffreytse
Copy link
Owner

Hi @nietaki Could you provide the repo address? So that I can have a further check. : )

@nietaki
Copy link
Author

nietaki commented Apr 26, 2023

The repo is https://github.com/nietaki/nietaki.github.io - I made it private recently, so I'll add you as a collaborator.

I was looking through the build history to find a run with this problem, but I think I re-ran the builds that had this problem and there doesn't seem to be any evidence left over, sorry about that. I'll keep an eye out for when it happens again.

@jtmullen
Copy link

having the same issue, except got the same result when I re-ran the job. Latest run can be viewed here; https://github.com/jtmullen/fsgp-2023-results/actions/runs/5021239571/jobs/9003481203

I'll try to investigate some more tomorrow.

@jtmullen
Copy link

I see that this may be an issue external to this action: https://github.com/orgs/community/discussions/55820

Of course it would still be better that the action fail in this scenario.

@malachi-constant
Copy link

I was able to resolve this for my use case by forking the action and adding git configuration to increase the http post buffer size. An optional argument for post buffer size would be a nice improvement.

pgpbpadilla added a commit to pgpbpadilla/pgpbpadilla.github.io that referenced this issue May 19, 2023
Based on this issue:
jeffreytse/jekyll-deploy-action#64

The original poster was able to fix the error by applying the git
config to allow bigger payloads; this was done by forking the original
github action, so that's what I'm doing here too
@longavailable
Copy link

Having the same issue. The jekell repo is longavailable/longavailable.github.io.

@jeffreytse jeffreytse self-assigned this May 22, 2023
@jeffreytse jeffreytse added bug Something isn't working verified This issue was already verified labels May 22, 2023
jeffreytse added a commit that referenced this issue May 22, 2023
When pushing a large amount of data (initial push of a big
repository, change with very big file(s)) may require a higher
http.postBuffer setting on your git client (not the server).

Refer: https://mirrors.edge.kernel.org/pub/software/scm/git/docs/git-config.html
@jeffreytse
Copy link
Owner

jeffreytse commented May 22, 2023

Hi @nietaki, @longavailable, @jtmullen

Thanks for your reporting. Now the issue should be fixed. Please update to the latest version jeffreytse/jekyll-deploy-action@master and try again. : )

Thanks & Regards

@jeffreytse
Copy link
Owner

jeffreytse commented May 22, 2023

I was able to resolve this for my use case by forking the action and adding git configuration to increase the http post buffer size. An optional argument for post buffer size would be a nice improvement.

For the alternative solution, you can use pre_build_commands option as below:

pre_build_commands: git config --global http.version HTTP/1.1; git config --global http.postBuffer 524288000;

@pgpbpadilla
Copy link

pgpbpadilla commented May 22, 2023

I was able to resolve this for my use case by forking the action and adding git configuration to increase the http post buffer size. An optional argument for post buffer size would be a nice improvement.

For the alternative solution, you can use pre_build_commands option as below:

pre_build_commands: git config --global http.version HTTP/1.1; git config --global http.postBuffer 524288000;

I just tried the version using pre_build_commands 1 but still got

error: RPC failed; curl 55 Send failure: Connection reset by peer
send-pack: unexpected disconnect while reading sideband packet

I then reverted the change and it also failed with the same error2. I don't know what to think anymore 😢 l

It's also quite strange that the script fails but the action reports success 🤔

For reference:

Footnotes

  1. https://github.com/pgpbpadilla/pgpbpadilla.github.io/actions/runs/5048708346/jobs/9057225440#step:5:596

  2. https://github.com/pgpbpadilla/pgpbpadilla.github.io/actions/runs/5048832642/jobs/9057510337#step:5:594

@MDesplats
Copy link

Hi @nietaki, @longavailable, @jtmullen

Thanks for your reporting. Now the issue should be fixed. Please update to the latest version jeffreytse/jekyll-deploy-action@master and try again. : )

Thanks & Regards

Switching to master fixed the issue for me! Thanks!

@jeffreytse
Copy link
Owner

Hi @pgpbpadilla, could you try to use action jeffreytse/jekyll-deploy-action@master again?

@zhizhang77
Copy link

I've tried jeffreytse/jekyll-deploy-action@master but the issue still exists.

For reference:
https://github.com/zhizhang77/zhizhang77.github.io/actions/runs/5047908336/jobs/9055409011

@pgpbpadilla
Copy link

Hi @pgpbpadilla, could you try to use action jeffreytse/jekyll-deploy-action@master again?

I did try to use your master branch, plus pre-build options and that failed. Please see the first link in my previous comment.

@jeffreytse
Copy link
Owner

Hi @pgpbpadilla, could u try with below command?

pre_build_commands: pacman -S --noconfirm git-lfs; git config --global http.version HTTP/1.1; git config --global http.postBuffer 524288000

aaime added a commit to geoserver/geoserver.github.io that referenced this issue May 24, 2023
perryOnCrack added a commit to perryOnCrack/perryoncrack.github.io that referenced this issue May 27, 2023
@davidalpert
Copy link

it seems to me that this discussion is about two separate issues:

  1. the error: RPC failed; curl 55 Send failure: Connection reset by peer git error; and
  2. the step failure is silent

above I see a discussion about the git issue.

is it perhaps worth opening a second issue to discuss the fact that this action can fail silently such that the workflow can report success and you have to read the build log to see that it did not actually succeed?

@jeffreytse
Copy link
Owner

Hi @davidalpert @nietaki, @longavailable, @jtmullen

Now the latest version has supported to deploy site via the SSH protocol for better stability comparing with HTTP protocol, here I suggest you to switch to the SSH protocol as saying. : )

Thanks & Regards

@longavailable
Copy link

Hi @jeffreytse

I tested the SSH approach and met an error of ssh: command not found fatal: Could not read from remote repository.

https://github.com/longavailable/longavailable.github.io/actions/runs/5576548017/jobs/10187998571#step:5:931

Any suggestion?

Hi @davidalpert @nietaki, @longavailable, @jtmullen

Now the latest version has supported to deploy site via the SSH protocol for better stability comparing with HTTP protocol, here I suggest you to switch to the SSH protocol as saying. : )

Thanks & Regards

@jeffreytse
Copy link
Owner

jeffreytse commented Jul 17, 2023

@longavailable Could you try one more time? And before you try, you need to create a new secret named SSH_PRIVATE_KEY which content is a private key format in your repository Settings > Secrets and Variables > Actions as the following screenshot.

image

@longavailable
Copy link

Great job @jeffreytse . The latest commit works like a charm 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working verified This issue was already verified
Projects
None yet
Development

No branches or pull requests

9 participants