deploy-webapp command fails #876

Closed
opened 2024-07-19 15:28:08 +00:00 by zramsay · 4 comments
Member

e.g.,

laconic-so deploy-webapp create --kube-config ~/home/so/.kube/config-default.yaml --image-registry container-registry.pwa.realitynetwork.xyz --deployment-dir webapp-k8s-deployment --image cerc/test-progressive-web-app:local --url https://my-test-app.pwa.realitynetwork.xyz --env-file cerc/test-progressive-web-app/.env

fails with

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/mito/bin/laconic-so/__main__.py", line 3, in <module>
  File "/Users/mito/bin/laconic-so/_bootstrap/__init__.py", line 253, in bootstrap
  File "/Users/mito/bin/laconic-so/_bootstrap/__init__.py", line 38, in run
  File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/stack_orchestrator/deploy/webapp/deploy_webapp.py", line 123, in create
    return create_deployment(ctx, deployment_dir, image, url, kube_config, image_registry, env_file)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/stack_orchestrator/deploy/webapp/deploy_webapp.py", line 74, in create_deployment
    deploy_command_context: DeployCommandContext = create_deploy_context(
                                                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/stack_orchestrator/deploy/deploy.py", line 87, in create_deploy_context
    cluster_context = _make_cluster_context(global_context, stack, include, exclude, cluster, env_file)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/stack_orchestrator/deploy/deploy.py", line 288, in _make_cluster_context
    deployment = stack_is_in_deployment(stack)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/stack_orchestrator/util.py", line 200, in stack_is_in_deployment
    return stack.joinpath(deployment_file_name).exists()
           ^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'joinpath'
e.g., ``` laconic-so deploy-webapp create --kube-config ~/home/so/.kube/config-default.yaml --image-registry container-registry.pwa.realitynetwork.xyz --deployment-dir webapp-k8s-deployment --image cerc/test-progressive-web-app:local --url https://my-test-app.pwa.realitynetwork.xyz --env-file cerc/test-progressive-web-app/.env ``` fails with ``` Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/Users/mito/bin/laconic-so/__main__.py", line 3, in <module> File "/Users/mito/bin/laconic-so/_bootstrap/__init__.py", line 253, in bootstrap File "/Users/mito/bin/laconic-so/_bootstrap/__init__.py", line 38, in run File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/click/decorators.py", line 33, in new_func return f(get_current_context(), *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/stack_orchestrator/deploy/webapp/deploy_webapp.py", line 123, in create return create_deployment(ctx, deployment_dir, image, url, kube_config, image_registry, env_file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/stack_orchestrator/deploy/webapp/deploy_webapp.py", line 74, in create_deployment deploy_command_context: DeployCommandContext = create_deploy_context( ^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/stack_orchestrator/deploy/deploy.py", line 87, in create_deploy_context cluster_context = _make_cluster_context(global_context, stack, include, exclude, cluster, env_file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/stack_orchestrator/deploy/deploy.py", line 288, in _make_cluster_context deployment = stack_is_in_deployment(stack) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mito/.shiv/laconic-so_7c29249d7da611fca2021cee35972aeedd8cbdad7b26a2796276a75ff1fc60ba/site-packages/stack_orchestrator/util.py", line 200, in stack_is_in_deployment return stack.joinpath(deployment_file_name).exists() ^^^^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'joinpath' ```
Owner

Need to determine why the test didn't catch this.

Need to determine why [the test](https://git.vdb.to/cerc-io/stack-orchestrator/src/branch/main/tests/webapp-test/run-webapp-test.sh) didn't catch this.
dboreham self-assigned this 2024-07-19 15:48:32 +00:00
Owner

Proposed fix, added test: #877

Proposed fix, added test: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/877
Owner

Should be fixed now, please re-test.

Should be fixed now, please re-test.
Author
Member

yes, thank you

yes, thank you
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/stack-orchestrator#876
No description provided.