-
Notifications
You must be signed in to change notification settings - Fork 33
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
docs: Nest SDK #750
docs: Nest SDK #750
Conversation
Signed-off-by: Luiz Ribeiro <[email protected]>
Signed-off-by: Luiz Ribeiro <[email protected]>
Co-authored-by: Michael Beemer <[email protected]> Signed-off-by: Luiz Guilherme Ribeiro <[email protected]>
Co-authored-by: Michael Beemer <[email protected]> Signed-off-by: Luiz Guilherme Ribeiro <[email protected]>
Co-authored-by: Michael Beemer <[email protected]> Signed-off-by: Luiz Guilherme Ribeiro <[email protected]>
@FeatureClient() private defaultClient: Client, | ||
@FeatureClient({ name: 'differentServer' }) private namedClient: Client, | ||
) { | ||
} | ||
@FeatureClient({ name: 'differentProvider' }) private namedClient: Client, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should rename this to OpenFeatureClient
before we remove the experimental
. I think just FeatureClient
is a bit disjointed, since we have tended to either add the entire "OpenFeature" prefix, or leave it off. I think OpenFeatureClient
would be best, because the client inteface is called Client
so it won't clash, and it's consistent with the equivalent in react (</OpenFeatureProvider>
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been OpenFeatureClient
before, but OpenFeatureClient
is used for the implementation of the Client
and it is also exported from the Server SDK.
We could remove the export of OpenFeatureClient
from the Web SDK, as no one should use and import this directly anyways I would say. I have seen it several times that this type was used instead of Client
in projects.
If we remove this I would be happy calling the interface OpenFeatureClient
here. What do you think @toddbaert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think @toddbaert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply - if we can remove that export, I'm fine with it! It's an improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @toddbaert, removing this should be considered a breaking change I would say.
I am not sure how we want to continue on this then. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, well, if I understand correctly, it would be technically breaking, but I think it could be argued it was a misuse. All our doc recommends using the interface.
If we want to be really strict, we could consider it a break and include it with some others I have in mind in a 2.0.0 (meaning to ask you guys about this soon... there's a small list of breaking improvements I think might be worth considering)...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should add a release version tag like this example for auto-inclusion of this SDK in docs.
You can also add a features table like this. The odd situation with this SDK and the React SDK (which I'm working on) is that they get some features "inhereted" from the associated parent SDK - so we may want to indicate that with some new symbol in the table. Any idas? @luizgribeiro @lukas-reining ?
We also don't have to settle everything in this PR. I will happily come back and add these little enhancements for doc inclusions later.
We could also "hide" the features tables entirely for these "integration-level" SDKs, since they have unique feature-sets related to their framework... we could consider some SDKs "language-sdks", and some "framework-sdks" and they could behave differently in the docs. cc @beeme1mr
Co-authored-by: Lukas Reining <[email protected]> Signed-off-by: Luiz Guilherme Ribeiro <[email protected]>
Co-authored-by: Lukas Reining <[email protected]> Signed-off-by: Luiz Guilherme Ribeiro <[email protected]>
Co-authored-by: Lukas Reining <[email protected]> Signed-off-by: Luiz Guilherme Ribeiro <[email protected]>
@toddbaert, what do you think about using something like a SDK label to make the difference between language/runtime level SDKs and framework level SDKs? We're facing this in JS right now, but will probably be a valid point in other languages and frameworks as well |
Signed-off-by: Luiz Ribeiro <[email protected]>
Signed-off-by: Lukas Reining <[email protected]>
@toddbaert yes, maybe we could give this a |
This is good, @luizgribeiro could you add this? |
Signed-off-by: Luiz Ribeiro <[email protected]>
Co-authored-by: Lukas Reining <[email protected]> Signed-off-by: Luiz Guilherme Ribeiro <[email protected]>
Co-authored-by: Lukas Reining <[email protected]> Signed-off-by: Luiz Guilherme Ribeiro <[email protected]>
Co-authored-by: Lukas Reining <[email protected]> Signed-off-by: Luiz Guilherme Ribeiro <[email protected]>
…-sdk into docs/NextSDK
Signed-off-by: Luiz Ribeiro <[email protected]>
Signed-off-by: Luiz Ribeiro <[email protected]>
I've tried to come up with a nice feature table but it ended up pretty repetitive from what we already have from the server-sdk, so I decided to remove it. In this framework integration we could use something like a "compatibility table" instead of a feature table. |
@toddbaert and I were talking about something similar for the react SDK. We'll just need to come up with a pattern for these framework specific SDKs. |
Signed-off-by: Luiz Ribeiro <[email protected]>
…-sdk into docs/NextSDK
Awesome job @luizgribeiro and @lukas-reining. |
Co-authored-by: Michael Beemer <[email protected]> Signed-off-by: Luiz Guilherme Ribeiro <[email protected]>
Co-authored-by: Michael Beemer <[email protected]> Signed-off-by: Luiz Guilherme Ribeiro <[email protected]>
Co-authored-by: Michael Beemer <[email protected]> Signed-off-by: Luiz Guilherme Ribeiro <[email protected]>
Signed-off-by: Lukas Reining <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good now @luizgribeiro!
I will merge it and we can refine more details later if needed.
🤖 I have created a release *beep* *boop* --- ## [0.0.5-experimental](nestjs-sdk-v0.0.4-experimental...nestjs-sdk-v0.0.5-experimental) (2024-01-31) ### ✨ New Features * adds ErrorOptions to Error constructor ([#765](#765)) ([2f59a9f](2f59a9f)) ### 🐛 Bug Fixes * **nest:** add peer deps for nestjs-core and rxjs 9 ([#784](#784)) ([a452bdd](a452bdd)) * removed duped core types ([#800](#800)) ([7cc1e09](7cc1e09)) ### 📚 Documentation * Nest SDK ([#750](#750)) ([a21634d](a21634d)) * update nestjs readme examples ([#787](#787)) ([c6a357a](c6a357a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: OpenFeature Bot <[email protected]>
<!-- Please use this template for your pull request. --> <!-- Please use the sections that you need and delete other sections --> ## This PR As discussed here #750 (comment), we should not export `OpenFeatureClient` from the server and web SDK. The type used outside the SDK should be `Client`, which is also used in the public APIs like `OpenFeatureApi`. The question is, if we should mark this as breaking. Technically it will break code that imports `OpenFeatureClient` instead of `Client`, but as @toddbaert said code using it could also be seen as "used wrong" while being technically fine. I am still leaning towards marking it as breaking, to be sure we are not breaking something that is technically fine, just because it is unintended use. But I could also live with non-beaking. --------- Signed-off-by: Lukas Reining <[email protected]>
<!-- Please use this template for your pull request. --> <!-- Please use the sections that you need and delete other sections --> ## This PR <!-- add the description of the PR here --> As discussed here [#750](#750 (comment)), renames `@FeatureClient` to `@OpenFeatureClient` which is possible since we merged #918. Signed-off-by: Lukas Reining <[email protected]>
This PR
Notes
I think we're probably reaching a stable point for the NestJS SDK.
It would be great to have some feedback on the docs before it.
Follow-up Tasks