-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$OPENASSETIO_DEFAULT_SESSION_SETTINGS
#494
Milestone
Comments
foundrytom
added a commit
to foundrytom/OpenAssetIO
that referenced
this issue
Sep 6, 2022
Adds a convenience to `ManagerFactory` that allows a "default" manager to be created from a shared settings file. This allows deployments to create a single source of truth that is easily referenced by all API hosts, without a need for their own settings persistence mechanism. This simplifies the centralised management of OpenAssetIO config. The OPENASSETIO_DEFAULt_MANAGER_CONFIG environment variable can be set to point to a simple TOML file with the following structure: ```toml [manager] identifier = "some.identifier" [settings] some_key = "a value" ``` The settings section is optional. We opted to use TOML as the config file is intended to be easily authored/edited by hand, and the data structures are always simple. In the future this could easily be extended such that the env var can list a number of fallback config files if required, or to allow the direct specification of the TOML path in the call. Closes OpenAssetIO#494. Signed-off-by: Tom Cowland <tom@foundry.com>
foundrytom
added a commit
to foundrytom/OpenAssetIO
that referenced
this issue
Sep 8, 2022
This prevents third-party code from triggering build failures due to clang-tidy checks (eg: toml.hpp). Part of OpenAssetIO#494. Signed-off-by: Tom Cowland <tom@foundry.com>
foundrytom
added a commit
to foundrytom/OpenAssetIO
that referenced
this issue
Sep 8, 2022
ManagerFactory was fairly trivial when first authored. We will soon be adding more functionality to it. To avoid duplicate business logic, this switches exposing a Manager's interface - allowing us to re-use the construction/initialization logic from C++, and re-wrap the ManagerInterface instance in a Python Manager to expose the full Python API to Python hosts. We can remove all this when Manager.py is removed. Part of OpenAssetIO#494. Signed-off-by: Tom Cowland <tom@foundry.com>
foundrytom
added a commit
to foundrytom/OpenAssetIO
that referenced
this issue
Sep 8, 2022
Adds a convenience to `ManagerFactory` that allows a "default" manager to be created from a shared settings file. This allows deployments to create a single source of truth that is easily referenced by all API hosts, without a need for their own settings persistence mechanism. This simplifies the centralised management of OpenAssetIO config. The OPENASSETIO_DEFAULT_CONFIG environment variable can be set to point to a simple TOML file with the following structure: ```toml [manager] identifier = "some.identifier" [manager.settings] some_key = "a value" ``` The manager settings section is optional. We opted to use TOML as the config file is intended to be easily authored/edited by hand, and the data structures are always simple. In the future this could easily be extended such that the env var can list a number of fallback config files if required, or to allow the direct specification of the TOML path in the call. There was some contemplation between `OPENASSETIO_DEFAULT_MANAGER_CONFIG` Vs `OPENASSETIO_DEFAULT_CONFIG`. In the end, the latter was selected as it has scope to be used for other aspects of the API (eg: controlling debug/auditing functionality that will be added before “v1”). There is still a “default manager config” constant on `ManagerFactory` though, incase we choose to de-couple the above. With the thinking that “this is the var that controls the `defaultManagerForInferface` method, rather than “what is a common, shared config var”. The former works in both this situation, and a potential later one where this mechanism may be controlled independently. This commit does not change LICENSE or NOTICE as if I’ve understood https://infra.apache.org/licensing-howto.html#bundled-vs-non-bundled correctly, we shouldn’t need it until we start creating binary distributions. Closes OpenAssetIO#494. Signed-off-by: Tom Cowland <tom@foundry.com>
foundrytom
added a commit
to foundrytom/OpenAssetIO
that referenced
this issue
Sep 16, 2022
ManagerFactory was fairly trivial when first authored. We will soon be adding more functionality to it. To avoid duplicate business logic, this switches exposing a Manager's interface - allowing us to re-use the construction/initialization logic from C++, and re-wrap the ManagerInterface instance in a Python Manager to expose the full Python API to Python hosts. We can remove all this when Manager.py is removed. Part of OpenAssetIO#494. Signed-off-by: Tom Cowland <tom@foundry.com>
foundrytom
added a commit
to foundrytom/OpenAssetIO
that referenced
this issue
Sep 16, 2022
Adds a convenience to `ManagerFactory` that allows a "default" manager to be created from a shared settings file. This allows deployments to create a single source of truth that is easily referenced by all API hosts, without a need for their own settings persistence mechanism. This simplifies the centralised management of OpenAssetIO config. The OPENASSETIO_DEFAULT_CONFIG environment variable can be set to point to a simple TOML file with the following structure: ```toml [manager] identifier = "some.identifier" [manager.settings] some_key = "a value" ``` The manager settings section is optional. We opted to use TOML as the config file is intended to be easily authored/edited by hand, and the data structures are always simple. In the future this could easily be extended such that the env var can list a number of fallback config files if required, or to allow the direct specification of the TOML path in the call. There was some contemplation between `OPENASSETIO_DEFAULT_MANAGER_CONFIG` Vs `OPENASSETIO_DEFAULT_CONFIG`. In the end, the latter was selected as it has scope to be used for other aspects of the API (eg: controlling debug/auditing functionality that will be added before “v1”). There is still a “default manager config” constant on `ManagerFactory` though, incase we choose to de-couple the above. With the thinking that “this is the var that controls the `defaultManagerForInferface` method, rather than “what is a common, shared config var”. The former works in both this situation, and a potential later one where this mechanism may be controlled independently. This commit does not change LICENSE or NOTICE as if I’ve understood https://infra.apache.org/licensing-howto.html#bundled-vs-non-bundled correctly, we shouldn’t need it until we start creating binary distributions. Closes OpenAssetIO#494. Signed-off-by: Tom Cowland <tom@foundry.com>
foundrytom
added a commit
to foundrytom/OpenAssetIO
that referenced
this issue
Sep 21, 2022
ManagerFactory was fairly trivial when first authored. We will soon be adding more functionality to it. To avoid duplicate business logic, this switches exposing a Manager's interface - allowing us to re-use the construction/initialization logic from C++, and re-wrap the ManagerInterface instance in a Python Manager to expose the full Python API to Python hosts. We can remove all this when Manager.py is removed. Part of OpenAssetIO#494. Signed-off-by: Tom Cowland <tom@foundry.com>
foundrytom
added a commit
to foundrytom/OpenAssetIO
that referenced
this issue
Sep 21, 2022
Adds a convenience to `ManagerFactory` that allows a "default" manager to be created from a shared settings file. This allows deployments to create a single source of truth that is easily referenced by all API hosts, without a need for their own settings persistence mechanism. This simplifies the centralised management of OpenAssetIO config. The OPENASSETIO_DEFAULT_CONFIG environment variable can be set to point to a simple TOML file with the following structure: ```toml [manager] identifier = "some.identifier" [manager.settings] some_key = "a value" ``` The manager settings section is optional. We opted to use TOML as the config file is intended to be easily authored/edited by hand, and the data structures are always simple. In the future this could easily be extended such that the env var can list a number of fallback config files if required, or to allow the direct specification of the TOML path in the call. There was some contemplation between `OPENASSETIO_DEFAULT_MANAGER_CONFIG` Vs `OPENASSETIO_DEFAULT_CONFIG`. In the end, the latter was selected as it has scope to be used for other aspects of the API (eg: controlling debug/auditing functionality that will be added before “v1”). There is still a “default manager config” constant on `ManagerFactory` though, incase we choose to de-couple the above. With the thinking that “this is the var that controls the `defaultManagerForInferface` method, rather than “what is a common, shared config var”. The former works in both this situation, and a potential later one where this mechanism may be controlled independently. This commit does not change LICENSE or NOTICE as if I’ve understood https://infra.apache.org/licensing-howto.html#bundled-vs-non-bundled correctly, we shouldn’t need it until we start creating binary distributions. Closes OpenAssetIO#494. Signed-off-by: Tom Cowland <tom@foundry.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What
A standardized mechanism for initializing a session with an externally pre-determined manager/settings.
Why
Many common production deployment scenarios would have a standard manager plugin + settings to be used across a variety of hosts (See
Session.getSettings
). Requiring each host to independently determine these settings, and persist them individually does not scale well in such deployments.Ideally there would be a standardized way for a host to construct a 'default session' (which could always be overridden, etc... on a per host/user/session/etc. basis), to minimize the Api initialization boilerplate, and facilitate centralized management of OpenAssetIO configuration in common use cases.
Sketch
export OPENASSETIO_DEFAULT_SESSION_SETTINGS=/some/path/to/config.toml
Config.toml
A Host
The text was updated successfully, but these errors were encountered: