feat: trigger strict inngest ci background workflow via native edge ingestion#85
Conversation
|
@trivikramkalagi91-commits is attempting to deploy a commit to the Deekshith Gowda HS's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
More reviews will be available in 49 minutes and 23 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds CI-triggered Inngest workflow support by narrowing GitHub Actions triggers to ChangesCI-triggered Inngest Workflow
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 71-81: Gate the "Trigger Inngest CI Workflow" step on the presence
of the INNGEST_EVENT_KEY secret and make curl fail on non-2xx responses: add an
if condition that checks secrets.INNGEST_EVENT_KEY is not empty (e.g., if: ${{
secrets.INNGEST_EVENT_KEY != '' }} ) to the step named "Trigger Inngest CI
Workflow", and change the curl invocation to use --fail or --fail-with-body (or
check the HTTP status and exit non-zero) when POSTing to the Inngest endpoint
using the secret variable.
In `@app/api/inngest/route.ts`:
- Around line 11-21: The handler handleCiWorkflow currently just logs and
returns a static status, so it never kicks off downstream work; update
handleCiWorkflow to either (A) construct the full run payload from event.data
(include ref, sha, repo and any required metadata) and call the existing
run-creation function (e.g., createRun or enqueueRun) to persist/enqueue the job
inside the step.run block, or (B) emit the proper downstream Inngest event
(e.g., call inngest.send/eventDispatch or the project’s sendEvent wrapper) that
your test/workflow consumer listens for (the same event name used by the test
workflow), ensuring you pass the required payload fields so the test workflow
can start; keep this work inside the async step.run to preserve observability
and error handling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8c554598-fe59-4f06-b09e-d170d4528abf
📒 Files selected for processing (4)
.github/workflows/ci.ymlapp/api/inngest/route.tsapp/api/tests/run/route.tslib/inngest.ts
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Description
Closes #23
This PR adds an automated CI pipeline that tells Inngest to run background tasks when code is pushed or a PR is opened against the
prodbranch.What Changed
.github/workflows/ci.yml: Made the workflow run onpushandpull_requestfor theprodbranch. Addedpaths-ignoreso it skips running if only markdown or docs are changed. Set it to send data directly to Inngest's real endpoint (https://inn.gset.io/e/).lib/inngest.ts: Added the newci/workflow.triggeredevent type. Listed all 8 existing events alongside it explicitly so everything stays perfectly type-safe without using wildcards likeany.app/api/inngest/route.ts: Registered the newhandleCiWorkflowbackground function safely inside the standard Inngestservearray.Verification
https://inn.gset.io/e/).npm run buildand the production build passed completely with zero TypeScript errors or warnings.note :- i have used Ai but tried to understand and implemented it instead of simply changing
Summary by CodeRabbit
New Features
Improvements