Repository navigation
feat: recognise the OpenFeature web provider, and keep telemetry SDK types valid - #69
Merged
Merged
Conversation
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
@flagward/openfeature-web(basb7/flagward-sdk-js#13) registers asOPENFEATURE_WEB. The endpoint already accepts it, sincesdk_registernever validatessdk_type; this makes the product recognise it, so the dashboard and telemetry can count it instead of folding it intoother.A bug this avoids on the way
The telemetry allowlist is built from
SDKType, andsdk_type_namereported a known type lowercased:openfeature_web. The collector (flagward-telemetry,lib/schema/v1.ts) acceptssdks[].typeonly as^[a-z0-9-]{1,32}$, and its schema is strict. One underscored value rejects the whole heartbeat, so every installation with the provider connected would have stopped reporting entirely, with no error anywhere.Nothing in production hits it today: v0.7.0 does not know the type and sends
other. It would have started with this enum change.sdk_type_namenow reports underscores as hyphens →openfeature-web.SDKTypevalue throughsdk_type_nameagainst the collector's pattern, so the next underscored type (a futureOPENFEATURE_NODE) fails here, not in the field. Verified it fails with the enum added and the fix removed.Changes
telemetry/anonymize.pysdk_api/models.py+ migration0006OPENFEATURE_WEB = "OpenFeature (web)"(choices only, no schema change)frontend/src/lib/api.tsSDKTypeunion learns'OPENFEATURE_WEB'tests/unit/test_telemetry_anonymize.pytests/unit/test_sdk_registration.pyOPENFEATURE_WEBamong the values published packages sendfrontend/public/logo-mark.svglogo.png(silhouette matches at IoU 0.971). Needed for the openfeature.dev provider listing, whose logos are fill-lessThree commits: the telemetry fix first (it stands on its own and passes alone), then the type, then the logo.
Checks
pytest: 814 passed ·ruff check .: clean ·makemigrations --check: no changes pendingbiome check,tsc --noEmitclean ·npm test: 188 passed