Skip to content

Commit 47e0890

Browse files
FFL-1294: Fix FFE_FLAGS Remote Config handler payload format (#6754)
The FFE_FLAGS RC handler was incorrectly expecting a wrapped payload with conf.flag_configuration, but Remote Config delivers direct UFC payloads. Changes: - Fixed: this.openfeature._setConfiguration(conf.flag_configuration) - To: this.openfeature._setConfiguration(conf)
1 parent f2af4fd commit 47e0890

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/dd-trace/src/proxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class Tracer extends NoopProxy {
164164
rc.setProductHandler('FFE_FLAGS', (action, conf) => {
165165
// Feed UFC config directly to OpenFeature provider
166166
if (action === 'apply' || action === 'modify') {
167-
this.openfeature._setConfiguration(conf.flag_configuration)
167+
this.openfeature._setConfiguration(conf)
168168
}
169169
})
170170
}

packages/dd-trace/test/proxy.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ describe('TracerProxy', () => {
372372
proxy.openfeature // Trigger lazy loading
373373

374374
const flagConfig = { flags: { 'test-flag': {} } }
375-
handlers.get('FFE_FLAGS')('apply', { flag_configuration: flagConfig })
375+
handlers.get('FFE_FLAGS')('apply', flagConfig)
376376

377377
expect(openfeatureProvider._setConfiguration).to.have.been.calledWith(flagConfig)
378378
})
@@ -384,7 +384,7 @@ describe('TracerProxy', () => {
384384
proxy.openfeature // Trigger lazy loading
385385

386386
const flagConfig = { flags: { 'modified-flag': {} } }
387-
handlers.get('FFE_FLAGS')('modify', { flag_configuration: flagConfig })
387+
handlers.get('FFE_FLAGS')('modify', flagConfig)
388388

389389
expect(openfeatureProvider._setConfiguration).to.have.been.calledWith(flagConfig)
390390
})

0 commit comments

Comments
 (0)