You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It turns out that for private schemas they have to be at the root of the private folder to be able to be read. If private schemas are located under a subfolder such as private/foobar, they won't be loaded.
The text was updated successfully, but these errors were encountered:
The other half of this, is that this is not logged properly.
The existing code never has module_name unless the file is found under core.schemas.{schema_root_type} or core.schemas.{schema_root_type}.private:
forschema_fileinPath(__file__).parent.glob(f"{schema_root_type}/**/*.py"):
ifschema_file.stem=="__init__":
continueifschema_file.parent.stem==schema_root_type:
# module_name set heremodule_name=f"core.schemas.{schema_root_type}.{schema_file.stem}"elifschema_file.parent.stem=="private":
# and heremodule_name=f"core.schemas.{schema_root_type}.private.{schema_file.stem}"# any other case module_name is never settry:
# and used hereregister_module(module_name, base_module)
exceptException:
logger.exception(f"Failed to register classes from {module_name}")
As I understand there should be logger.exception(f"Failed to register classes from {module_name}" which log module_name and None since it is never declared in the case that a nested schema exists. Nevertheless, when I found this issue, I could not find any logs to support this.
It turns out that for private schemas they have to be at the root of the
private
folder to be able to be read. If private schemas are located under a subfolder such asprivate/foobar
, they won't be loaded.The text was updated successfully, but these errors were encountered: