finos / waltz

Enterprise Information Service
https://waltz.finos.org
Apache License 2.0
182 stars 129 forks source link

First time download, attempting to launch with docker; getting error that gen_random_uuid() doesn't exist #7131

Open misteranderson opened 3 months ago

misteranderson commented 3 months ago

Description

I have pulled master branch, and attempted to launch docker with docker-compose up, but the container fails to start after attempting to apply liquibase changes; it mentions that gen_random_uuid() does not exist as a function. My quick research indicates that perhaps gen_random_uuid() was only added in Postgresql v 13. The dockerfile is expecting to launch postgresql v11. The database files were created with v 11, so simply updating the docker-compose.yml doesn't resolve the issue.

Waltz Version

1.62

Steps to Reproduce

  1. Clone the waltz repository
  2. open a command line prompt in the directory where the code was downloaded to
  3. use the command 'docker-compose up' as indicated in the docker/README.md file.
  4. docker obtains the images and attempts to start, however, an error is encountered and the application doesn't start. ...

Expected Result

Expected waltz to be started with an "empty" / default database, with all required liquibase changes applied, without encountering any fatal error messages.

Actual Result

Unexpected error running Liquibase: ERROR: function gen_random_uuid() does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts. Position: 60[Failed SQL: (0) UPDATE public.logical_flow SET external_id = CONCAT('LF:', gen_random_uuid()) WHERE external_id IS NULL]

misteranderson commented 3 months ago

Seems like this is probably related to https://github.com/finos/waltz/issues/7021

davidwatkins73 commented 2 months ago

Thanks for the report. I've recreated the issue and you are correct, it is related to an outdated reference to postgres (v11) in the docker-compose.yml (originally identified by @mharward-gr).

I've updated to the latest stable (v16) and the liquibase files are applied correctly. I'll set up some sample data and run some additional tests before contributing a patch.