runcloud 0.1.111 → 0.1.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/commands/sandbox.js
CHANGED
|
@@ -320,6 +320,7 @@ export function registerSandbox(program) {
|
|
|
320
320
|
.option('--secret <group/name>', 'attach one secret out of a group; repeatable, same ordering', collectRepeatable, [])
|
|
321
321
|
.option('--env <NAME=VALUE>', 'literal value for this sandbox; applied last, so it wins; repeatable', collectRepeatable, [])
|
|
322
322
|
.option('--no-secrets', 'state explicitly that the sandbox holds no secrets')
|
|
323
|
+
.option('--tag <key=value>', 'tag the sandbox at create; repeatable. Tag it with whatever id you will have in hand later: that is how you find it again, and tags outlive the sandbox', collectRepeatable, [])
|
|
323
324
|
.option('--no-wait', 'return before the sandbox finishes building and starting')).action((opts) => run(async () => {
|
|
324
325
|
const exposed = opts.expose !== undefined;
|
|
325
326
|
if (exposed && !opts.name) {
|
|
@@ -351,6 +352,9 @@ export function registerSandbox(program) {
|
|
|
351
352
|
body.idlePauseSeconds = 0;
|
|
352
353
|
else if (opts.idlePause !== undefined)
|
|
353
354
|
body.idlePauseSeconds = opts.idlePause;
|
|
355
|
+
const tags = Object.fromEntries(parseTagPairs(opts.tag ?? []));
|
|
356
|
+
if (Object.keys(tags).length > 0)
|
|
357
|
+
body.tags = tags;
|
|
354
358
|
Object.assign(body, secretSelector({ ...opts, noSecrets: opts.secrets === false }));
|
|
355
359
|
const api = runCloudApi();
|
|
356
360
|
let created = (await api.post('/run-cloud/sandboxes', body));
|
|
@@ -36,6 +36,7 @@ export function renderSandbox(record, verb = 'details') {
|
|
|
36
36
|
{ label: 'ID', value: record.id },
|
|
37
37
|
{ label: 'Name', value: record.name },
|
|
38
38
|
{ label: 'State', value: formatState(record.state) },
|
|
39
|
+
{ label: 'Last error', value: record.last_error ?? undefined },
|
|
39
40
|
{ label: 'Image', value: record.image },
|
|
40
41
|
{ label: 'Resources', value: resources(record) },
|
|
41
42
|
{ label: 'Idle pause', value: formatSeconds(record.idle_pause_seconds) },
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
|
+
export function cloudTraceExplorerUrl(env) {
|
|
4
|
+
const project = env === 'prod' ? 'newly-v3-prod' : 'newly-v3-dev';
|
|
5
|
+
return `https://console.cloud.google.com/traces/explorer?project=${project}`;
|
|
6
|
+
}
|
|
3
7
|
const STATUS_TEXT = {
|
|
4
8
|
ok: 'OK',
|
|
5
9
|
failed: 'FAIL',
|
|
@@ -117,6 +121,7 @@ ${report.query.evidenceUntil ? `- Historical evidence cutoff: \`${report.query.e
|
|
|
117
121
|
- Deployed commit: ${report.links.githubCommit ? `[\`${report.deploy.git_sha}\`](${report.links.githubCommit})` : 'unknown'}
|
|
118
122
|
- Venue: \`${report.session.venueRef ?? report.session.venue ?? 'not recorded'}\`
|
|
119
123
|
- [Correlated Cloud Run logs](${report.links.cloudLogs})
|
|
124
|
+
- [Cloud Trace Explorer](${cloudTraceExplorerUrl(report.env)}) — filter span attribute \`newly.session_id = ${report.session.id}\` (see \`docs/debugging-with-traces.md\`)
|
|
120
125
|
${report.links.venueLogsCommand ? `- Retained venue logs: \`${report.links.venueLogsCommand}\`` : ''}
|
|
121
126
|
|
|
122
127
|
## Failure Diagram
|
|
@@ -156,6 +161,7 @@ export function renderSessionDiagnosticTerminal(report) {
|
|
|
156
161
|
lines.push(` ${source.url}`);
|
|
157
162
|
}
|
|
158
163
|
lines.push('', `Cloud logs: ${report.links.cloudLogs}`);
|
|
164
|
+
lines.push(`Traces: ${cloudTraceExplorerUrl(report.env)} — filter span attribute newly.session_id = ${report.session.id}`);
|
|
159
165
|
if (report.links.venueLogsCommand) {
|
|
160
166
|
lines.push(`Venue logs: ${report.links.venueLogsCommand}`);
|
|
161
167
|
}
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = '0.1.
|
|
1
|
+
export const CLI_VERSION = '0.1.113';
|
package/package.json
CHANGED
|
Binary file
|
package/runcloud-0.1.111.tgz
DELETED
|
Binary file
|