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

New config field doesn't honor blank value #232

Closed
kluke0 opened this issue Mar 13, 2019 · 2 comments
Closed

New config field doesn't honor blank value #232

kluke0 opened this issue Mar 13, 2019 · 2 comments

Comments

@kluke0
Copy link

kluke0 commented Mar 13, 2019

Issue

Context

  • Jenkins version: 2.138.1

  • Job type: Freestyle

  • Allure plugin version: 2.28

  • Allure CLI version: 2.6.0

Problem description

New field for config.yml causes SnakeYAML to throw "IsDirectory" exception when the field is left blank.

In the logs provided below, I pass nothing at all to the new config field under Advanced. When the job is run, the command line builder is adding a --config as the current workspace, instead of leaving it blank: --config /srv/jenkins_home/jobs/My_Job/workspace

Logs & Traces

[workspace] $ /srv/jenkins_home/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure/bin/allure generate -c -o /srv/jenkins_home/jobs/My_Job/workspace/allure-report --config /srv/jenkins_home/jobs/My_Job/workspace
Exception in thread "main" org.yaml.snakeyaml.error.YAMLException: java.io.IOException: Is a directory
at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:254)
at org.yaml.snakeyaml.reader.StreamReader.(StreamReader.java:58)
at com.fasterxml.jackson.dataformat.yaml.YAMLParser.(YAMLParser.java:154)
at com.fasterxml.jackson.dataformat.yaml.YAMLFactory._createParser(YAMLFactory.java:420)
at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:321)
at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:14)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3058)
at io.qameta.allure.config.ConfigLoader.load(ConfigLoader.java:34)
at java.util.Optional.map(Optional.java:215)
at io.qameta.allure.Commands.getConfig(Commands.java:51)
at io.qameta.allure.Commands.createReportConfiguration(Commands.java:175)
at io.qameta.allure.Commands.generate(Commands.java:88)
at io.qameta.allure.CommandLine.run(CommandLine.java:129)
at java.util.Optional.orElseGet(Optional.java:267)
at io.qameta.allure.CommandLine.main(CommandLine.java:72)
Caused by: java.io.IOException: Is a directory
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.FileDispatcherImpl.read(FileDispatcherImpl.java:46)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:159)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:65)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:109)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103)
at com.fasterxml.jackson.dataformat.yaml.UTF8Reader.readBytes(UTF8Reader.java:327)
at com.fasterxml.jackson.dataformat.yaml.UTF8Reader.loadMore(UTF8Reader.java:447)
at com.fasterxml.jackson.dataformat.yaml.UTF8Reader.read(UTF8Reader.java:185)
at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:223)
... 14 more
ERROR: Build step failed with exception
ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not generate Allure Report, exit code: 1
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:315)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:229)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1840)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'Allure Report' marked build as failure
Finished: FAILURE

@YoninL
Copy link

YoninL commented Mar 14, 2019

Same issue here, have to rollback to 2.27.

@mgarzone
Copy link

The same problem happened with our build. Rollbacking to previous version 2.27. cleared the issue.

eroshenkoam added a commit that referenced this issue Mar 21, 2019
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

3 participants