UI Fails to load in galaxy_ng dev environment

I’m setting up galaxy_ng in a dev environment for the first time, following steps in the docs as outlined in dev/getting_started.

After checking out the ansible-hub-ui repo, running make scripts and starting with ./compose up, I see a fatal error in the UI container:

ui_1           | > ansible-hub-ui@0.1.0 start-standalone
ui_1           | > NODE_ENV=development webpack serve --host 0.0.0.0 --config config/standalone.dev.webpack.config.js
ui_1           |
ui_1           | fatal: detected dubious ownership in repository at '/hub/app'
ui_1           | To add an exception for this directory, call:
ui_1           |
ui_1           | 	git config --global --add safe.directory /hub/app
ui_1           | [webpack-cli] Failed to load '/hub/app/config/standalone.dev.webpack.config.js' config
ui_1           | [webpack-cli] Error: Command failed: git rev-parse HEAD
ui_1           | fatal: detected dubious ownership in repository at '/hub/app'
ui_1           | To add an exception for this directory, call:
ui_1           |
ui_1           | 	git config --global --add safe.directory /hub/app
ui_1           |
ui_1           |     at checkExecSyncError (node:child_process:890:11)
ui_1           |     at execSync (node:child_process:962:15)
ui_1           |     at Object.<anonymous> (/hub/app/config/webpack.base.config.js:20:3)
ui_1           |     at Module._compile (node:internal/modules/cjs/loader:1356:14)
ui_1           |     at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
ui_1           |     at Module.load (node:internal/modules/cjs/loader:1197:32)
ui_1           |     at Module._load (node:internal/modules/cjs/loader:1013:12)
ui_1           |     at Module.require (node:internal/modules/cjs/loader:1225:19)
ui_1           |     at require (node:internal/modules/helpers:177:18) {
ui_1           |   status: 128,
ui_1           |   signal: null,
ui_1           |   output: [
ui_1           |     null,
ui_1           |     '',
ui_1           |     "fatal: detected dubious ownership in repository at '/hub/app'\n" +
ui_1           |       'To add an exception for this directory, call:\n' +
ui_1           |       '\n' +
ui_1           |       '\tgit config --global --add safe.directory /hub/app\n'
ui_1           |   ],
ui_1           |   pid: 26,
ui_1           |   stdout: '',
ui_1           |   stderr: "fatal: detected dubious ownership in repository at '/hub/app'\n" +
ui_1           |     'To add an exception for this directory, call:\n' +
ui_1           |     '\n' +
ui_1           |     '\tgit config --global --add safe.directory /hub/app\n'
ui_1           | }
galaxy_ng_ui_1 exited with code 2

This renders the UI unreachable. What can I do to get the UI up?

Try setting HUB_UI_VERSION=whatever in the compose environment, that should prevent webpack from trying to run git.

(Or you can comment out the ANSIBLE_HUB_UI_PATH in .compose.env and run the UI outside the container, API_BASE_PATH="/api/galaxy_ng/" npm run start-standalone.)

Thanks! I made this change:

HUB_UI_VERSION='4.9.0'
# and also
ANSIBLE_HUB_UI_VERSION='4.9.0'

However that didn’t seem to work, the ui container still tries to spin up with 0.1.0. I also tried setting the env to ANSIBLE_HUB_UI_VERSION with the same result.

I’m trying to find the ui container in a compose file to see what exactly is going on, but I don’t see it in dev/

Ok, so I think the compose file for the ui is in dev/common/docker-compose-ui.yaml, which doesn’t use a HUB_UI_VERSION env. Not sure where to proceed from here

I would suggest following the current dev development docs instead: OCI Env Environment - Galaxy NG