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

Cannot printCallStack for a parallel step with a complex map #41

Closed
stchar opened this issue Jun 30, 2017 · 4 comments
Closed

Cannot printCallStack for a parallel step with a complex map #41

stchar opened this issue Jun 30, 2017 · 4 comments

Comments

@stchar
Copy link
Contributor

stchar commented Jun 30, 2017

I've suggested a test with a complex map like.

s = [s1:[name:"action1-name", body:{
      node() {
        sh 'sleep 3'
        error 'message'
      }
    }], s2:[name: "action2-name", body:{
        node() {
            sh 'sleep 4'
        }
    }]]

    parallel(
      "$s.s1.name":s.s1.body,
      "$s.s2.name":s.s2.body,
      failFast:true
    )

It seems that the script itself works fine, however I get the exception on printCallStack()
``
java.lang.ClassCastException: org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String

@stchar
Copy link
Contributor Author

stchar commented Jun 30, 2017

#40

@stchar stchar changed the title Cannot printCallStack parallel step with a complex map Cannot printCallStack for a parallel step with a complex map Jun 30, 2017
@ozangunalp
Copy link
Contributor

We had this issue a while ago and if i remember correctly we had a fix. It is clearly a regression. I'll merge your PR and prepare a fix.

@ozangunalp ozangunalp self-assigned this Jun 30, 2017
@ozangunalp ozangunalp added the bug label Jun 30, 2017
@stchar
Copy link
Contributor Author

stchar commented Jun 30, 2017

Hey, I can try to use bisect, maybe I can found the commit wit that fix

@ozangunalp
Copy link
Contributor

No, that's ok. It is a problem with Groovy.

You can reproduce it by

    @Test
    void name() throws Exception {
        String s1 = '1234'
        def m = [
            "$s1":1,
            aKey:2
        ]
        assertTrue(m instanceof Map)
        m.sort()
    }

I removed the unnecessary sort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants