Skip to content

Update json schema to the actual parameters of script_env #574

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

Merged
merged 2 commits into from
Nov 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -88,35 +88,24 @@
},

"shell_param_type": {
"description": "All parameters must be valid shell variable names, else use shell_env_params_mapping.",
"description": "All parameters must be valid shell variable names, else use shell_env_params_rename.",
"type": "string",
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]+$"
},
"shell_env_params_config": {
"type": "object",
"properties": {
"shell_env_params_match": {
"description": "A list of regexes to match against the environment parameters. All matches will be exposed to shell commands as environment variables.",
"type": "array",
"items": {
"type": "string",
"format": "regex",
"examples": [
"^MLOS_[a-zA-Z0-9_]+$"
]
}
},
"shell_env_params": {
"description": "An explicit list of parameters (and their values) to pass to the shell as environment variables. These will override any parameters matched by shell_env_params_match.",
"description": "An explicit list of parameters (and their values) to pass to the shell as environment variables.",
"type": "array",
"items": {
"$ref": "#/$defs/shell_param_type"
},
"uniqueItems": true,
"minItems": 1
},
"shell_env_params_mapping": {
"description": "An explicit mapping of environment variable names from params to be populated with the parameter values and passed to the shell commands. These will override any parameters matched by shell_env_params_match.",
"shell_env_params_rename": {
"description": "An explicit mapping of environment variable names from params to be populated with the parameter values and passed to the shell commands.",
"type": "object",
"propertyNames": {
"$ref": "#/$defs/shell_param_type"
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
"run": [
"/bin/true"
],
"shell_env_params_mapping": {
"shell_env_params_rename": {
"invalid.target.name": "/source/param/name"
}
}
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
"run": [
"/bin/true"
],
"shell_env_params_mapping": {
"shell_env_params_rename": {
"source_param_num_invalid": 0,
"source_param_bool_invalid": true,
"source_param_null_invalid": null,
Original file line number Diff line number Diff line change
@@ -34,13 +34,10 @@
"read_results_file": "/tmp/results.csv",
"read_telemetry_file": "/tmp/telemetry.csv",

"shell_env_params_match": [
"^MLOS_[a-zA-Z0-9_]+$"
],
"shell_env_params": [
"foo"
],
"shell_env_params_mapping": {
"shell_env_params_rename": {
"gets_mapped_to_this_env_name": "/source/param/name/that/is/otherwise/invalid/env/name"
}
}
Original file line number Diff line number Diff line change
@@ -28,13 +28,10 @@

"results_stdout_pattern": "(\\w+),([0-9.]+)",

"shell_env_params_match": [
"^MLOS_[a-zA-Z0-9_]+$"
],
"shell_env_params": [
"foo"
],
"shell_env_params_mapping": {
"shell_env_params_rename": {
"gets_mapped_to_this_env_name": "/source/param/name/that/is/otherwise/invalid/env/name"
}
}