payara / ecosystem-support

Placeholder repository to handle community requests for the Payara Platform ecosystem tools
4 stars 2 forks source link

Enhancement: make Arquillian Remote connector address and port configurable / FISH-7052 #66

Closed poikilotherm closed 1 year ago

poikilotherm commented 1 year ago

Brief Summary

When using Testcontainers to create a Payara deployment, I need to map port 8080 and 4848 to some random number assigned by Testcontainers. This is non-changeable in Testcontainers. Instead of hardwiring to read address and port from remote server, make it also overrideable via Arquillian configuration.

Expected Outcome

Enable configuration in arquillian.xml:

    <container qualifier="payara" default="true">
        <configuration>
            <property name="host">${tc.payara.host}</property>
            <property name="port">${tc.payara.http.port}</property>
            <property name="adminHost">${tc.payara.host}</property>
            <property name="adminPort">${tc.payara.admin.port}</property>
            <property name="adminUser">${tc.payara.admin.user}</property>
            <property name="adminPassword">${tc.payara.admin.pass}</property>
            <property name="adminHttps">true</property>
            <property name="ignoreCertificates">true</property>
            <property name="authorisation">true</property>
        </configuration>
    </container>

Either enable CommonPayaraConfiguration to save the additional infos, being used in PayaraClientService to built the URLs or create an extended configuration, following the schema of PayaraMicroRemoteContainerConfiguration and PayaraMicroRemoteDeployableContainer.

Current Outcome

Within PayaraClientService#L337 the address and port are hardcoded to be retrieved from the remote end.

Arquillian cannot reach the servlet as a result - the random port 32790 is not transfered:

WARNING: Configuration contain properties not supported by the backing object fish.payara.arquillian.container.payara.CommonPayaraConfiguration
Unused property entries: {port=32790, host=localhost}
Supported property names: [debug, adminHttps, ignoreCertificates, libraries, type, target, adminUser, domain, authorisation, adminPort, properties, adminHost, adminPassword]
Caused by: java.lang.IllegalStateException: Error launching request at http://localhost:8080/ArquillianServletRunner?outputMode=serializedObject&className=edu.harvard.iq.dataverse.arquillian.mail.MailSessionProducerIT&methodName=run. No result returned

Context

This works with Wildfly. Used this in a related experiment.

Ecosystem Tool

Arquillian Connectors

poikilotherm commented 1 year ago

I am willing and able to create a pull request for this. Please let me know what you think. If you are interested, what would be an ETA for reviewing and accepting the PR as well as cutting a new release?

@kiview this might be of interest for you :smile:

JamesHillyard commented 1 year ago

Hi @poikilotherm,

I would strongly recommend making a PR for this enhancement as you said you are willing and able to, we would much appreciate your contribution and will greatly speed up the time to get this enhancement available for you. While we can't provide an exact ETA, after a PR has been created a member of our engineering team will aim to have this reviewed and released shortly after.

Thanks, James

poikilotherm commented 1 year ago

Hi @JamesHillyard,

thanks for coming back to me. I just created payara/ecosystem-arquillian-connectors#214.

Crossing fingers this gets merged and released soon! :crossed_fingers:

JamesHillyard commented 1 year ago

Hi @poikilotherm,

Thank you very much for creating a PR to address this, I have raised the internal issue FISH-7052 to test, review, merge and release these changes which should be picked up shortly, your continued patience until then is much appreciated.

Best Regards, James