question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect type for `script_env`?

See original GitHub issue

I want to pass through the SETUPTOOLS_SCM_PRETEND_VERSION env var to the build so tried specifying it in the build.script_env section:

build:
  number: 0
  script: $PYTHON -m pip install . -vv
  script_env:
    - SETUPTOOLS_SCM_PRETEND_VERSION

However, it seems that boa doesn’t allow this:

Recipe validation error

['SETUPTOOLS_SCM_PRETEND_VERSION'] is not of type 'object'

Failed validating 'type' in 
schema['properties']['build']['properties']['script_env']:
    {'additionalProperties': {'type': 'string'},
     'title': 'Script Env',
     'type': 'object'}

On instance['build']['script_env']:
    ['SETUPTOOLS_SCM_PRETEND_VERSION']

Recipe validation not OK. This is currently ignored.

IIUC this should be allowed? https://docs.conda.io/projects/conda-build/en/latest/user-guide/environment-variables.html#inherited-environment-variables

It appears that boa expects this to be a key/value mapping instead of an array of names whose values will be set from the calling environment.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
dhirschfeldcommented, Oct 10, 2022

What do you think?

Having the type be an array of string where some strings may be encoded key/value pairs is a bit icky. You could maybe split it into e.g. env.inject and env.pass_through but maybe at that point it’s easier to just inject the environ into the context as discussed in #273.

I think I’d be in favour of injecting the environ as it’s a more general solution and would allow me to solve 2 issues I’m facing - this one (passing through env vars) and also injecting the version into the recipe.

0reactions
dhirschfeldcommented, Oct 13, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

The syntax of the command is incorrect TYPE command
I am trying to run a script that fails. I have isolated the problem to a simple TYPE command. Here ...
Read more >
v1.19.3+k3s2 doesn't work on a vagrant box as simple and ...
I have same problem. I reboot my vm and make k3s restart indefinitely. I think this is ntp time sync conflict with vm...
Read more >
Bash@3 - Bash v3 task | Microsoft Learn
Bash v3 # Run a Bash script on macOS, Linux, or Windows. - task: Bash@3 inputs: #targetType: 'filePath' # 'filePath' | 'inline'. Type....
Read more >
Invalid variables validation in .gitlab-ci.yml (#15338) · Issues
While validating variables map, integer values should be treated as strings. For example: variables: VARIABLE_10: 10 test1: script: - env.
Read more >
Customizing the Build - Travis CI Docs
git: depth: false. YAML. Some operations on the repository, such as common automated code review scripts (e.g. Pronto for Ruby), may fail due...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found