diff --git a/docs/design/HotReloadDoc.md b/docs/design/HotReloadDoc.md index f381e19b66..b57f0861d5 100644 --- a/docs/design/HotReloadDoc.md +++ b/docs/design/HotReloadDoc.md @@ -21,7 +21,7 @@ Implement a file monitoring mechanism to watch for changes in the the config fil #### Additional Implementation Details: -This fact, that the `RuntimeConfigProvider` is the one that is handling access to and the triggering of loading of the `RuntimeConfig` needs to be taken into consideration as an implementation detail. This is because the `RuntimeConfigProvider` has a `RuntimeConfigLoader`, and therefore the namespace that the `RuntimeConfigProvider` is within, `namespace Azure.DataApiBuilder.Core.Configurations` needs to reference the namespace that the `RuntimeConfigLoader` is within, `namespace Azure.DataApiBuilder.Config`. Since the `ConfigFileWatcher` will need a reference to the `RuntimeConfigProvider`, it will not be possible to have it live within the class or the project of the `RuntimeConfigLoader`, because this will create a circular dependancy. We therefore have decided to place the `ConfigFileWatcher` in the same namespace as the `RuntimeConfigProvider` and strongly couple the `ConfigFileWatcher` to the `RuntimeConfigProvider`. +This fact, that the `RuntimeConfigProvider` is the one that is handling access to and the triggering of loading of the `RuntimeConfig` needs to be taken into consideration as an implementation detail. This is because the `RuntimeConfigProvider` has a `RuntimeConfigLoader`, and therefore the namespace that the `RuntimeConfigProvider` is within, `namespace Azure.DataApiBuilder.Core.Configurations` needs to reference the namespace that the `RuntimeConfigLoader` is within, `namespace Azure.DataApiBuilder.Config`. Since the `ConfigFileWatcher` will need a reference to the `RuntimeConfigProvider`, it will not be possible to have it live within the class or the project of the `RuntimeConfigLoader`, because this will create a circular dependency. We therefore have decided to place the `ConfigFileWatcher` in the same namespace as the `RuntimeConfigProvider` and strongly couple the `ConfigFileWatcher` to the `RuntimeConfigProvider`. #### Watching Multiple Files: An additional consideration is that in order to handle hot reloading of the sections outside of the runtime section we may need to walk a tree of config files. Since with recent changes we can now reference another configuration file, which can itself reference another configuration file, to be certain that we are hot reloading when any change is made to a configuration file, we will need to walk that tree and monitor all of those files. However, this will only be needed for the sections beyond the runtime section, because the root in this tree will always have the runtime data. We also need to be watching the Cosmos schema file, which can be updated without the config file being changed. diff --git a/docs/design/dab-validate.md b/docs/design/dab-validate.md index 956c21d78a..0e58fc6e7f 100644 --- a/docs/design/dab-validate.md +++ b/docs/design/dab-validate.md @@ -40,7 +40,7 @@ The following types of validations are run on the config file (in the order spec - To proceed with this validation, we ensure that connection-string provided is valid. - Then we call the `ValidateEntitiesMetadata` method which first validates our connection to database using `ValidateDatabaseConnection` method. - If we are able to connect to Database, then we fetch the metadata and validate the entity and store the exceptions in the `SqlMetadataExceptions` present in SqlMetadataProvider class. - - Once all the validation is done, we return all the metadata exception to the configValidationException which contains all the exceptions occured so far. + - Once all the validation is done, we return all the metadata exception to the configValidationException which contains all the exceptions occurred so far. 6. Finally, when all the validation errors are collected, we log it in the console. 7. If there are any kinds of validation errors `TryValidateConfig()` would return false, else true.