-
Notifications
You must be signed in to change notification settings - Fork 22
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
Enable configuration of clients independent of local environment. #202
Comments
@hgo-ds we have some questions regarding this request:
is the Problem, that we use the local profile in a way that we use ist to mock or test topics? |
Tasks
|
As we do not use profiles at all, there is currently no impact on trace-x. Either way the provided suggestion would not cause any issues. |
My rough suggestion would be to completely remove the use of "local" profiles etc. in the code and to establish a dedicated feature flag for the desired function, e.g. "enableDigitalTwinRegistryClientStub", preferably with a meaningful default value. These feature flags are added as properties to the respective application.yaml files as required and can therefore be used independently of the respective profile. Implementation in the code then with @ConditionalOnProperty on the bean that you want to activate here. -- This does not prevent the use of profiles in the Spring environment, on the contrary, the configuration of the respective features is only lifted or collected in a central location (.yaml file) and the user has all the freedom independent of the configured profile. This would be a relief IMHO, especially for libraries that are used in third-party applications. Translated with www.DeepL.com/Translator (free version) |
@jzbmw My detail thoughts are covered here #202 (comment) |
Due to the @Profile-IRS fuzziness, however, we are unfortunately not able to start a "real" TRX in the local environment with profile local (and the associated configuration via application-local.yaml) as the DigitalTwinRegistryClientLocalStub is then instantiated in the IRS instead of the DigitalTwinRegistryClientImpl, for example. |
Planning 2
|
…m DigitalTwinRegistryClientLocalStub in registry-client and moved bean creation to irs-api
…rofile from irs-registry-client
…tion-of-clients-independent-of-local-environment feat(irs-registry-client-irs-api):[#202] removed auto-detect bean from DigitalTwinRegistryClientLocalStub in registry-client and moved bean creation to irs-api
@hgo-ds Hello |
…istry-client-version feat(irs-registry-client):[#202] increased irs registry client version
Thanks @ds-psosnowski for providing the fix. Unfortunately, it's not released yet. https://repo1.maven.org/maven2/org/eclipse/tractusx/irs/irs-registry-client/ Only available in Repo: First tests with release 1.5.0-SNAPSHOT where fine so far. What is the timetable for the release of the artifact? |
Hi @hgo-ds |
This is looking very fine now, thanks for support @ds-jhartmann. Tests are in progress. |
chore(charts):[-] Add missing /models segment to semantics hub url
As a consumer of the IRS registry client library
org.eclipse.tractusx.irs:irs-registry-client
I want to be able to setup Clients which are part of the IRS-Library independent of the configured Spring-Profile,
so that using IRS registry client library in a local setup can be configured as in real deployment and can connect to a real or mocked service.
Hints / Details
@Profile("local")
initem-relationship-service/irs-registry-client/src/main/java/org/eclipse/tractusx/irs/registryclient/central/DigitalTwinRegistryClientLocalStub.java
Line 40 in 4bb7276
prevents configuring
org.eclipse.tractusx.irs.semanticshub.DigitalTwinRegistryClient
against an external service in environments declared as local.See https://github.com/search?q=repo%3Aeclipse-tractusx%2Fitem-relationship-service%20%40profile&type=code for possible occurrences.
Consider removing all
@Profile("local")
from the code and replacing them with clearly defined feature flags that can be controlled from the application configuration.Outcome / Acceptance Criteria
The text was updated successfully, but these errors were encountered: