Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/Config/ObjectModel/RuntimeConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -440,4 +440,17 @@ private void SetupDataSourcesUsed()
CosmosDataSourceUsed = _dataSourceNameToDataSource.Values.Any
(x => x.DatabaseType is DatabaseType.CosmosDB_NoSQL);
}

/// <summary>
/// Handles the logic for determining if we are in a scenario where hot reload is possible.
/// Hot reload is currently not available, and so this will always return false. When hot reload
/// becomes an available feature this logic will change to reflect the correct state based on
/// the state of the runtime config and any other relevant factors.
/// </summary>
/// <returns>True in a scenario that support hot reload, false otherwise.</returns>
public static bool IsHotReloadable()
{
// always return false while hot reload is not an available feature.
return false;
}
}
2 changes: 1 addition & 1 deletion src/Core/Configurations/RuntimeConfigProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public RuntimeConfig GetConfig()
/// </summary>
private bool TrySetupConfigFileWatcher()
{
if (!IsLateConfigured && _runtimeConfig is not null && _runtimeConfig.IsDevelopmentMode())
if (!IsLateConfigured && _runtimeConfig is not null && RuntimeConfig.IsHotReloadable())
{
try
{
Expand Down
3 changes: 3 additions & 0 deletions src/Service.Tests/Unittests/ConfigFileWatcherUnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ HostMode mode
/// Use the file system (not mocked) to create a hot reload
/// scenario of the REST runtime options and verify that we
/// correctly hot reload those options.
/// NOTE: This test is ignored until we have the possibility of turning
/// on hot reload.
/// </summary>
[TestMethod]
[Ignore]
public void HotReloadConfigRestRuntimeOptions()
{
// Arrange
Expand Down