Skip to content
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

[Main][Task]27749889: Change AISKU Sync Mode to Receive #2333

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

Karlie-777
Copy link
Contributor

No description provided.

@@ -92,7 +92,8 @@ const defaultConfigValues: IConfigDefaults<IConfiguration & IConfig> = {
),
extensionConfig: cfgDfMerge<{[key: string]: any}>({
["AppInsightsCfgSyncPlugin"]: cfgDfMerge<ICfgSyncConfig>({
cfgUrl: CONFIG_ENDPOINT_URL
cfgUrl: CONFIG_ENDPOINT_URL,
syncMode: ICfgSyncMode.Receive
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the AISKU default receive mode to "receive" (will call "updateCfg" to update current core.config), previous one is "broadcast" (which means only send events out but not receiving any incoming changes)

@@ -317,7 +317,9 @@ export class CfgSyncPlugin extends BaseTelemetryPlugin implements ICfgSyncPlugin
if (JSON) {
let cdnCfg = JSON.parse(response); //comments are not allowed
let cfg = applyCdnfeatureCfg(cdnCfg, _self.core);
cfg && _setCfg(cfg, isAutoSync);
let newCfg = cfg && isPlainObject(cfg) && _replaceTartgetByKeys(cfg);
newCfg && _setCfg(newCfg, isAutoSync);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previous design: any configs from cdn, they will be directly applied to current core.config (it was designed to use blkCdnCfg to control if we need to apply cdn changes or not).
Current:
So add an extra layer, even if blkCdnCfg is set to false, any config values defined in nonOverrideConfigs will not be replaced by cdn configs.

@Karlie-777 Karlie-777 merged commit f256575 into main Apr 22, 2024
8 checks passed
@Karlie-777 Karlie-777 added this to the 3.2.1 milestone May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants