Skip to content

[openfeature] allow recovering from bad init - #474

Merged
dferber90 merged 1 commit into
mainfrom
openfeature-init-recovery
Aug 13, 2026
Merged

[openfeature] allow recovering from bad init#474
dferber90 merged 1 commit into
mainfrom
openfeature-init-recovery

Conversation

@dferber90

Copy link
Copy Markdown
Collaborator

closes#473

@vercel

vercelBot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
flags-playgroundReadyReadyPreviewAug 13, 2026 6:47pm
flags-sdk-devReadyReadyPreviewAug 13, 2026 6:47pm
flags-sdk-snippetsReadyReadyPreviewAug 13, 2026 6:47pm
shirt-shopReadyReadyPreviewAug 13, 2026 6:47pm
shirt-shop-apiReadyReadyPreviewAug 13, 2026 6:47pm

@dferber90
dferber90 marked this pull request as ready for review August 13, 2026 19:31
@dferber90
dferber90 merged commit 2dfc85c into mainAug 13, 2026
22 checks passed
@dferber90
dferber90 deleted the openfeature-init-recovery branch August 13, 2026 19:32
@github-actionsgithub-actionsBot mentioned this pull request Aug 13, 2026
dferber90 added a commit that referenced this pull request Aug 15, 2026
The adapter had no shutdown mechanism. close() now reverts it to its
uninitialized state, so the next evaluation initializes it again, per
section 2.5 of the OpenFeature provider spec. It first awaits an
initialization that is still in flight, so the client that initialization
produces is disposed rather than leaked, and it is idempotent.
Provider disposal is opt-in through the new onClose option, because the
adapter cannot do it on its own: an OpenFeature client has no close of
its own, and shutting down providers means closing them on the global
OpenFeature API, which would also affect providers this adapter never
registered.
Follow-up to #474, which fixed#473.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for freeto 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.

createOpenFeatureAdapter caches a rejected init promise forever, permanently serving defaultValue

2 participants

@dferber90@AndyBitz