Skip to content

chore: remove meticulous from CI #14369

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

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions .github/workflows/meticulous.yaml

This file was deleted.

12 changes: 1 addition & 11 deletions coderd/httpmw/csp.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func CSPHeaders(telemetry bool, websocketHosts func() []string) func(next http.H
cspDirectiveConnectSrc: {"'self'"},
cspDirectiveChildSrc: {"'self'"},
// https://github.com/suren-atoyan/monaco-react/issues/168
cspDirectiveScriptSrc: {"'self' "},
cspDirectiveScriptSrc: {"'self'"},
cspDirectiveStyleSrc: {"'self' 'unsafe-inline'"},
// data: is used by monaco editor on FE for Syntax Highlight
cspDirectiveFontSrc: {"'self' data:"},
Expand Down Expand Up @@ -88,11 +88,6 @@ func CSPHeaders(telemetry bool, websocketHosts func() []string) func(next http.H
if telemetry {
// If telemetry is enabled, we report to coder.com.
cspSrcs.Append(cspDirectiveConnectSrc, "https://coder.com")
// These are necessary to allow meticulous to collect sampling to
// improve our testing. Only remove these if we're no longer using
// their services.
cspSrcs.Append(cspDirectiveConnectSrc, meticulousConnectSrc...)
cspSrcs.Append(cspDirectiveScriptSrc, meticulousScriptSrc...)
}

// This extra connect-src addition is required to support old webkit
Expand Down Expand Up @@ -136,8 +131,3 @@ func CSPHeaders(telemetry bool, websocketHosts func() []string) func(next http.H
})
}
}

var (
meticulousConnectSrc = []string{"https://cognito-identity.us-west-2.amazonaws.com", "https://user-events-v3.s3-accelerate.amazonaws.com", "*.sentry.io"}
meticulousScriptSrc = []string{"https://snippet.meticulous.ai", "https://browser.sentry-cdn.com"}
)
27 changes: 1 addition & 26 deletions site/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { tryLoadAndStartRecorder } from "@alwaysmeticulous/recorder-loader";
import { createRoot } from "react-dom/client";
import { App } from "./App";

Expand All @@ -15,28 +14,4 @@ if (element === null) {
}

const root = createRoot(element);
async function startApp() {
// Record all sessions on localhost, staging stacks and preview URLs
if (isInternal()) {
// Start the Meticulous recorder before you initialise your app.
// Note: all errors are caught and logged, so no need to surround with try/catch
await tryLoadAndStartRecorder({
projectId: "Y4uHy1qs0B660xxUdrkLPkazUMPr6OuTqYEnShaR",
isProduction: false,
});
}

root.render(<App />);
}

function isInternal() {
return (
process.env.NODE_ENV === "development" &&
(window.location.hostname.indexOf("localhost") > -1 ||
window.location.hostname.indexOf("127.0.0.1") > -1)
);
}

startApp().catch((error) => {
console.error(error);
});
root.render(<App />);
Loading