Added setup_phase to metadata generation

we need the setup phase to be executed, so the setup-lambda is processed for per-request configuration
Added quirk to make sure the environment is loaded
Merge pull request #3 from unknown-dev/master

Added setup_phase to metadata generation