diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bc7683093e93a..1e0e19c4bf064 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -7,11 +7,11 @@ # Codeowners listed below are used as a reference for the Sentry team to know who to contact for a given area of the codebase. -# /docs/platforms/android/ @getsentry/team-mobile-core -# /docs/platforms/apple/ @getsentry/team-mobile-core -# /docs/platforms/dart/ @getsentry/team-mobile-cross-platform -# /docs/platforms/react-native/ @getsentry/team-mobile-cross-platform -# /docs/platforms/javascript/guides/cordova/ @getsentry/team-mobile-cross-platform +# /docs/platforms/android/ @getsentry/team-mobile-android-sdk +# /docs/platforms/apple/ @getsentry/team-mobile-apple-sdk +# /docs/platforms/dart/ @getsentry/team-mobile-cross-platform-sdks +# /docs/platforms/react-native/ @getsentry/team-mobile-cross-platform-sdks +# /docs/platforms/javascript/guides/cordova/ @getsentry/team-mobile-cross-platform-sdks # /docs/platforms/godot/ @getsentry/gdx # /docs/platforms/nintendo-switch/ @getsentry/gdx diff --git a/.github/workflows/ai-evals.yml b/.github/workflows/ai-evals.yml index de14833290400..5d3be1490975f 100644 --- a/.github/workflows/ai-evals.yml +++ b/.github/workflows/ai-evals.yml @@ -25,7 +25,9 @@ # sentry-for-ai-evals is internal, so the jobs check it out with the readonly bot's token # and use its actions from that path. Fork PRs get no secrets, so they're skipped. This # repo is public, so the eval outputs aren't kept as artifacts; the results go to -# evals.sentry.dev. +# evals.sentry.dev. Once the eval jobs finish, the report job posts each label's products +# matrix, base and head, to Slack as the sentry-evals bot, and its log shows only whether +# each label was posted. name: AI Evals @@ -236,10 +238,10 @@ jobs: path: sentry-for-ai persist-credentials: false - # Sends this test's result into the run the plan job created for the label and - # side. The head reads the preview, and the base the merge base's production deploy - # when the plan job found one, or else the live docs. No artifact-name: this repo is - # public. + # Sends this test's result into the run the plan job created for the label, side and + # repeat, or for the label and side when the plan makes no run per repeat. The head + # reads the preview, and the base the merge base's production deploy when the plan + # job found one, or else the live docs. No artifact-name: this repo is public. - uses: ./sentry-for-ai-evals/.github/actions/run-evals with: marker: ${{ matrix.job.marker }} @@ -252,6 +254,37 @@ jobs: base-sha: ${{ needs.plan.outputs.base-sha }} sentry-for-ai-path: sentry-for-ai docs-url: ${{ matrix.job.revision == 'head' && needs.plan.outputs.docs-url || needs.plan.outputs.base-docs-url }} - run-id: ${{ fromJSON(needs.plan.outputs.eval-runs)[format('{0}-{1}', matrix.job.label, matrix.job.revision)].id }} + run-id: ${{ matrix.job.run-id || fromJSON(needs.plan.outputs.eval-runs)[format('{0}-{1}', matrix.job.label, matrix.job.revision)].id }} openrouter-api-key: ${{ secrets.AI_EVALS_OPENROUTER_API_KEY }} evals-api-key: ${{ secrets.SENTRY_EVALS_API_KEY }} + + # Skipped when a new push cancelled the eval jobs, since that push's run posts instead. + report: + needs: [plan, eval] + if: >- + !cancelled() && (needs.eval.result == 'success' || needs.eval.result == 'failure') + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Get sentry-for-ai-evals token + id: token + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + with: + client-id: ${{ vars.SENTRY_READONLY_BOT_CLIENT_ID }} + private-key: ${{ secrets.SENTRY_READONLYBOT_PRIVATE_KEY }} + repositories: sentry-for-ai-evals + permission-contents: read + + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: getsentry/sentry-for-ai-evals + ref: ${{ needs.plan.outputs.evals-sha }} + token: ${{ steps.token.outputs.token }} + path: sentry-for-ai-evals + persist-credentials: false + + - uses: ./sentry-for-ai-evals/.github/actions/post-matrix + with: + runs: ${{ needs.plan.outputs.eval-runs }} + slack-bot-token: ${{ secrets.EVALS_SLACK_BOT_TOKEN }} + evals-api-key: ${{ secrets.SENTRY_EVALS_API_KEY }} diff --git a/.github/workflows/screenshot-pipeline.yml b/.github/workflows/screenshot-pipeline.yml index 7c3747a48ef80..bf6b56303e6b5 100644 --- a/.github/workflows/screenshot-pipeline.yml +++ b/.github/workflows/screenshot-pipeline.yml @@ -43,7 +43,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 - name: Install pipeline dependencies run: npm install diff --git a/.github/workflows/update-docs-changelog.yml b/.github/workflows/update-docs-changelog.yml index 3f81668d96cc0..9e4c5c6f09e48 100644 --- a/.github/workflows/update-docs-changelog.yml +++ b/.github/workflows/update-docs-changelog.yml @@ -27,7 +27,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '22' - name: Update docs changelog env: diff --git a/app/[[...path]]/page.tsx b/app/[[...path]]/page.tsx index e0ea91451a2b1..d6432dfcb9f5c 100644 --- a/app/[[...path]]/page.tsx +++ b/app/[[...path]]/page.tsx @@ -15,6 +15,7 @@ import {SpecChangelog} from 'sentry-docs/components/specChangelog'; import {isSpecStatus} from 'sentry-docs/components/specConstants'; import {SpecMeta} from 'sentry-docs/components/specMeta'; import {isDevelopDocsIndexablePath} from 'sentry-docs/developDocsConfig'; +import {DOCS_ORIGIN, isDeveloperDocs} from 'sentry-docs/docsSite.mjs'; import { DocNode, getCurrentPlatformOrGuide, @@ -24,7 +25,6 @@ import { nodeForPath, } from 'sentry-docs/docTree'; import {getMDXComponent} from 'sentry-docs/getMDXComponent'; -import {isDeveloperDocs} from 'sentry-docs/isDeveloperDocs'; import { getDevDocsFrontMatter, getDocsFrontMatter, @@ -327,13 +327,10 @@ function resolveOgImageUrl( export async function generateMetadata(props: MetadataProps): Promise { const params = await props.params; - const domain = isDeveloperDocs - ? 'https://develop.sentry.dev' - : 'https://docs.sentry.io'; // enable og image preview on preview deployments const previewDomain = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` - : domain; + : DOCS_ORIGIN; let title = 'Sentry Docs | Application Performance Monitoring & Error Tracking Software'; let customCanonicalTag: string = ''; @@ -382,7 +379,7 @@ export async function generateMetadata(props: MetadataProps): Promise if (pageNode.frontmatter.og_image) { ogImageUrl = resolveOgImageUrl( pageNode.frontmatter.og_image, - previewDomain ?? domain, + previewDomain, params.path ); } @@ -391,12 +388,12 @@ export async function generateMetadata(props: MetadataProps): Promise // Default fallback if (!ogImageUrl) { - ogImageUrl = `${previewDomain ?? domain}/og.png`; + ogImageUrl = `${previewDomain}/og.png`; } const images = [{url: ogImageUrl, width: 1200, height: 630}]; - const canonical = `${domain}${canonicalPath( + const canonical = `${DOCS_ORIGIN}${canonicalPath( customCanonicalTag || params.path?.join('/') || '' )}`; diff --git a/app/api/source-map/route.ts b/app/api/source-map/route.ts index e3240f03090b7..af00433ef427b 100644 --- a/app/api/source-map/route.ts +++ b/app/api/source-map/route.ts @@ -1,6 +1,6 @@ import {NextResponse} from 'next/server'; +import {isDeveloperDocs} from 'sentry-docs/docsSite.mjs'; import {getDevDocsFrontMatter, getDocsFrontMatter} from 'sentry-docs/frontmatter'; -import {isDeveloperDocs} from 'sentry-docs/isDeveloperDocs'; /** * API endpoint that returns a mapping of slugs to their source file paths. diff --git a/app/layout.tsx b/app/layout.tsx index 1306fb4f3374c..1bab67dbe638b 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -3,7 +3,6 @@ import './globals.css'; import {Theme} from '@radix-ui/themes'; import type {Metadata} from 'next'; import {Rubik} from 'next/font/google'; -import Script from 'next/script'; import PlausibleProvider from 'next-plausible'; import {HashNavigation} from 'sentry-docs/components/hashNavigation'; import {SkipToContent} from 'sentry-docs/components/skipToContent'; @@ -50,22 +49,6 @@ export default function RootLayout({children}: {children: React.ReactNode}) { {children} -