Skip to content

Commit aa92fc6

Browse files
authored
chore: Ensure the FDv2 data system honors the offline configuration. (#212)
<!-- CURSOR_SUMMARY --> > [!NOTE] > Ensures FDv2 respects offline mode by switching data source construction based on `configuration.Offline`. > > - In `FDv2DataSystem.Create`, when `configuration.Offline` is true, builds `Components.ExternalUpdatesOnly` with `contextWithSelectorSource`; otherwise constructs the standard FDv2 composite data source via `FDv2DataSource.CreateFDv2DataSource` > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0319dfe. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent b155938 commit aa92fc6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkgs/sdk/server/src/Internal/DataSystem/FDv2DataSystem.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,9 @@ public static FDv2DataSystem Create(Logger logger, Configuration configuration,
6969
var dataSourceUpdates = new DataSourceUpdatesImpl(writeThroughStore, dataStoreStatusProvider,
7070
clientContext.TaskExecutor, logger, logConfig.LogDataSourceOutageAsErrorAfter);
7171

72-
7372
var contextWithSelectorSource =
7473
clientContext.WithSelectorSource(new SelectorSourceFacade(writeThroughStore));
75-
var compositeDataSource = FDv2DataSource.CreateFDv2DataSource(
74+
var compositeDataSource = configuration.Offline ? Components.ExternalUpdatesOnly.Build(contextWithSelectorSource) : FDv2DataSource.CreateFDv2DataSource(
7675
dataSourceUpdates,
7776
dataSystemConfiguration.Initializers.Select(FactoryWithContext(contextWithSelectorSource)).ToList(),
7877
dataSystemConfiguration.Synchronizers.Select(FactoryWithContext(contextWithSelectorSource)).ToList(),

0 commit comments

Comments
 (0)