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

Change documentation for CONTEXT environment variables #5585

Closed
npitsillos opened this issue Jan 9, 2023 · 2 comments
Closed

Change documentation for CONTEXT environment variables #5585

npitsillos opened this issue Jan 9, 2023 · 2 comments
Labels
area/docs This issue/PR affects the docs Stale

Comments

@npitsillos
Copy link
Contributor

Describe your proposal/problem

The docs don't specify how to use context variables in a flow yaml.

It should be made clear that when defining a flow using the YAML specification VALUE_A & VALUE_B should appear in the env key.


Flow.yml

jtype: Flow
executors:
  - name: executor1
    uses: executor1/config.yml
    env:
      VALUE_A: 123
      VALUE_B: hello
    uses_with:
      var_a: ${{ CONTEXT.VALUE_A }}
      var_b: ${{ CONTEXT.VALUE_B }}
@npitsillos npitsillos added the area/docs This issue/PR affects the docs label Jan 9, 2023
@npitsillos
Copy link
Contributor Author

Looking at some of jcloud's integration tests the use of ${{ VAR_NAME }} or ${{ CONTEXT.VAR_NAME }} refers to the case of reading the value of the variable from a .env file. Whereas the use of ${{ ENV.VAR_NAME }} expects the var to appear in the env: clause of the yml syntax or as an environment variable.

That was the misleading part for me so maybe worth to reconcile between the two.

@jina-bot
Copy link
Member

@jina-ai/product This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs This issue/PR affects the docs Stale
Projects
None yet
Development

No branches or pull requests

2 participants