You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Polish and use native workspaces in executors mode (#768)
This PR cleans up the src side of things for SSBC:
- Ensures to have a separate cache directory for each src running, so they don't collide while writing to them
- Ensures to have a tmp directory set within the executor workspace so it can be retained for inspection
- Removes useless API call to Sourcegraph to retrieve it's version
- Supports native repos cloned into the workspace
- Ensures no env var is used for cache key generation, those are not set on the server and it would cause cache key mismatches
- And most importantly, it doesn't require an access token anymore, so it's much safer, especially in less-isolated executors!
Closes https://github.com/sourcegraph/sourcegraph/issues/37079
Closes https://github.com/sourcegraph/sourcegraph/issues/36597
Closes https://github.com/sourcegraph/sourcegraph/issues/36187
"INTERNAL USE ONLY. EXPERIMENTAL. Switches off the TUI to only print JSON lines.",
98
-
)
99
-
flagSet.BoolVar(
100
-
&caf.apply, "apply", false,
101
-
"Ignored.",
102
-
)
103
-
flagSet.BoolVar(
104
-
&caf.keepLogs, "keep-logs", false,
105
-
"Retain logs after executing steps.",
106
-
)
107
-
}
96
+
flagSet.BoolVar(
97
+
&caf.textOnly, "text-only", false,
98
+
"INTERNAL USE ONLY. EXPERIMENTAL. Switches off the TUI to only print JSON lines.",
99
+
)
100
+
101
+
flagSet.BoolVar(
102
+
&caf.apply, "apply", false,
103
+
"Ignored.",
104
+
)
105
+
106
+
flagSet.BoolVar(
107
+
&caf.keepLogs, "keep-logs", false,
108
+
"Retain logs after executing steps.",
109
+
)
108
110
109
111
flagSet.StringVar(
110
112
&caf.cacheDir, "cache", cacheDir,
111
113
"Directory for caching results and repository archives.",
112
114
)
115
+
113
116
flagSet.StringVar(
114
117
&caf.tempDir, "tmp", tempDir,
115
118
"Directory for storing temporary data, such as log files. Default is /tmp. Can also be set with environment variable SRC_BATCH_TMP_DIR; if both are set, this flag will be used and not the environment variable.",
"If true, errors encountered while executing steps in a repository won't stop the execution of the batch spec but only cause that repository to be skipped.",
0 commit comments