-
Notifications
You must be signed in to change notification settings - Fork 1
Add initial Wrangler configuration and fix manifest path error #534
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
Conversation
- Created a new `wrangler.jsonc` file with basic configuration for the Cloudflare Worker, including observability settings and placeholders for bindings and assets. - Addressed an error indicating that the Cargo.toml manifest path does not exist, ensuring the project structure is correctly set up for Rust analysis.
WalkthroughFirebase FunctionsベースのProbot GitHubアプリとHetznerランナープロビジョニング実装を削除し、Cloudflare Workersベースの新しいセットアップに移行しました。GitHubアクションデプロイメントワークフローも併せて削除されました。 Changes
Sequence Diagram(s)sequenceDiagram
participant Old as Firebase<br/>Functions (削除)
participant New as Cloudflare<br/>Workers (追加)
rect rgb(200, 220, 255)
note over Old: Probot + Hetzner実装
Old->>+Old: GitHub Webhook受信<br/>(workflow_job.queued)
Old->>Old: Hetzner APIで<br/>サーバ作成
Old->>Old: SSH接続確立<br/>(再試行ロジック)
Old->>Old: JIT Config取得
Old->>Old: ランナー起動
end
rect rgb(220, 255, 220)
note over New: Cloudflare Workers実装
New->>+New: HTTP Fetch受信
New->>New: "Hello World!"<br/>レスポンス返却
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 重点確認事項:
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (2)
openci-runner/package.json (1)
2-7: バージョン制約の一貫性を確認してください。依存関係のバージョン制約が混在しています(
^と~)。vitestのみが~3.2.0(パッチバージョンのみ更新)を使用し、他は^(マイナーバージョンまで更新)を使用しています。意図的な場合は問題ありませんが、一貫性を持たせることを検討してください。openci-runner/test/index.spec.ts (1)
10-12: 一時的な型定義の回避策コメントが示すように、これは一時的な回避策です。将来的により良い型定義が利用可能になった際に、この回避策を削除できるよう追跡することをお勧めします。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (3)
openci-runner/firebase/functions/package-lock.jsonis excluded by!**/package-lock.jsonopenci-runner/firebase/functions/test/fixtures/mock-cert.pemis excluded by!**/*.pemopenci-runner/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (26)
.github/workflows/github-apps-cd.yml(0 hunks).github/workflows/reusable-deploy-firebase-functions.yml(0 hunks)biome.jsonc(1 hunks)openci-runner/.gitignore(1 hunks)openci-runner/firebase/.firebaserc(0 hunks)openci-runner/firebase/.gitignore(0 hunks)openci-runner/firebase/firebase.json(0 hunks)openci-runner/firebase/functions/.gitignore(0 hunks)openci-runner/firebase/functions/package.json(0 hunks)openci-runner/firebase/functions/probot/github.ts(0 hunks)openci-runner/firebase/functions/probot/hetzner.ts(0 hunks)openci-runner/firebase/functions/probot/index.ts(0 hunks)openci-runner/firebase/functions/src/index.ts(0 hunks)openci-runner/firebase/functions/test/fixtures/issues.opened.json(0 hunks)openci-runner/firebase/functions/test/index.test.ts(0 hunks)openci-runner/firebase/functions/tsconfig.json(0 hunks)openci-runner/package.json(1 hunks)openci-runner/src/index.ts(1 hunks)openci-runner/test/env.d.ts(1 hunks)openci-runner/test/index.spec.ts(1 hunks)openci-runner/test/tsconfig.json(1 hunks)openci-runner/tsconfig.json(1 hunks)openci-runner/vitest.config.mts(1 hunks)openci-runner/wrangler.jsonc(1 hunks)openci.code-workspace(1 hunks)target/rust-analyzer/flycheck0/stderr(1 hunks)
💤 Files with no reviewable changes (14)
- openci-runner/firebase/.firebaserc
- openci-runner/firebase/functions/probot/github.ts
- openci-runner/firebase/functions/probot/index.ts
- openci-runner/firebase/functions/src/index.ts
- openci-runner/firebase/functions/probot/hetzner.ts
- openci-runner/firebase/functions/package.json
- openci-runner/firebase/.gitignore
- openci-runner/firebase/functions/test/fixtures/issues.opened.json
- openci-runner/firebase/functions/tsconfig.json
- openci-runner/firebase/functions/.gitignore
- openci-runner/firebase/firebase.json
- openci-runner/firebase/functions/test/index.test.ts
- .github/workflows/reusable-deploy-firebase-functions.yml
- .github/workflows/github-apps-cd.yml
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-12T04:41:44.311Z
Learnt from: mafreud
PR: open-ci-io/openci#505
File: biome.jsonc:12-17
Timestamp: 2025-10-12T04:41:44.311Z
Learning: In Biome configuration (biome.json or biome.jsonc), `recommended: true` can be placed under `linter.rules` to enable recommended rules for all groups. This is a valid configuration according to the official Biome documentation at https://biomejs.dev/ja/reference/configuration/#linterrulesrecommended
Applied to files:
biome.jsonc
📚 Learning: 2025-09-04T06:33:41.049Z
Learnt from: CR
PR: open-ci-io/openci#0
File: packages/openci-controller/AGENTS.md:0-0
Timestamp: 2025-09-04T06:33:41.049Z
Learning: Applies to packages/openci-controller/**/Cargo.toml : Rust 2021 エディションを使用する(edition = "2021" を設定)
Applied to files:
target/rust-analyzer/flycheck0/stderr
📚 Learning: 2025-09-04T06:33:41.049Z
Learnt from: CR
PR: open-ci-io/openci#0
File: packages/openci-controller/AGENTS.md:0-0
Timestamp: 2025-09-04T06:33:41.049Z
Learning: Applies to packages/openci-controller/**/*.rs : プッシュ前に cargo fmt --all と cargo clippy --all-targets -- -D warnings を実行して整形・Lintを通す
Applied to files:
target/rust-analyzer/flycheck0/stderr
🧬 Code graph analysis (1)
openci-runner/test/index.spec.ts (1)
openci-runner/worker-configuration.d.ts (1)
env(9022-9022)
🔇 Additional comments (12)
openci-runner/.gitignore (1)
1-167: 適切な gitignore 設定です。Node.js プロジェクトの標準的な無視パターンと Wrangler 固有のパターン(
.dev.vars*,.env*,.wrangler/)が適切に含まれており、新しい Cloudflare Worker プロジェクトに適しています。biome.jsonc (1)
13-14: 生成ファイルの除外設定が適切です。
worker-configuration.d.tsは Wrangler によって生成される型定義ファイルであるため、Biome の処理対象から除外するのは正しい設定です。openci-runner/package.json (1)
10-16: スクリプト設定が適切です。Wrangler と Vitest の統合に必要なスクリプトが適切に定義されています。
cf-typegenコマンドで型定義を生成し、devとdeployで開発とデプロイを実行できます。openci-runner/src/index.ts (1)
14-18: 初期実装として適切です。シンプルな "Hello World!" ハンドラーは初期セットアップとして適切です。未使用のパラメータに
_を使用するのは TypeScript で一般的な慣例です。satisfies ExportedHandler<Env>により型安全性が確保されています。openci-runner/test/env.d.ts (1)
1-3: 適切なテスト環境の型定義です。Cloudflare Workers のテスト環境用の ambient 型定義が正しく設定されています。
ProvidedEnvがEnvを拡張することで、Vitest pool workers での型安全性が確保されます。openci-runner/test/tsconfig.json (1)
1-13: テスト用の TypeScript 設定が適切です。親の
tsconfig.jsonを継承し、Vitest pool workers の型定義を含めています。worker-configuration.d.tsはwrangler typesコマンドで生成されるため、include に含めるのは正しい設定です。openci-runner/wrangler.jsonc (2)
7-7: 互換性日付を確認してください。
compatibility_dateが "2025-10-29" に設定されていますが、現在の日付は 2025-10-30 です。通常、互換性日付は現在またはそれ以前の日付を使用します。この日付が意図的なものか確認してください。
5-43: JSON 構造が不正です。メインオブジェクトの閉じ括弧が欠落しています。Line 12 で
observabilityオブジェクトが閉じられていますが、Line 5 で開始されたメインオブジェクトの閉じ括弧がありません。Lines 13-43 のコメントはオブジェクトの外側に配置されているようです。以下の修正を適用してください:
"observability": { "enabled": true - } + }, /** * Smart Placement * Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement */ // "placement": { "mode": "smart" } /** * Bindings * Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including * databases, object storage, AI inference, real-time communication and more. * https://developers.cloudflare.com/workers/runtime-apis/bindings/ */ /** * Environment Variables * https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables */ // "vars": { "MY_VARIABLE": "production_value" } /** * Note: Use secrets to store sensitive data. * https://developers.cloudflare.com/workers/configuration/secrets/ */ /** * Static Assets * https://developers.cloudflare.com/workers/static-assets/binding/ */ // "assets": { "directory": "./public/", "binding": "ASSETS" } /** * Service Bindings (communicate between multiple Workers) * https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings */ // "services": [{ "binding": "MY_SERVICE", "service": "my-service" }] }Likely an incorrect or invalid review comment.
openci-runner/test/index.spec.ts (2)
25-28: 統合テストの実装は適切です
SELF.fetchを使用した統合スタイルのテストは正しく実装されています。ユニットテストと統合テストの両方を提供することで、適切なテストカバレッジが確保されています。
14-23: ユニットテストの実装は正しく、検証完了ですworker ファイルの確認により、以下が検証されました:
- ✓ worker ファイル(
openci-runner/src/index.ts)が存在し、正しくデフォルトエクスポートされている- ✓ worker は "Hello World!" を返している(テストの期待値と一致)
- ✓ テストファイルの imports は正しい(env、createExecutionContext、waitOnExecutionContext は cloudflare:test から正しくインポート)
- ✓ テストロジックは Cloudflare Workers のテストパターンに適切に従っており、実行コンテキストを待機してからアサーションを実行している
コード変更の承認です。
openci-runner/tsconfig.json (1)
1-45: TypeScript 設定は概ね適切です全体的な設定は Cloudflare Workers プロジェクトに適しています。strict モードが有効化されており、適切なモジュール解決戦略(Bundler)が使用されています。test ディレクトリの除外も適切です。
jsx 設定の確認以外は、変更の承認に問題ありません。
openci-runner/vitest.config.mts (1)
7-7: ファイルパスの確認完了 - 問題なしconfigPath は Wrangler 設定ファイルへのパスであり、.toml と .json ファイルの両方を受け入れます。
openci-runner/wrangler.jsoncファイルが正常に存在し、設定は正しく解決されます。相対パス./wrangler.jsoncは標準的で正確です。
…to match wrangler.json association pattern
wrangler.jsoncfile with basic configuration for the Cloudflare Worker, including observability settings and placeholders for bindings and assets.Summary by CodeRabbit
リリースノート