fix(storage): renumber telemetry migration to 0015 to resolve 0014 version collision (#334)
* fix(storage): renumber telemetry migration to 0015 to resolve goose version collision * chore: format with prettier [skip ci] --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
891fb79e79
commit
f98c5e56cc
|
|
@ -320,7 +320,9 @@ ipcMain.handle("daemon:getStatus", () => daemonStatus);
|
|||
ipcMain.handle("daemon:start", () => startDaemon());
|
||||
ipcMain.handle("daemon:stop", () => stopDaemon());
|
||||
ipcMain.handle("app:getVersion", () => app.getVersion());
|
||||
ipcMain.handle("telemetry:getBootstrap", () => buildTelemetryBootstrap(process.env, app.getVersion(), process.platform));
|
||||
ipcMain.handle("telemetry:getBootstrap", () =>
|
||||
buildTelemetryBootstrap(process.env, app.getVersion(), process.platform),
|
||||
);
|
||||
ipcMain.handle("app:chooseDirectory", async () => {
|
||||
const options: OpenDialogOptions = {
|
||||
properties: ["openDirectory"],
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ export class TelemetryBoundary extends React.Component<Props, State> {
|
|||
<div className="flex h-screen items-center justify-center bg-background px-6 text-center text-foreground">
|
||||
<div>
|
||||
<h1 className="text-lg font-semibold">The app hit an unexpected error.</h1>
|
||||
<p className="mt-2 text-sm text-muted-foreground">Restart the app or check the daemon logs if this keeps happening.</p>
|
||||
<p className="mt-2 text-sm text-muted-foreground">
|
||||
Restart the app or check the daemon logs if this keeps happening.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
routeSurface,
|
||||
sanitizeRendererExceptionProperties,
|
||||
sanitizeRendererProperties,
|
||||
} from "./telemetry";
|
||||
import { routeSurface, sanitizeRendererExceptionProperties, sanitizeRendererProperties } from "./telemetry";
|
||||
|
||||
describe("telemetry sanitizers", () => {
|
||||
it("categorizes routes without exporting raw paths", () => {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ export async function sanitizeRendererProperties(
|
|||
case "ao.renderer.orchestrator_open_requested": {
|
||||
const projectIDHash = await hashedTelemetryID(properties?.project_id);
|
||||
if (projectIDHash) safe.project_id_hash = projectIDHash;
|
||||
break
|
||||
break;
|
||||
}
|
||||
}
|
||||
return safe;
|
||||
|
|
@ -157,10 +157,7 @@ export async function captureRendererEvent(event: string, properties?: Record<st
|
|||
posthog.capture(event, safeProperties);
|
||||
}
|
||||
|
||||
export async function captureRendererException(
|
||||
error: unknown,
|
||||
properties?: Record<string, unknown>,
|
||||
): Promise<void> {
|
||||
export async function captureRendererException(error: unknown, properties?: Record<string, unknown>): Promise<void> {
|
||||
if (!(await initTelemetry())) return;
|
||||
const safeProperties = await sanitizeRendererExceptionProperties(error, properties);
|
||||
posthog.capture("ao.renderer.exception", safeProperties);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,11 @@ import { buildTelemetryBootstrap, defaultDataDir, loadOrCreateTelemetryInstallId
|
|||
const tempDirs: string[] = [];
|
||||
|
||||
afterEach(async () => {
|
||||
await Promise.all(tempDirs.splice(0).map((dir) => import("node:fs/promises").then(({ rm }) => rm(dir, { recursive: true, force: true }))));
|
||||
await Promise.all(
|
||||
tempDirs
|
||||
.splice(0)
|
||||
.map((dir) => import("node:fs/promises").then(({ rm }) => rm(dir, { recursive: true, force: true }))),
|
||||
);
|
||||
});
|
||||
|
||||
test("defaultDataDir prefers AO_DATA_DIR", () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue