twitter / finatra

Fast, testable, Scala services built on TwitterServer and Finagle

Home Page:https://twitter.github.io/finatra/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation for Lifecycle Incorrect?

safi-manar opened this issue · comments

Hi,

I noticed that in the lifecycle startup documentation, Post Injector Startup occurs before Modules post injector startup

But, in the source code, I see a difference lifecycle sequence in com.twitter.inject.app.App.scala:

 def main(): Unit = {
    installedModules = loadModules()

    installedModules.postInjectorStartup()
    postInjectorStartup()

    info("Warming up.")
    warmup()
    beforePostWarmup()
    postWarmup()
    afterPostWarmup()
    installedModules.postWarmupComplete()
...

So, I'm wondering:

  1. Is the documentation out of date here / is this a mistake?
  2. Is there a guarantee for future releases that installedModules.postInjectorStartup() will precede postInjectorStartup()?

@safi-manar thanks for the issue -- the code is correct and documentation just needs to be updated. We don't make guarantees to not change anything in the framework in a future release but we do try to not completely break backwards compatibility without a good reason. FWIW, I don't expect this lifecycle code to change anytime soon. Thanks!

@cacoco Awesome, thank you so much!