?????? thread safety of scripted pipeline parallel and usage of nested parallel

2021-11-03 Thread 'abstrakta' via Jenkins Users
https://www.jenkins.io/doc/book/pipeline/scaling-pipeline/ says that durability is the ability of restarting running jobs even if Jenkins server restarts or system crashes.It seems not much useful. Jenkins server seems not so easy to crash. What are some subtle bugs related to Pipeline durabilit

Re: thread safety of scripted pipeline parallel and usage of nested parallel

2021-11-02 Thread 'dnus...@cloudbees.com' via Jenkins Users
:42:14 AM UTC-4 abstrakta wrote: > So nested parallel is allowed too ? > ---Original--- > *From:* "'Devin Nusbaum' via Jenkins Users" > *Date:* Mon, Nov 1, 2021 21:27 PM > *To:* "jenkinsci-users"; > *Subject:* Re: thread safety of scripted pipeline

Re: thread safety of scripted pipeline parallel and usage of nested parallel

2021-11-01 Thread 'abstrakta' via Jenkins Users
So nested parallel is allowed too ? ---Original--- From: "'Devin Nusbaum' via Jenkins Users"https://github.com/jenkinsci/workflow-cps-plugin#technical-design for a few more details. You should not need to worry about Java thread safety across the various branches in a parallel step as long as y

Re: thread safety of scripted pipeline parallel and usage of nested parallel

2021-11-01 Thread 'Devin Nusbaum' via Jenkins Users
gt;> >> tests = [:] >> tests["B1"] = { test_action("B1") } >> tests["B2"] = { test_action("B2") } >> builds["B"] = { build_action("B",tests) } >> >>

Re: thread safety of scripted pipeline parallel and usage of nested parallel

2021-11-01 Thread kuisathaverat
} > > tests = [:] > tests["C1"] = { test_action("C1") } > tests["C2"] = { test_action("C2") } > builds["C"] = { build_action("B",tests) } > &g

回复: thread safety of scripted pipeline parallel and usage of nested parallel

2021-10-31 Thread 'abstrakta' via Jenkins Users
sorry, pipeline code should be correct like this: pipeline {     agent any     stages {         stage('Parallel Build') {             steps {                 script {                     def builds = [:]                     def tests = [:]                     stash name: 'src', include: 'src/**'

?????? thread safety of scripted pipeline parallel and usage of nested parallel

2021-10-31 Thread 'abstrakta' via Jenkins Users
OK,I know what you means. But I test these pipeline that data is not synchronized many times( about more than 700 times,I use periodical build to test it automatically). Shared data that is not synchronized is processed correctly every time. Do you really encounter the situation that shared data

Re: thread safety of scripted pipeline parallel and usage of nested parallel

2021-10-31 Thread Ivan Fernandez Calvo
ifferent slave node without thread protection.Is my guess correct?I can't > find any other articles that discuss this parallel thread safety issue. > ---Original--- > *From:* "Ivan Fernandez Calvo" > *Date:* Sun, Oct 31, 2021 00:03 AM > *To:* "Jenkins Users";

Re: thread safety of scripted pipeline parallel and usage of nested parallel

2021-10-30 Thread 'abstrakta' via Jenkins Users
Thanks for your reply. So parallel directive is like spawning some Java threads?Do you have any pipeline code can demo this thread safety issue and how to fix it using Java types that are thread safe ? I guess that some directive "stash unstash archive" should be thread safety internally.Because

Re: thread safety of scripted pipeline parallel and usage of nested parallel

2021-10-30 Thread Ivan Fernandez Calvo
No, if you plan to use shared variables across parallel steps you should use Java types that are thread safe, if not you will have random/weird results. I have several pipelines that uses a map to store results in parallel steps El sábado, 30 de octubre de 2021 a las 14:18:29 UTC+2, abstrakta

thread safety of scripted pipeline parallel and usage of nested parallel

2021-10-30 Thread 'abstrakta' via Jenkins Users
Hi, Jenkins friends.I wish that I'm in the right place that post these Jenkins usage question. I find that the Scriped Pipeline parallel works like threads.Unlike the Declarative Pipeline parallel,the Scriped Pipeline parallel just use one executor.Closure in parallel parameters works like a th