-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(service-discovery): Align service discovery with API service #2459
Merged
Conversation
This file contains 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
🦋 Changeset detectedLatest commit: 4a6affc The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
github-actions
bot
added
👾 React
💾 CLI
fusion framework CLI
📚 documentation
Improvements or additions to documentation
🚀 feature
New feature or request
🧬 Modules
labels
Sep 13, 2024
- adjust interfaces for api service - replace configurator to extends BaseConfigBuilder - update api client BREAKING CHANGES: - new configuration methods - services resolves to `Services` and not `Environment` - read changelog
…hentication scopes
…ice discovery module - add fallback for clientId - fix return handling of `resolveServices` BREAKING CHANGES: now requires `@equinor/fusion-framework-module-service-discovery^8`
- Update the baseUri in the service discovery client configuration to use the current URL with the '/_discovery/environments/current' path. - Update the defaultScopes in the service discovery client configuration to include the '5a842df8-3238-415d-b168-9f16a6a6031b/.default' scope. - Refactor the createDevProxy function in dev-proxy.ts to modify the response services. - Set the environmentName to 'DEVELOPMENT' in the response object. - Filter out the 'app' service from the response services. - Add a new service object for the 'app' service with the uri set to the current URL and the scopes set to the clientId + '/.default'.
odinr
force-pushed
the
feat/module-service-discovery/rewrite-to-new-api
branch
2 times, most recently
from
September 13, 2024 10:28
2da73ef
to
4a6affc
Compare
@terjebra could you check api-schema i know that allot of the properties are not optional in the api model, but i only need |
eikeland
requested changes
Sep 13, 2024
eikeland
approved these changes
Sep 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
💾 CLI
fusion framework CLI
📚 documentation
Improvements or additions to documentation
🚀 feature
New feature or request
🧬 Modules
👾 React
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.
The Service Discovery module has been totally revamped to provide a more flexible and robust solution for service discovery in the Fusion Framework.
The module now relies on the Fusion Service Discovery API to fetch services and their configurations, which allows for more dynamic and real-time service discovery.
The module now follows the "best practices" for configuration and usage, and it is now easier to configure and use the Service Discovery module in your applications. But this also means that the module has breaking changes that may require updates to existing implementations.
Note
This module can still be configured to resolve custom services, as long as the client implements the
IServiceDiscoveryClient
interface.Documentation Updates
Code Changes:
zod
as a new dependency for schema validation.ServiceProviderClient
serviceResponseSelector
for parsing and validating client respons.IServiceDiscoveryClient
interface to include methods for resolving services and fetching services from the API.ServiceDiscoveryClient
to use the newserviceResponseSelector
ServiceDiscoveryConfigurator
to extend theBaseConfigBuilder
BREAKING CHANGES:
Service
has deprecated thedefaultScopes
property in favor ofscopes
.IServiceDiscoveryClient
interface has been updated, which may require changes in implementations that use this interface.ServiceDiscoveryConfigurator
now extendsBaseConfigBuilder
, which will affect existing configurations.ServiceDiscoveryProvider.resolveServices
method now returnsService[]
(previouslyEnvironment
).Note
Only the
ServiceDiscoveryProvider.resolveServices
should affect end-users,as it changes the return type of the method.
The other changes are internal and should not affect existing implementations.
Consumer Migration Guide:
defaultScopes
has been replaced withscopes
in theService
type. Update your code to use the new property.If you are using the
ServiceDiscoveryProvider.resolveServices
method, update your code to expect an array ofService
objects instead of anEnvironment
object.Warning
The preious
Environment
object had aclientId
property, which is now removed, since every service can have its own client id, hence thescopes
property in theService
object.Configuration Migration Guide:
If you are manually enabling the Service Discovery module, update your configuration to use the new methods provided by
ServiceDiscoveryConfigurator
.Refer to the updated README for detailed configuration examples and usage patterns.
Warning
The
ServiceDiscoveryConfigurator
now extendsBaseConfigBuilder
, which means that the configuration methods have changed.