Giter VIP home page Giter VIP logo

embulk-filter-script's People

Contributors

snakano avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

embulk-filter-script's Issues

Invalid exit status code

Problem

We cannot detect successful or failed result by exit status code.

case

  • missing path of script
  • ruby script internal error

How to repeat

Let's call test.rb from embulk_script.yml but test.rb does not exist.
It also get same result if it has internal script error.

in:
  type: file
  # anything ok

filters:
  - type: script
    path: ./test.rb

out:
  type: stdout
# run script, then error
$ embulk run embulk_script.yml

# check exit status code. It should be 1
$  echo $?
0

ref. http://itpro.nikkeibp.co.jp/article/COLUMN/20060228/231028/

log

$ embulk run embulk_script.yml
2017-09-22 13:26:50.701 +0900: Embulk v0.8.29
2017-09-22 13:26:52.969 +0900 [INFO] (0001:transaction): Loaded plugin embulk-filter-script (0.0.1)
2017-09-22 13:26:52.997 +0900 [INFO] (0001:transaction): Listing local files at directory 'csv' filtering filename by prefix 'test'
2017-09-22 13:26:52.999 +0900 [INFO] (0001:transaction): "follow_symlinks" is set false. Note that symbolic links to directories are skipped.
2017-09-22 13:26:53.009 +0900 [INFO] (0001:transaction): Loading files [csv/test.csv]
2017-09-22 13:26:53.099 +0900 [INFO] (0001:transaction): Using local thread executor with max_threads=1 / tasks=1
2017-09-22 13:26:53.108 +0900 [INFO] (0001:transaction): {done:  0 / 1, running: 0}
2017-09-22 13:26:53.180 +0900 [INFO] (0001:transaction): {done:  1 / 1, running: 0}
org.embulk.exec.PartialExecutionException: org.jruby.exceptions.RaiseException: (TypeError) exception class/object expected
	at org.embulk.exec.BulkLoader$LoaderState.buildPartialExecuteException(BulkLoader.java:375)
	at org.embulk.exec.BulkLoader.doRun(BulkLoader.java:607)
	at org.embulk.exec.BulkLoader.access$000(BulkLoader.java:35)
	at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:391)
	at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:387)
	at org.embulk.spi.Exec.doWith(Exec.java:25)
	at org.embulk.exec.BulkLoader.run(BulkLoader.java:387)
	at org.embulk.EmbulkEmbed.run(EmbulkEmbed.java:180)
	at org.embulk.EmbulkRunner.runInternal(EmbulkRunner.java:330)
	at org.embulk.EmbulkRunner.run(EmbulkRunner.java:173)
	at org.embulk.cli.EmbulkRun.runSubcommand(EmbulkRun.java:472)
	at org.embulk.cli.EmbulkRun.run(EmbulkRun.java:100)
	at org.embulk.cli.EmbulkBundle.checkBundleWithEmbulkVersion(EmbulkBundle.java:42)
	at org.embulk.cli.EmbulkBundle.checkBundle(EmbulkBundle.java:15)
	at org.embulk.cli.Main.main(Main.java:26)
Caused by: org.jruby.exceptions.RaiseException: (TypeError) exception class/object expected
	at RUBY.load_script_file(/Users/y-ken/.embulk/jruby/2.3.0/gems/embulk-filter-script-0.0.1/lib/embulk/filter/script.rb:53)
	at RUBY.initialize(/Users/y-ken/.embulk/jruby/2.3.0/gems/embulk-filter-script-0.0.1/lib/embulk/filter/script.rb:30)
	at RUBY.open(/Users/y-ken/bin/embulk!/embulk/filter_plugin.rb:64)

Error: org.jruby.exceptions.RaiseException: (TypeError) exception class/object expected

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.