Could not update folder level actions from source<id> FATAL: "Failed to recompute children" when indexing multibranch pipeline

1,304 views
Skip to first unread message

Ashish Kumar

unread,
Jun 15, 2023, 2:19:54 PM6/15/23
to Jenkins Users
Hi All,

I'm getting this following error which is happening for a particular gerrit repo. The configuration is working for all other repos in my project but not in this particular one.

ERROR: [Thu Jun 15 17:55:03 UTC 2023] Could not update folder level actions from source c0628d20-0427-4a13-a81d-b22ef9bfe114
[Thu Jun 15 17:55:03 UTC 2023] Finished branch indexing. Indexing took 0.56 sec
FATAL: Failed to recompute children of test-seatregion
hudson.plugins.git.GitException: Command "git fetch --tags --force --progress -- origin +refs/heads/*:refs/remotes/origin/* refs/changes/62/113962/4:refs/remotes/origin/62/113962/4 refs/changes/85/115185/2:refs/remotes/origin/85/115185/2 refs/changes/24/106224/4:refs/remotes/origin/24/106224/4" returned status code 128:
stdout:
stderr: remote: Counting objects: 1          
fatal: protocol error: bad pack header

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2734)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2111)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:623)
at jenkins.plugins.gerrit.AbstractGerritSCMSource.doRetrieve(AbstractGerritSCMSource.java:670)
at jenkins.plugins.gerrit.AbstractGerritSCMSource.retrieveActions(AbstractGerritSCMSource.java:232)
at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:848)
at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:597)
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278)
at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:166)
at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1031)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
Finished: FAILURE


The multibranch pipeline catalog template is
multibranch:
  branchSource:
    gerrit:
      remote: ${ProjectRepositoryUrl}
      credentialsId: ${GitHTTPSCredentials}
      traits:
        - $class: ChangeDiscoveryTrait
          queryString: ''
        - $class: RefSpecsSCMSourceTrait
          templates:
          - value: '+refs/heads/*:refs/remotes/@{remote}/*'
        - $class: SubmoduleOptionTrait
          extension:
            disableSubmodules: false
            recursiveSubmodules: true
            parentCredentials: true  

and pipeline config is 
pipeline {
    /**###################### Agents Config ######################**/
    agent {
        kubernetes {
            inheritFrom "${PodName}"
        }
    }
    options {
        // This will checkout the changed repository that has triggered this pipeline to a sperate folder named "tmp_repository", to be used later in the build
        checkoutToSubdirectory('tmp_repository')
        buildDiscarder(logRotator(numToKeepStr: 'unlimited'))
    }

    /**###################### Stages ######################**/
    stages {
        /**###################### Gerrit Review Log ######################**/
        stage('Init') {
            steps {
                script {
                    gerritReview message: "Build started: ${BUILD_URL}"
                }
            }
        }
        /**###################### Cloning Manifest Repository ######################**/
        stage('Cloning Manifest Repo') {
            steps { // Executes on JNLP, no specific container required
                script {
                    echo "Cloning the Manifest repository: ${ManifestRepoName}"
                    // This will checkout the manifest repository into a folder under the same name as the repository
                    dir("${ManifestRepoName}") {
                        checkout([
                        $class: 'GitSCM',
                        branches:
                        [[name: "*/${ManifestBranch}"]],
                        doGenerateSubmoduleConfigurations: false,
                        extensions: [[
                            $class: 'LocalBranch',
                            localBranch: '**'
                          ],[
                            $class: 'CleanBeforeCheckout',
                            deleteUntrackedNestedRepositories: false
                          ]],
                        submoduleCfg: [],
                        userRemoteConfigs: [[credentialsId: GitHTTPSCredentials, /*Netid credentials must be used instead of HTTPS tokens.*/
                                             url: ManifestRepoUrl]]
                        ])
                    }
                }
            }
        }
}


The multibranch indexing itself is not happening and it is unable to detect Gerrit branches/changes

Can someone assist on this

Björn Pedersen

unread,
Jun 19, 2023, 1:09:05 AM6/19/23
to Jenkins Users
ashis...@gmail.com schrieb am Donnerstag, 15. Juni 2023 um 20:19:54 UTC+2:
Hi All,

I'm getting this following error which is happening for a particular gerrit repo. The configuration is working for all other repos in my project but not in this particular one.

ERROR: [Thu Jun 15 17:55:03 UTC 2023] Could not update folder level actions from source c0628d20-0427-4a13-a81d-b22ef9bfe114
[Thu Jun 15 17:55:03 UTC 2023] Finished branch indexing. Indexing took 0.56 sec
FATAL: Failed to recompute children of test-seatregion
hudson.plugins.git.GitException: Command "git fetch --tags --force --progress -- origin +refs/heads/*:refs/remotes/origin/* refs/changes/62/113962/4:refs/remotes/origin/62/113962/4 refs/changes/85/115185/2:refs/remotes/origin/85/115185/2 refs/changes/24/106224/4:refs/remotes/origin/24/106224/4" returned status code 128:
stdout:
stderr: remote: Counting objects: 1          
fatal: protocol error: bad pack header

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2734)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2111)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:623)
at jenkins.plugins.gerrit.AbstractGerritSCMSource.doRetrieve(AbstractGerritSCMSource.java:670)
at jenkins.plugins.gerrit.AbstractGerritSCMSource.retrieveActions(AbstractGerritSCMSource.java:232)
at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:848)
at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:597)
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278)
at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:166)
at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1031)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
Finished: FAILURE



Sounds more like a problem on the gerrit side. Maybe check https://confluence.atlassian.com/fishkb/git-indexing-fails-due-to-bad-pack-header-371360062.html for one reason.

Ashish Kumar

unread,
Jun 19, 2023, 2:48:03 AM6/19/23
to Jenkins Users

Ya it was an error from gerrit side. There was this particular change refs/changes/24/106224/4:refs/remotes/origin/24/106224/  in which a patchet we suspected it was not properly uploaded, possibly interupted in middle of a push. We abandoned the change since the owner was not available and then it worked fine.

The multibranch scan is happening successfully now in jenkins. The changes are getting picked up as usual.
Reply all
Reply to author
Forward
0 new messages