return FALSE; $r = well_tag_thread__update(array('id' => $id), $update); return $r; } function well_tag_thread_find($tagid, $page, $pagesize) { $arr = well_tag_thread__find(array('tagid' => $tagid), array('id' => -1), $page, $pagesize); return $arr; } function well_tag_thread_find_by_tid($tid, $page, $pagesize) { $arr = well_tag_thread__find(array('tid' => $tid), array(), $page, $pagesize); return $arr; } ?>serialization - Intermittent java.io.NotSerializableException: org.codehaus.groovy.runtime.NullObject (1%? failure rate)? - Stac
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

serialization - Intermittent java.io.NotSerializableException: org.codehaus.groovy.runtime.NullObject (1%? failure rate)? - Stac

programmeradmin1浏览0评论

In my Jenkins pipeline, I'm storing a Map to pass into the checkout stage of the pipeline. I did not have issue with this code previously, but now I've modified it for parallel stages, it seems to intermittently fail with the error:

dir – java.io.NotSerializableException: .codehaus.groovy.runtime.NullObject

What is stumping me is the error is extremely intermittent. For instance, only one out of 10 jobs will have this error, and in that failed job, each job has 10 parallel stages, and only 1 stage will fail with this error.

I've renamed and removed some code, but below is an example of how the pipeline has been structured.

def map = MAP_PARAM ? MAP_PARAM.tokenize("\n").collectEntries {
    it.tokenize("=").with {
        it[1] ? [(it[0]):it[1]] : [:]
    }
} : [:]

...

pipeline {
    agent none
    options { skipDefaultCheckout() }
    stages {
        stage('Create stages') {
            steps {
                script {
                    ...

                    // Create parallel jobs
                    for (b in branches) {
                        def branch = "${b}"
                        branches[branch] = {
                            podTemplate(yaml: ..., cloud: ...) {
                                node(...) {
                                    container(...) {
                                        stage('Checkout') {
                                            checkout(map)
                                        }
                                        stage('Build') {
                                            build(...)   
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        stage('Run Stages') {
            steps {
                script {
                    parallel(branches)
                }
            }
        }

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论