Skip to content

docs: add provider lifecycle guidance#1387

Open
zhouzhou626 wants to merge 1 commit into
open-feature:mainfrom
zhouzhou626:docs/provider-lifecycle-current
Open

docs: add provider lifecycle guidance#1387
zhouzhou626 wants to merge 1 commit into
open-feature:mainfrom
zhouzhou626:docs/provider-lifecycle-current

Conversation

@zhouzhou626
Copy link
Copy Markdown

Summary

  • Document provider readiness during Evaluation API provider registration, including links to PROVIDER_READY and PROVIDER_ERROR event guidance.
  • Add an Evaluation API shutdown section with TypeScript, Java, and Python examples.
  • Add provider lifecycle guidance with initialization/shutdown examples for TypeScript and Java.
  • Update the Java Evaluation API import to the current dev.openfeature.sdk package used by the Java SDK docs.

Closes #119.

Testing

  • corepack yarn install --immutable
  • git diff --check
  • corepack yarn markdownlint-cli2 docs/reference/concepts/01-evaluation-api.mdx docs/reference/concepts/02-provider.mdx --no-globs
  • corepack yarn prettier --check docs/reference/concepts/01-evaluation-api.mdx docs/reference/concepts/02-provider.mdx

Additional checks attempted:

  • git submodule update --init --recursive
  • corepack yarn build reaches Docusaurus/Webpack but is blocked in this Windows workspace by an existing parent-directory JSON parse issue: D:\CodexWork\package.json contains a BOM and PostCSS reports Unexpected token '?' while loading CSS modules.
  • corepack yarn typecheck is blocked by existing repository issues unrelated to this docs change, including missing ./OpenFeatureTechnologiesPage, missing static image modules, and an existing SearchClient type incompatibility in src/pages/ecosystem.tsx.

Signed-off-by: zhouzhou626 <zhouzhou626@users.noreply.github.com>
@zhouzhou626 zhouzhou626 requested review from a team as code owners May 19, 2026 17:12
@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for openfeature ready!

Name Link
🔨 Latest commit 324912c
🔍 Latest deploy log https://app.netlify.com/projects/openfeature/deploys/6a0c9a0a8ca7a5000836fbf3
😎 Deploy Preview https://deploy-preview-1387--openfeature.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the documentation for the Evaluation API and Provider concepts, including a correction to Java package imports and the addition of sections regarding provider initialization and API shutdown. Feedback was provided to ensure the Java code example for the provider lifecycle matches the SDK's interface signature by adding a 'throws Exception' clause to the shutdown method.

}

@Override
public void shutdown() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

In the OpenFeature Java SDK, the shutdown method in the FeatureProvider interface is defined with a throws Exception clause. While it is technically valid in Java to override a method and omit the throws clause if the implementation doesn't throw checked exceptions, it is better for documentation examples to match the interface signature for consistency with the initialize method shown above.

    @Override
    public void shutdown() throws Exception {

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.

[DOC] add init/shutdown documentation

1 participant