Closed kennethito closed 1 year ago
Events created with https://github.com/coryodaniel/bonny/blob/master/lib/bonny/event.ex#L63 eventually call down to https://github.com/coryodaniel/bonny/blob/master/lib/bonny/config.ex#L69 which throws an exception in MIX_ENV=prod. This is easily worked around by setting :operator_name here, https://github.com/coryodaniel/bonny/blob/master/lib/bonny/config.ex#L33
MIX_ENV=prod
:operator_name
2023-03-07 01:25:04.253 [error] Task #PID<0.2383.0> started from #PID<0.2378.0> terminating ** (UndefinedFunctionError) function Mix.Project.config/0 is undefined (module Mix.Project is not available) Mix.Project.config() (bonny 1.1.1) lib/bonny/config.ex:65: Bonny.Config.project_name/0 (bonny 1.1.1) lib/bonny/config.ex:34: Bonny.Config.name/0 (bonny 1.1.1) lib/bonny/event.ex:63: Bonny.Event.new!/1 (bonny 1.1.1) lib/bonny/axn.ex:168: Bonny.Axn.success_event/2 (game_scaler 0.1.0) lib/game_scaler/controllers/deployment_controller.ex:1: GameScaler.Controller.DeploymentController.pluggable_builder_call/2 (game_scaler 0.1.0) lib/game_scaler/operator.ex:1: GameScaler.Operator.pluggable_builder_call/2 (bonny 1.1.1) lib/bonny/operator.ex:148: Bonny.Operator.run/4
The default for Bonny.Config.name/1 defaults should work in MIX_ENV=prod
Bonny.Config.name/1
Duplicate of #180. Can you try if it's fixed in 1.1.2? You're gonna have to regenerate the manifest first, though.
I'm gonna close this. Let me know if it's still a problem.
Environment
Current behavior
Events created with https://github.com/coryodaniel/bonny/blob/master/lib/bonny/event.ex#L63 eventually call down to https://github.com/coryodaniel/bonny/blob/master/lib/bonny/config.ex#L69 which throws an exception in
MIX_ENV=prod
. This is easily worked around by setting:operator_name
here, https://github.com/coryodaniel/bonny/blob/master/lib/bonny/config.ex#L33Expected behavior
The default for
Bonny.Config.name/1
defaults should work inMIX_ENV=prod