Skip to content
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

Fix insights dev mode ui failing to write /hub/app/node_modules/.cache #1063

Merged
merged 2 commits into from
Nov 22, 2021

Conversation

himdel
Copy link
Collaborator

@himdel himdel commented Nov 18, 2021

swagger_ui: remove container_name to fix clashes when using DEV_IMAGE_SUFFIX:

ERROR: for swagger-ui  Cannot create container for service swagger-ui: Conflict. The container name "/swagger_ui_container" is already in use by container "ecabb771316cbcdc7310a2329ceda2e9a38680f998f45a4e3fd9332d973b1377". You have to remove (or rename) that container to be able to reuse that name.
ERROR: Encountered errors while bringing up the project.


and mount /hub/app/node_modules as tmpfs, instead of a readonly volume, to let npm write .cache to fix:

ui_1              | [webpack-cli] [Error: ENOENT: no such file or directory, mkdir '/hub/app/node_modules/.cache'] {
ui_1              |   errno: -2,
ui_1              |   code: 'ENOENT',
ui_1              |   syscall: 'mkdir',
ui_1              |   path: '/hub/app/node_modules/.cache'
ui_1              | }
ui_1              | npm ERR! code ELIFECYCLE
ui_1              | npm ERR! errno 2
ui_1              | npm ERR! ansible-hub-ui@0.1.0 start: `NODE_ENV=development webpack serve --host 0.0.0.0 --config config/insights.dev.webpack.config.js`
ui_1              | npm ERR! Exit status 2

With this, I can load https://prod.foo.redhat.com:1337/ansible/automation-hub (but not ci(502)/stage(akamai)).

(TODO for later, the menu is still a bit broken in this model; and Partners are not loading; Firefox can’t establish a connection to the server at wss://prod.foo.redhat.com:8002/ws. (no autoreload))

…_SUFFIX

    ERROR: for swagger-ui  Cannot create container for service swagger-ui: Conflict. The container name "/swagger_ui_container" is already in use by container "ecabb771316cbcdc7310a2329ceda2e9a38680f998f45a4e3fd9332d973b1377". You have to remove (or rename) that container to be able to reuse that name.
    ERROR: Encountered errors while bringing up the project.
to fix

    ui_1              | [webpack-cli] [Error: ENOENT: no such file or directory, mkdir '/hub/app/node_modules/.cache'] {
    ui_1              |   errno: -2,
    ui_1              |   code: 'ENOENT',
    ui_1              |   syscall: 'mkdir',
    ui_1              |   path: '/hub/app/node_modules/.cache'
    ui_1              | }
    ui_1              | npm ERR! code ELIFECYCLE
    ui_1              | npm ERR! errno 2
    ui_1              | npm ERR! ansible-hub-ui@0.1.0 start: `NODE_ENV=development webpack serve --host 0.0.0.0 --config config/insights.dev.webpack.config.js`
    ui_1              | npm ERR! Exit status 2

No-Issue
@himdel
Copy link
Collaborator Author

himdel commented Nov 18, 2021

Cc @jerabekjiri let me know if this works for you :)

And can you also check the other domains/beta? We may need to adjust https://github.com/ansible/galaxy_ng/wiki/Development-Setup#enable-the-ui to match..

@jerabekjiri
Copy link
Contributor

jerabekjiri commented Nov 19, 2021

@himdel it works now 👍 , only the prod.foo.redhat.com though. qa, ci, stage is not working for me, beta release is working as well, thanks

@jerabekjiri
Copy link
Contributor

Partners page is now loading with this fix #1261

@himdel himdel marked this pull request as ready for review November 19, 2021 16:41
@himdel himdel merged commit 764b7dc into ansible:master Nov 22, 2021
@himdel himdel deleted the insights-fix branch November 22, 2021 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants