mooltiverse / nyx

The one stop semantic release tool
https://github.com/mooltiverse/nyx
Apache License 2.0
116 stars 8 forks source link

`an error occurred when trying to push: unpack error: index-pack abnormal exit` during `nyx mark` #234

Closed rrzal closed 1 year ago

rrzal commented 1 year ago

This error only appears in one repo so far (I've been adding nyx to multiple repos gradually, and it is the first time I encounter this issue). This repo has more files to push and deeper nested directories. There's a similar issue for go-git recently, but that seems to be only related to GitHub and is already fixed. https://github.com/go-git/go-git/issues/725

I can't find anything useful from the trace log. Is it possible to provide more logging so I can track down the root cause? This error can be caused by so many things:

Trace log:

ime="2023-06-12T16:24:14Z" level=debug msg="attempting push to 'origin' using user name and password credentials."
time="2023-06-12T16:24:14Z" level=debug msg="pushing changes to remote repository 'origin' using username and password"
time="2023-06-12T16:24:14Z" level=debug msg="username and password authentication will use custom authentication options"
an error occurred when trying to push: unpack error: index-pack abnormal exit
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1

Job config:

nyx_mark:
  dependencies:
    - infer_version_nyx
    - infer_version_c_header
    - update_c_version_header
  stage: release
  tags:
    - docker
  image:
    name: mooltiverse/nyx:2.4.4-hotfix219.3
    entrypoint: [""]
  variables:
    GIT_STRATEGY: clone
    GIT_DEPTH: "0"
  before_script:
    - git config user.name "Linux CI Station"
    - git config user.email "linux.ci.station@example.com"
  script:
    - git checkout -b $CI_COMMIT_BRANCH
    - ls -a
    - git status
    - nyx mark
    - ls -a
    - git status
  except:
    - master
rrzal commented 1 year ago

So I just tested by removing nyx mark and manually pushing in the pipeline, and this successfully pushed a new commit in the pipeline:

$ git add .
$ git commit -m 'WIP: TEST RELEASE PUSH IN PIPELINE'
[development 3bcdb12] WIP: TEST RELEASE PUSH IN PIPELINE
 1 file changed, 7 insertions(+), 7 deletions(-)
$ git push https://ci-pipeline:glpat-[MASKED]@<>/<>/<>.git
remote: 
remote: To create a merge request for development, visit:        
remote:   <>        
remote: 
To <>.git
   9b77462..3bcdb12  development -> development

This confirms the problem is indeed related to Nyx (or go-git)

flelli commented 1 year ago

Hi @rrzal ,

I'm struggling but I cant' find any means to increase go-git's verbosity.

It's hard to tell if this is on go-git or GitLab as the bug you mentioned was actually introduced by GitHub.

flelli commented 1 year ago

Closing this issue due to inactivity, also because it has been probably solved by other fixes.

Please reopen as needed.