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

Env var run summary data generation #4529

Merged
merged 7 commits into from Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 12 additions & 3 deletions cli/integration_tests/dry_json/monorepo.t
Expand Up @@ -72,6 +72,7 @@ Setup

$ cat tmpjson.log | jq 'keys'
[
"envMode",
"globalCacheInputs",
"id",
"packages",
Expand Down Expand Up @@ -122,13 +123,16 @@ Setup
},
"expandedOutputs": [],
"framework": "<NO FRAMEWORK DETECTED>",
"envMode": "loose",
"environmentVariables": {
"configured": [],
"inferred": [],
"global": [
"SOME_ENV_VAR=",
"VERCEL_ANALYTICS_ID="
]
],
"passthrough": null,
"globalPassthrough": null
nathanhammond marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down Expand Up @@ -170,6 +174,7 @@ Setup
},
"expandedOutputs": [],
"framework": "<NO FRAMEWORK DETECTED>",
"envMode": "loose",
"environmentVariables": {
"configured": [
"NODE_ENV="
Expand All @@ -178,7 +183,9 @@ Setup
"global": [
"SOME_ENV_VAR=",
"VERCEL_ANALYTICS_ID="
]
],
"passthrough": null,
"globalPassthrough": null
}
}

Expand All @@ -192,7 +199,9 @@ Run again with NODE_ENV set and see the value in the summary. --filter=util work
"global": [
"SOME_ENV_VAR=",
"VERCEL_ANALYTICS_ID="
]
],
"passthrough": null,
"globalPassthrough": null
}

Tasks that don't exist throw an error
Expand Down
6 changes: 5 additions & 1 deletion cli/integration_tests/dry_json/single_package.t
Expand Up @@ -29,6 +29,7 @@ Setup
}
}
},
"envMode": "infer",
"tasks": [
{
"taskId": "build",
Expand Down Expand Up @@ -70,12 +71,15 @@ Setup
},
"expandedOutputs": [],
"framework": "\u003cNO FRAMEWORK DETECTED\u003e",
"envMode": "loose",
"environmentVariables": {
"configured": [],
"inferred": [],
"global": [
"VERCEL_ANALYTICS_ID="
]
],
"passthrough": null,
"globalPassthrough": null
}
}
]
Expand Down
6 changes: 5 additions & 1 deletion cli/integration_tests/dry_json/single_package_no_config.t
Expand Up @@ -26,6 +26,7 @@ Setup
}
}
},
"envMode": "infer",
"tasks": [
{
"taskId": "build",
Expand Down Expand Up @@ -61,12 +62,15 @@ Setup
},
"expandedOutputs": [],
"framework": "\u003cNO FRAMEWORK DETECTED\u003e",
"envMode": "loose",
"environmentVariables": {
"configured": [],
"inferred": [],
"global": [
"VERCEL_ANALYTICS_ID="
]
],
"passthrough": null,
"globalPassthrough": null
}
}
]
Expand Down
11 changes: 9 additions & 2 deletions cli/integration_tests/dry_json/single_package_with_deps.t
Expand Up @@ -39,6 +39,7 @@ Setup
}
}
},
"envMode": "infer",
"tasks": [
{
"taskId": "build",
Expand Down Expand Up @@ -81,12 +82,15 @@ Setup
},
"expandedOutputs": [],
"framework": "\u003cNO FRAMEWORK DETECTED\u003e",
"envMode": "loose",
"environmentVariables": {
"configured": [],
"inferred": [],
"global": [
"VERCEL_ANALYTICS_ID="
]
],
"passthrough": null,
"globalPassthrough": null
}
},
{
Expand Down Expand Up @@ -128,12 +132,15 @@ Setup
},
"expandedOutputs": [],
"framework": "\u003cNO FRAMEWORK DETECTED\u003e",
"envMode": "loose",
"environmentVariables": {
"configured": [],
"inferred": [],
"global": [
"VERCEL_ANALYTICS_ID="
]
],
"passthrough": null,
"globalPassthrough": null
}
}
]
Expand Down
5 changes: 4 additions & 1 deletion cli/integration_tests/run_summary/error.t
Expand Up @@ -63,13 +63,16 @@ Validate that we got a full task summary for the failed task with an error in .e
},
"expandedOutputs": [],
"framework": "",
"envMode": "loose",
"environmentVariables": {
"configured": [],
"inferred": [],
"global": [
"SOME_ENV_VAR=",
"VERCEL_ANALYTICS_ID="
]
],
"passthrough": null,
"globalPassthrough": null
},
"execution": {
"startTime": [0-9]+, (re)
Expand Down
12 changes: 12 additions & 0 deletions cli/integration_tests/run_summary/fixture-configs/all.json
@@ -0,0 +1,12 @@
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"outputs": ["dist/**"],
"experimentalPassThroughEnv": ["LOCAL_VAR_PT"],
"env": ["LOCAL_VAR_DEP"]
}
},
"experimentalGlobalPassThroughEnv": ["GLOBAL_VAR_PT"],
"globalEnv": ["GLOBAL_VAR_DEP"]
}
nathanhammond marked this conversation as resolved.
Show resolved Hide resolved
@@ -0,0 +1,9 @@
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"outputs": ["dist/**"]
}
},
"experimentalGlobalPassThroughEnv": []
}
@@ -0,0 +1,9 @@
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"outputs": ["dist/**"]
}
},
"experimentalGlobalPassThroughEnv": ["GLOBAL_VAR_PT"]
}
@@ -0,0 +1,9 @@
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"outputs": ["dist/**"],
"experimentalPassthroughEnv": []
}
}
}
@@ -0,0 +1,9 @@
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"outputs": ["dist/**"],
"experimentalPassthroughEnv": ["LOCAL_VAR_PT"]
}
}
}
1 change: 1 addition & 0 deletions cli/integration_tests/run_summary/single-package.t
Expand Up @@ -51,6 +51,7 @@ Check
"command",
"dependencies",
"dependents",
"envMode",
"environmentVariables",
"excludedOutputs",
"execution",
Expand Down