jina-ai / jcloud

Simplify deploying and managing Jina projects on Jina Cloud
https://docs.jina.ai/concepts/jcloud/
Apache License 2.0
298 stars 13 forks source link

Issue when loading empty list from environment variables to flow yaml #81

Closed joschkabraun closed 2 years ago

joschkabraun commented 2 years ago

Using an empty list as environment variable causes jcloud to not use it as [] but as [None].

This is the same issue jina had: https://github.com/jina-ai/jina/issues/5142.

Command

jc deploy --env-file test.env testFlow.yml

test.env

JINA_NOW_ADMIN_EMAILS=[]

testFlow.yaml

jtype: Flow
executors:
  - name: preprocessor
    uses: jinahub+docker://NOWPreprocessor/v0.0.79-auth-exec-4
    uses_with:
      app: text_to_video
      admin_emails: ${{ ENV.JINA_NOW_ADMIN_EMAILS }}
Screenshot 2022-09-08 at 22 23 47

jina version

- jina 3.9.1
- docarray 0.16.3
- jcloud 0.0.35
- jina-hubble-sdk v0.0.0
- jina-proto 0.1.13
- protobuf 3.19.4
- proto-backend cpp
- grpcio 1.46.3
- pyyaml 6.0
- python 3.9.12
- platform Darwin
- platform-release 21.6.0
- platform-version Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:25 PDT 2022; root:xnu-8020.140.41~1/RELEASE_X86_64
- architecture x86_64
- processor i386
- uid 190070690681122
- session-id 9c8367b4-2fb4-11ed-868a-acde48001122
- uptime 2022-09-08T22:27:07.862245
- ci-vendor (unset)
- internal False
* JINA_DEFAULT_HOST (unset)
* JINA_DEFAULT_TIMEOUT_CTRL (unset)
* JINA_DEPLOYMENT_NAME (unset)
* JINA_DISABLE_UVLOOP (unset)
* JINA_EARLY_STOP (unset)
* JINA_FULL_CLI (unset)
* JINA_GATEWAY_IMAGE (unset)
* JINA_GRPC_RECV_BYTES (unset)
* JINA_GRPC_SEND_BYTES (unset)
* JINA_HUB_NO_IMAGE_REBUILD (unset)
* JINA_LOG_CONFIG (unset)
* JINA_LOG_LEVEL (unset)
* JINA_LOG_NO_COLOR (unset)
* JINA_MP_START_METHOD (unset)
* JINA_OPTOUT_TELEMETRY (unset)
* JINA_RANDOM_PORT_MAX (unset)
* JINA_RANDOM_PORT_MIN (unset)
joschkabraun commented 2 years ago

Fixed by: https://github.com/jina-ai/wolf/pull/337