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

Initialise worker pods. #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sinistral
Copy link

The initial pod ID and shutdown hooks are initialised by Boot when the app is
launched, but not again when pod pools are spun up. Boot's fileset and tmpfile
machinery hooks into the pod lifecycle depends on pods being propertly
initialised; the following errors were encounted while testing a task that
modifies the Boot fileset.

  actual: java.lang.NullPointerException: null
 at clojure.lang.RT.longCast (RT.java:1241)
    boot.tmpregistry$dir_id.invoke (tmpregistry.clj:31)
    boot.tmpregistry$registry.invoke (tmpregistry.clj:93)
    boot.core/fn (core.clj:44)
    clojure.lang.Delay.deref (Delay.java:37)
    clojure.core$deref.invokeStatic (core.clj:2228)
    clojure.core$deref.invoke (core.clj:2214)
    boot.core$tmp_dir_STAR_.invoke (core.clj:98)
    boot.core$tmp_dir_STAR__STAR_.doInvoke (core.clj:111)
    clojure.lang.RestFn.invoke (RestFn.java:423)
    boot.core$tmp_dir_BANG_.invoke (core.clj:356)
  actual: java.lang.NullPointerException: null
 at clojure.lang.Reflector.invokeInstanceMethod (Reflector.java:26)
    boot.pod$add_shutdown_hook_BANG_.invoke (pod.clj:345)
    boot.tmpregistry.TmpRegistry._init_BANG_ (tmpregistry.clj:80)
    boot.tmpregistry$init_BANG_.invoke (tmpregistry.clj:55)
    boot.core/fn (core.clj:44)
    clojure.lang.Delay.deref (Delay.java:37)
    clojure.core$deref.invokeStatic (core.clj:2228)
    clojure.core$deref.invoke (core.clj:2214)
    boot.core$tmp_dir_STAR_.invoke (core.clj:98)
    boot.core$tmp_dir_STAR__STAR_.doInvoke (core.clj:111)
    clojure.lang.RestFn.invoke (RestFn.java:423)
    boot.core$tmp_dir_BANG_.invoke (core.clj:356)

See:

I may be setting the fileset up incorrectly in my test, and if there's a known better way to do this, I'd appreciate any guidance.

The initial pod ID and shutdown hooks are initialised by Boot when the app is
launched, but not again when pod pools are spun up.  Boot's fileset and tmpfile
machinery hooks into the pod lifecycle depends on pods being propertly
initialised; the following errors were encounted while testing a task that
modifies the Boot fileset.

  actual: java.lang.NullPointerException: null
 at clojure.lang.RT.longCast (RT.java:1241)
    boot.tmpregistry$dir_id.invoke (tmpregistry.clj:31)
    boot.tmpregistry$registry.invoke (tmpregistry.clj:93)
    boot.core/fn (core.clj:44)
    clojure.lang.Delay.deref (Delay.java:37)
    clojure.core$deref.invokeStatic (core.clj:2228)
    clojure.core$deref.invoke (core.clj:2214)
    boot.core$tmp_dir_STAR_.invoke (core.clj:98)
    boot.core$tmp_dir_STAR__STAR_.doInvoke (core.clj:111)
    clojure.lang.RestFn.invoke (RestFn.java:423)
    boot.core$tmp_dir_BANG_.invoke (core.clj:356)

  actual: java.lang.NullPointerException: null
 at clojure.lang.Reflector.invokeInstanceMethod (Reflector.java:26)
    boot.pod$add_shutdown_hook_BANG_.invoke (pod.clj:345)
    boot.tmpregistry.TmpRegistry._init_BANG_ (tmpregistry.clj:80)
    boot.tmpregistry$init_BANG_.invoke (tmpregistry.clj:55)
    boot.core/fn (core.clj:44)
    clojure.lang.Delay.deref (Delay.java:37)
    clojure.core$deref.invokeStatic (core.clj:2228)
    clojure.core$deref.invoke (core.clj:2214)
    boot.core$tmp_dir_STAR_.invoke (core.clj:98)
    boot.core$tmp_dir_STAR__STAR_.doInvoke (core.clj:111)
    clojure.lang.RestFn.invoke (RestFn.java:423)
    boot.core$tmp_dir_BANG_.invoke (core.clj:356)

See:
 * https://github.com/boot-clj/boot/blob/dce24183711747fc43b6e13c061cd5cb073b4e94/boot/base/src/main/java/boot/App.java#L407
 * https://github.com/boot-clj/boot/blob/dce24183711747fc43b6e13c061cd5cb073b4e94/boot/core/src/boot/tmpregistry.clj#L31
sinistral added a commit to sinistral/boot-aws-lambda-kit that referenced this pull request Mar 12, 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

Successfully merging this pull request may close these issues.

1 participant