Skip to content

feat(init): pre-supply existingSentry to eliminate roundtrip#755

Open
betegon wants to merge 3 commits intomainfrom
feat/pre-supply-detect-sentry
Open

feat(init): pre-supply existingSentry to eliminate roundtrip#755
betegon wants to merge 3 commits intomainfrom
feat/pre-supply-detect-sentry

Conversation

@betegon
Copy link
Copy Markdown
Member

@betegon betegon commented Apr 15, 2026

Summary

  • Pre-computes sentry detection (detectDsn) alongside dirListing before the workflow starts
  • Passes the result as existingSentry in inputData, allowing the server-side check-existing-sentry step to skip its suspend/resume cycle
  • Saves 1 full roundtrip (HTTP + Cloudflare Workers cold start + D1 read/write)
  • Companion server PR: getsentry/cli-init-apiAdd website deploy to Craft config #92

Test plan

  • Run sentry init --dry-run on a project with existing Sentry setup — verify detection still works
  • Run sentry init --dry-run on a clean project — verify existingSentry is { status: "none", signals: [] }
  • Verify roundtrip count decreased by 1 via tracing

🤖 Generated with Claude Code

Pre-compute sentry detection alongside dirListing before the workflow
starts and pass the result in inputData. The server-side
check-existing-sentry step can now skip the suspend/resume cycle when
this data is present, saving one full roundtrip (HTTP + D1 read/write
on Cloudflare Workers).

Companion to getsentry/cli-init-api#92.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (init) Pre-supply existingSentry to eliminate roundtrip by betegon in #755

Internal Changes 🔧

  • Regenerate docs by github-actions[bot] in 34bf056d

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-755/

Built to branch gh-pages at 2026-04-15 14:30 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 45c6b79. Configure here.

Drop async from detectSentry wrapper (lint: no-await-in-async) and
apply biome formatting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
If detection throws (e.g. permission error), fall back to null so the
workflow uses the suspend/resume path instead of crashing the wizard
with a misleading "Connection failed" message.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant