Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52639

Support Core depends on version of snakeyaml with incompatible API changes

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      support-core 2.49

      Description

      Plugins that depend on support-core and use snakeyaml are getting exceptions like the following:

      java.lang.NoSuchMethodError: org.yaml.snakeyaml.events.MappingStartEvent.<init>(Ljava/lang/String;Ljava/lang/String;ZLorg/yaml/snakeyaml/error/Mark;Lorg/yaml/snakeyaml/error/Mark;Ljava/lang/Boolean;)V
      

      Using snakeyaml without shading it is a little precarious in the current Jenkins ecosystem, see the comments in JENKINS-50202 for more details.

      Support-core has a transitive dependency on snakeyaml through the javafaker library, which was added as part of support bundle anonymization.

      My proposal is to replace javafaker with wordnet-random-name. It doesn't allow us to use different themes for different kinds of data, but it has no compile-scope dependencies.
      We could also downgrade to snakeyaml 1.17 to avoid API compatibility issues for now (assuming javafaker 0.15 is compatible with snakeyaml 1.17), or we could shade it and the javafaker library to avoid conflicts with other plugins, but getting rid of it seems like the easiest long-term solution.

        Attachments

          Issue Links

            Activity

            dnusbaum Devin Nusbaum created issue -
            dnusbaum Devin Nusbaum made changes -
            Field Original Value New Value
            Description Plugins that depend on support-core and use snakeyaml are getting exceptions like {{java.lang.NoSuchMethodError: org.yaml.snakeyaml.events.MappingStartEvent.<init>(Ljava/lang/String;Ljava/lang/String;ZLorg/yaml/snakeyaml/error/Mark;Lorg/yaml/snakeyaml/error/Mark;Ljava/lang/Boolean;)V}}. In general, using snakeyaml without shading it is a little precarious in the current Jenkins ecosystem, see the comments in JENKINS-50202 for more details.

            Support-core has a transitive dependency on snakeyaml through the javafaker library, which was added as part of support bundle anonymization.

            My proposal is to replace javafaker with wordnet-random-name. It doesn't allow us to use different themes for different kinds of data, but it has no compile-scope dependencies.
            We could also downgrade to snakeyaml 1.17 to avoid API compatibility issues for now (assuming javafaker 0.15 is compatible with snakeyaml 1.17), or we could shade it and the javafaker library to avoid conflicts with other plugins, but getting rid of it seems like the easiest long-term solution.
            Plugins that depend on support-core and use snakeyaml are getting exceptions like the following:

            {noformat}
            java.lang.NoSuchMethodError: org.yaml.snakeyaml.events.MappingStartEvent.<init>(Ljava/lang/String;Ljava/lang/String;ZLorg/yaml/snakeyaml/error/Mark;Lorg/yaml/snakeyaml/error/Mark;Ljava/lang/Boolean;)V
            {noformat}

            Using snakeyaml without shading it is a little precarious in the current Jenkins ecosystem, see the comments in JENKINS-50202 for more details.

            Support-core has a transitive dependency on snakeyaml through the javafaker library, which was added as part of support bundle anonymization.

            My proposal is to replace javafaker with wordnet-random-name. It doesn't allow us to use different themes for different kinds of data, but it has no compile-scope dependencies.
            We could also downgrade to snakeyaml 1.17 to avoid API compatibility issues for now (assuming javafaker 0.15 is compatible with snakeyaml 1.17), or we could shade it and the javafaker library to avoid conflicts with other plugins, but getting rid of it seems like the easiest long-term solution.
            dnusbaum Devin Nusbaum made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            dnusbaum Devin Nusbaum made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            dnusbaum Devin Nusbaum made changes -
            Remote Link This issue links to "jenkinsci/support-core-plugin#147 (Web Link)" [ 21202 ]
            dnusbaum Devin Nusbaum made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            dnusbaum Devin Nusbaum made changes -
            Released As support-core 2.49

              People

              • Assignee:
                dnusbaum Devin Nusbaum
                Reporter:
                dnusbaum Devin Nusbaum
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: