Upgrade to RAML Module Builder 33.x

Description

As part of 2021 R2 it is necessary to upgrade all modules based upon RAML Module Builder to the official version, 33.x

This also includes

  • moving the tests to use test containers for PostgreSQL instead of embedded postgreSQL

Links
Upgrade guide

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Marc Johnson June 19, 2021 at 4:51 PM
Edited

I decided to do a bit more work on this. I finished off the porting of the code to use the WebClient.

I also found that some of the tests no longer worked because RAML Module Builder no longer generates an equals method for classes that checks each property.

And the build failed due to some missing dependencies (which I think you might have also fixed).

There is a lot more code improvement needed, e.g. changing how the web client is created so that there is only a single instance for the whole verticle (otherwise connections will likely leak). I think this (and other improvements) should be done as separate changes.

I've pushed a branch with my work combined with your work in upgrading the module to RMB 33.x.

I suggest continuing the work from this combined work. I hope that is ok.

Also, I suggest merging the fixes that is working on in this module before this work. That should make it simpler to back port them to older versions of the module, as they are needed for 2021 R1 Hot Fix 3.

cc:

Marc Johnson June 18, 2021 at 4:51 PM

I've spent most of the day working on this. Having done that, I can very much understanding why this work has been challenging. To try to understand it, I needed to start from scratch and try to make small changes to remove the reliance on the RMB HTTP client.

I've pushed a branch with my work.

Things I discovered that made this work challenging:

  • The use of the RMB HTTP client is spread across a few places, making it harder to remove easily

  • Some of the tests check the responses against static files, upgrading RMB and vert.x caused the date-time formatting to change, leading to some of these tests breaking (I corrected these in one of my early commits)

  • The tests in PatronResourceImplTest rely on a fake HTTP server that matches requests

  • That matching relies on the specific order of query string parameters which break when using Web Client as they will be in a different order (some of my later commits change this to be more accommodating). This can cause the tests not to finish executing (when debugging this, I add a timeout to the web client and a `exceptionally` to the future that I can put a break point on)

I haven't integrated it with your work as there are still some uses of the RMB HTTP client to remove. I hope some of it is helpful (even if you don't include it in your work).

If you do take on my branch. Here are my suggestions for next steps:

  • Work through the remaining uses of LookupUtils.getHttpClient

  • Introduce a LookupUtils.post method for the usages that use POST (similarly for any other HTTP methods other than get)

  • Submit these changes as a separate pull request to the changes to upgrade RMB to 33.x

Apologies for running out of time and not getting this sorted :-/

cc:

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Prokopovych

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created May 13, 2021 at 2:35 PM
Updated July 6, 2021 at 9:16 PM
Resolved July 6, 2021 at 11:30 AM
TestRail: Cases
TestRail: Runs