Default configuration path for subject_types in message consumers is invalid because subject_types directory is not installed in /usr/lib*.
Falls back to /src/conf base configuration directory.
Signed-off-by: Lukas Holecek hluk@email.cz
Hmm, actually this is relative path. Oops. It should be /src/conf/....
/src/conf/...
Probably better solution would be an env variable set for the container. What do you think?
The environment variable seems like a good idea yes. Flexible and should be fairly straight forward
rebased onto c18346ed5f8356f1e8b70c7b35cafaf3fb4c4c59
Updated.
Nice and easy, :thumbsup: for me
Just one thing: Should we add a log.info(f"Loading files from {source}") or so?
log.info(f"Loading files from {source}")
There is:
log.debug("config: Loading subject types from %r", subject_types_dir)
Would it make sense to change it to info log level?
info
Hm, if there is already one cool, but I did not see it in the logs of the consumer pod (and looking at kibana I'm still not seeing it :(). I don't think it's worth changing the log level.
With the help of @asaleh who came up with the right kibana syntax:
kubernetes.labels.deploymentconfig:"greenwave-fedmsg-consumers" AND message:"Loading"
I can now see the log message:
[greenwave.app_factory DEBUG] config: Loading subject types from '/usr/local/lib/python3.7/site-packages/conf/subject_types'
So +1 for me
Pull-Request has been merged by lholecek
Default configuration path for subject_types in message consumers is
invalid because subject_types directory is not installed in /usr/lib*.
Falls back to /src/conf base configuration directory.
Signed-off-by: Lukas Holecek hluk@email.cz