TEN-framework / TEN-framework/ten-framework

If environment variable does not exist, the value of property using this environment should not be NULL.

Open
#731 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ten-framework
Dominant language
Python
Stars
11.1k
Forks
1.4k
Avg merge
2d 15m
Merged PRs (30d)
22

Description

Extension might uses the environment variable as the value of property, ex:

"property": {
      "api_key": "${env:BING_API_KEY}"
 }

If the environment variable does not exist, the ten_value_t bound to this property is TEN_TYPE_NULL.

  • Call get_property_string() from Python, PyUnicode_FromString will be crashed if the value is NULL.
  • Schema conversion will be failed if the value type is TEN_TYPE_NULL.

It's better to set the default value to an empty string rather than NULL if the environment does not exist.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing environment-variable property resolution, then inspect the get_property_string() Python entry point and schema conversion path mentioned in the issue. The change is complete when a missing environment variable resolves to an empty string rather than TEN_TYPE_NULL, without crashing Python conversion or failing schema conversion.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.