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

Results of onUpload.exec.command not rendering in the terminal #2863

Open
cheslijones opened this issue Jun 5, 2024 · 1 comment
Open

Results of onUpload.exec.command not rendering in the terminal #2863

cheslijones opened this issue Jun 5, 2024 · 1 comment
Labels
kind/bug Something isn't working

Comments

@cheslijones
Copy link

What happened?
Trying to run pytest and coverage, and display the results in terminal using onUpload.exec.command.

This is probably just user error. I've asked about it on SO.

What did you expect to happen instead?
That it would display the results, but it does not. You see the command being run, but no results displayed in the terminal.

How can we reproduce the bug? (as minimally and precisely as possible)
It isn't a "problem" unique to pytest or coverage, but getting most types of feedback from the container in the terminal. The easiest way to reproduce it is any of the following:

dev:
  sync:
    ...
    onUpload:
      exec:
      - command: ls
# or 
    onUpload:
      exec:
      - command: bash -c "ls"
 # or 
    onUpload:
      exec:
      - command: kubectl exec -it pod-0 -- ls
        local: true
# or
    onUpload:
      exec:
      - command: kubectl exec -it pod-0 -- bash -c "ls"
        local: true

In each case you'll see the command being run, but not the results:

[api-ut] Upstream - Successfully processed 1 change(s)
[api-ut] Upstream - Execute command 'ls'
[api-ut] Upstream - Done executing command

My devspace.yaml:

version: v1beta11
...
images:
  api-ut:
    image: ${APP_NAME}/${API_DEV}-ut
    dockerfile: ${API}/docker/Dockerfile
    context: ${API}/
    build:
      buildKit:
        args: 
          - "--progress=plain"
        options:
          target: unit-tests
...
deployments:
  - name: ${API}-ut
    helm:
      componentChart: true
      values:
        containers:
          - image: ${APP_NAME}/${API_DEV}-ut
        service:
          ports:
            - port: 5001
...
dev:
  sync:
    - name: ${API}-ut
      imageSelector: ${APP_NAME}/${API_DEV}-ut
      localSubPath: ./${API}
      excludeFile: .dockerignore
      waitInitialSync: true
      onUpload:
        exec:
          - command: coverage run --omit='src/manage.py,src/config/*,*/.venv/*,*/*__init__.py,*/tests.py,*/admin.py,*/migrations/*,*/apps.py' -m pytest -m=ut

Local Environment:

  • DevSpace Version: 5.18.5
  • Operating System: mac
  • ARCH of the OS: ARM64
    Kubernetes Cluster:
  • Cloud Provider: azure, but this is a local dev issue using docker-desktop
  • Kubernetes Version:
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.1", GitCommit:"3ddd0f45aa91e2f30c70734b175631bec5b5825a", GitTreeState:"clean", BuildDate:"2022-05-24T12:17:11Z", GoVersion:"go1.18.2", Compiler:"gc", Platform:"darwin/arm64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.4", GitCommit:"872a965c6c6526caa949f0c6ac028ef7aff3fb78", GitTreeState:"clean", BuildDate:"2022-11-09T13:29:58Z", GoVersion:"go1.19.3", Compiler:"gc", Platform:"linux/arm64"}

Anything else we need to know?
That should cover it. More than likely something I'm doing wrong.

@cheslijones cheslijones added the kind/bug Something isn't working label Jun 5, 2024
@marcm-ml
Copy link

marcm-ml commented Jul 9, 2024

you should be able to see the output in the devspace logs afaik, e,g. in one of the files in $CWD/.devspace/logs. Atleast that was the case last time I've used onUpload functionality.

Im not aware of an option that the output is printed to the terminal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants