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

readYaml fails with org.yaml.snakeyaml.error.YAMLException: Number of aliases for non-scalar nodes exceeds the specified max=50

    XMLWordPrintable

Details

    Description

      When trying to use the function `readYaml` on a yaml file with some aliases the following error pops up.{}

      09:58:40 org.yaml.snakeyaml.error.YAMLException: Number of aliases for non-scalar nodes exceeds the specified max=50*09:58:40* at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:172)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:314)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:305)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:286)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:188)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeSequenceNode(Composer.java:245)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:186)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:314)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:305)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:286)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:188)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:314)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:305)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:286)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:188)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:314)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:305)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:286)09:58:40 at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:188)09:58:40 at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:115)09:58:40 at org.yaml.snakeyaml.constructor.BaseConstructor.getData(BaseConstructor.java:135)09:58:40 at org.yaml.snakeyaml.Yaml$1.next(Yaml.java:514)09:58:40 at org.jenkinsci.plugins.pipeline.utility.steps.conf.ReadYamlStep$Execution.doRun(ReadYamlStep.java:126)09:58:40 at org.jenkinsci.plugins.pipeline.utility.steps.AbstractFileOrTextStepExecution.run(AbstractFileOrTextStepExecution.java:29)09:58:40 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)09:58:40 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)09:58:40 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)09:58:40 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)09:58:40 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)09:58:40 at java.base/java.lang.Thread.run(Thread.java:829)

      Attachments

        Issue Links

          Activity

            jzielke jzielke added a comment -

            danielbeck So where do I put this issue?

            jzielke jzielke added a comment - danielbeck So where do I put this issue?
            danielbeck Daniel Beck added a comment -

            load many jobs vi jcasc/yaml

            Unrelated to this issue, which is about https://plugins.jenkins.io/pipeline-utility-steps/

            danielbeck Daniel Beck added a comment - load many jobs vi jcasc/yaml Unrelated to this issue, which is about https://plugins.jenkins.io/pipeline-utility-steps/
            jzielke jzielke added a comment - - edited

            Same problem here. We load many jobs vi jcasc/yaml:

            org.yaml.snakeyaml.error.YAMLException: The incoming YAML document exceeds the limit: 3145728 code points.

            jzielke jzielke added a comment - - edited Same problem here. We load many jobs vi jcasc/yaml: org.yaml.snakeyaml.error.YAMLException: The incoming YAML document exceeds the limit: 3145728 code points.
            danielbeck Daniel Beck added a comment - Obligatory reminder that your pipelines are bad and should be changed if this is a problem. See e.g. https://www.jenkins.io/doc/book/pipeline/pipeline-best-practices/#making-sure-to-use-groovy-code-in-pipelines-as-glue or https://www.jenkins.io/doc/book/pipeline/pipeline-best-practices/#avoiding-complex-groovy-code-in-pipelines
            mjanczuk Mateusz Janczuk added a comment - - edited

            Please make it configurable, as I checked our YAML file needs about 300.

            mjanczuk Mateusz Janczuk added a comment - - edited Please make it configurable, as I checked our YAML file needs about 300.

            Would 100 be enough or would you like this to be configurable?

            stefan_spieker Stefan Spieker added a comment - Would 100 be enough or would you like this to be configurable?

            Blocks updating the plugin for us as we read sometimes yaml files with many anchors in a pipeline

            ckullabosch Christoph Kulla added a comment - Blocks updating the plugin for us as we read sometimes yaml files with many anchors in a pipeline

            People

              rsandell rsandell
              reakaleek Jan Calanog
              Votes:
              5 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated: