Skip to content
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

Feature: Add config parameter for ProviderGatewayController context registration #796

Conversation

bcronin90
Copy link
Contributor

WHAT

Adds an optional setting to specify a jetty context into which to register the ProviderGatewayController.

WHY

365

FURTHER NOTES

I don't know whether this is actually the correct approach.

Closes #365

@wolf4ood
Copy link
Contributor

I would do mostly like the upstream management configuration does

https://github.com/eclipse-edc/Connector/blob/main/extensions/common/api/management-api-configuration/src/main/java/org/eclipse/edc/connector/api/management/configuration/ManagementApiConfigurationExtension.java

The important bit is .useDefaultContext(true) on WebServiceSettings.Builder which make it register to the default context if the context config key is not found, and it will make it backward compatible if no configuration is provided.

Let me know if this helps

@bcronin90 bcronin90 force-pushed the fix/improve-providergatewaycontroller-registration branch from fb76b4f to b7bf704 Compare September 28, 2023 06:23
@bcronin90 bcronin90 force-pushed the fix/improve-providergatewaycontroller-registration branch from b7bf704 to 58f254c Compare October 9, 2023 10:39
@bcronin90
Copy link
Contributor Author

I would do mostly like the upstream management configuration does

https://github.com/eclipse-edc/Connector/blob/main/extensions/common/api/management-api-configuration/src/main/java/org/eclipse/edc/connector/api/management/configuration/ManagementApiConfigurationExtension.java

The important bit is .useDefaultContext(true) on WebServiceSettings.Builder which make it register to the default context if the context config key is not found, and it will make it backward compatible if no configuration is provided.

Let me know if this helps

The problem there is that iirc we don't really have defaults for port and path. We just check whether they're provided and if they are not, we just like let the WebService handle things.

Signed-off-by: Brendan Cronin <brendan.cronin@mercedes-benz.com>
Signed-off-by: Brendan Cronin <brendan.cronin@mercedes-benz.com>
Signed-off-by: Brendan Cronin <brendan.cronin@mercedes-benz.com>
@bcronin90 bcronin90 force-pushed the fix/improve-providergatewaycontroller-registration branch from 6e21edd to 87e9686 Compare October 18, 2023 07:19
@sonarcloud
Copy link

sonarcloud bot commented Oct 18, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@paullatzelsperger
Copy link
Contributor

removed my review, since @wolf4ood already commented.

@wolf4ood wolf4ood merged commit b505baa into eclipse-tractusx:main Oct 20, 2023
25 checks passed
@wolf4ood
Copy link
Contributor

Thanks @bcronin90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

Improve context registration of the ProviderGatewayController
3 participants