feat: add cloud-api runtime DB image entrypoints
This commit is contained in:
@@ -699,13 +699,15 @@ function usage() {
|
||||
}
|
||||
|
||||
export function formatDevRuntimeMigrationFailure(error) {
|
||||
const message = redactFailureText(error instanceof Error ? error.message : String(error));
|
||||
return {
|
||||
issue,
|
||||
conclusion: {
|
||||
status: "blocked",
|
||||
summary: "DEV runtime migration command failed before producing a report."
|
||||
},
|
||||
error: error instanceof Error ? error.message : String(error),
|
||||
error: message,
|
||||
traceId: sha256(message).slice(0, 16),
|
||||
safety: {
|
||||
devOnly: true,
|
||||
prodAllowed: false,
|
||||
@@ -713,3 +715,11 @@ export function formatDevRuntimeMigrationFailure(error) {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function redactFailureText(value) {
|
||||
return String(value)
|
||||
.replace(/postgres(?:ql)?:\/\/[^\s"'<>]+/giu, "[redacted-postgres-url]")
|
||||
.replace(/(password\s*[=:]\s*)[^\s,;]+/giu, "$1[redacted]")
|
||||
.replace(/(token\s*[=:]\s*)[^\s,;]+/giu, "$1[redacted]")
|
||||
.replace(/(kubeconfig\s*[=:]\s*)[^\s,;]+/giu, "$1[redacted]");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user