-
Notifications
You must be signed in to change notification settings - Fork 144
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
MicroProfile Config 3.0 Support #23807
Commits on Jun 10, 2022
-
This change creates a MP Config TCK runner module to run the TCK against a managed instance of Glassfish. There are existing dependency issues, which means there are a decent proportion of tests that don't run correctly. At this point it's fine to test that the basic deployment of MP Config apps works as expected. Each MP TCK module will have its own instance of Glassfish, but will be passed a common arquillian.xml. The TCK requires a Weld impl to run due to the Arquillian CDI enricher. Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 54224df - Browse repository at this point
Copy the full SHA 54224dfView commit details -
This change implements Smallrye Config as a GF container. Currently Smallrye config and common are packaged together. If other Smallrye libraries are used elsewhere, the common library should be separated out into its own bundle. Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 636a5d9 - Browse repository at this point
Copy the full SHA 636a5d9View commit details -
Enable MP Config for archives using it statically
Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 323eaa1 - Browse repository at this point
Copy the full SHA 323eaa1View commit details -
The sniffer can now exit early without type scanning if the archive contains a microprofile-config.properties in the correct location. Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 2746774 - Browse repository at this point
Copy the full SHA 2746774View commit details -
Add MP Config TCK Arquillian extension
Hamcrest isn't loaded with the applications by default, despite the deployed applications requiring it. This change adds an Arquillian extension to deploy a Hamcrest dependency with the apps. Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for d97cd76 - Browse repository at this point
Copy the full SHA d97cd76View commit details -
Replace beans.xml files in MP Config TCK
The TCK wrongly assumes that, like in CDI versions <4, the 'all' bean discovery mode is assumed. GlassFish is now CDI 4.0 compliant, which means that the 'all' bean discovery mode now needs to be manually specified. To fix this, the arquillian extension now replaces the beans.xml files with custom versions. This will need modifying if the TCK contains any meaningful beans.xml tests. Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 8c8d297 - Browse repository at this point
Copy the full SHA 8c8d297View commit details -
Cast GlassfishClientExceptions to expected exception type
When using managed and remote clients, the Arquillian GF connectors throw each deployment exception as a GlassfishClientException, with the body of the actual exception. For the TCK to expect a certain exception type, we need an extension to interpret the response as the correct type. This change adds an extension to convert the "CDI deployment failure" responses to jakarta namespaced DeploymentExceptions, as the server produces. Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 1c64ee3 - Browse repository at this point
Copy the full SHA 1c64ee3View commit details -
Refactor Arquillian extensions
This change separated the Arquillian extension behaviours into their own separate classes for readability. Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 3371eba - Browse repository at this point
Copy the full SHA 3371ebaView commit details -
Configure the required container system properties
System properties should ideally be configured via the arquillian container. This isn't possible via the official managed extension, so a workaround is needed. The options were either to configure it via a remote Arquillian extension (which doesn't currently work as Smallrye initialises its config sources before these extensions run), or to run a new test which sets it up. This change creates a new test purely to setup the container programmatically. Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 0126d43 - Browse repository at this point
Copy the full SHA 0126d43View commit details -
Modify non-testable TCK deployments
The MP TCK uses ShouldThrowException to check some deployment failures. By default, Arquillian will not apply the extension services to those deployments. The beans.xml processor is still required in some cases though, to force the container to create bean deployments for the app. This change applies the processer during the BeforeDeploy event when the archive is non testable. Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for e5ff39d - Browse repository at this point
Copy the full SHA e5ff39dView commit details -
Fix Arquillian beans xml transformer
A beans.xml file appears in the TCK deployments in WEB-INF as well as META-INF. This change adds the WEB-INF directory to the extension. Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 1274b52 - Browse repository at this point
Copy the full SHA 1274b52View commit details -
Enable multi-release Smallrye classes
The OSGI bundle plugin was importing the classes directly based on package. This was a problem, as Smallrye has multi-release JARs which wouldn't have their versioned classes imported. This change adds the Multi-Release instruction to the manifest, as well as imports the Smallrye versioned classes to allow JDK9 compatibility. Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 2e8d7a2 - Browse repository at this point
Copy the full SHA 2e8d7a2View commit details -
Allow sniffers to scan annotated parameters
MicroProfile annotations are allowed to be injected into method parameters, but the sniffer code currently tries to cast the parameter to a member (i.e. field or method), which causes a ClassCastException. This change modifies the sniffer code to allow the sniffer to find the class containing the parameter annotation. Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for e7f530f - Browse repository at this point
Copy the full SHA e7f530fView commit details -
Helidon may be a better fit in the long term for GlassFish. The OSGI includes have been trimmed as much as possible to reduce bundle size, and unnecessary OSGI instructions have been removed. Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 45816fa - Browse repository at this point
Copy the full SHA 45816faView commit details -
Prevent Helidon microprofile-config.properties caching
Smallrye used a custom file loading mechanism that doesn't have this bug. Since Helidon config uses JarURLConnection to load the microprofile-config.properties file, applications with the same name will return the same cached file contents. Disabling it server-wide would be a big performance hit, so instead this fix disables the cache during the config provider initialisation, and then returns it to the default behaviour. This shouldn't cause performance problems as I expect the file to only be read from the same archive once. Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 3595905 - Browse repository at this point
Copy the full SHA 3595905View commit details -
The config converter to convert config properties to application classes was broken, as the implementation was using the server classloader (for GF this is a bundle classloader). Thankfully Helidon discovers converters using the ServiceLoader, so this change overwrites the default with a class converter that uses the webapp classloader Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 2b09c7a - Browse repository at this point
Copy the full SHA 2b09c7aView commit details -
Fix deployment exception transformer
Helidon config causes some deployment errors to present as a "CDI definition failure", rather than a "CDI deployment failure". The Arquillian extension to transform exceptions has been made more generic to allow this. Signed-off-by: Matthew Gill <matthew.gill@live.co.uk>
Configuration menu - View commit details
-
Copy full SHA for b56317a - Browse repository at this point
Copy the full SHA b56317aView commit details