chore: print more lunaria generation logs#2848
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe module's build-time TypeScript transform subprocess now displays its output directly via inherited stdio. Error handling in the build hook is expanded to treat canary environments the same as dev and release, with non-matching environments logging errors to the console rather than rethrowing them. ChangesBuild Process Updates
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
modules/lunaria.ts (1)
40-40: 💤 Low valueConsider updating the inline comment to reflect canary.
The logic correctly adds canary to the throw condition, which aligns with the PR objective. However, the comment on lines 37-38 now reads "In CI, only throw if building for production" but the code throws in both release and canary builds. Consider updating the comment to be more accurate.
📝 Suggested comment update
- // Always throw in local dev. - // In CI, only throw if building for production. + // Always throw in local dev. + // In CI, throw for release and canary builds to catch errors early.🤖 Prompt for 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. In `@modules/lunaria.ts` at line 40, The inline comment above the environment check is now inaccurate — update the comment that precedes the condition using the env variable to reflect that CI should only throw for production-like builds, including both "release" and "canary" (not just "production"); locate the condition containing if (env === 'dev' || env === 'release' || env === 'canary') and edit the comment immediately above it to mention "release and canary" (or "production-like builds") so it matches the actual logic.
🤖 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.
Nitpick comments:
In `@modules/lunaria.ts`:
- Line 40: The inline comment above the environment check is now inaccurate —
update the comment that precedes the condition using the env variable to reflect
that CI should only throw for production-like builds, including both "release"
and "canary" (not just "production"); locate the condition containing if (env
=== 'dev' || env === 'release' || env === 'canary') and edit the comment
immediately above it to mention "release and canary" (or "production-like
builds") so it matches the actual logic.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 02059b4e-9842-46de-9018-8c96cae28efe
📒 Files selected for processing (1)
modules/lunaria.ts
trueberryless
left a comment
There was a problem hiding this comment.
I hope this doesn't cost Daniel too much 😅
|
@trueberryless It should be one line for success and probably ~10 lines for failure. So it's nothing compared to the volume of logs from 100k users 😅 |
Ah true, Lunaria only runs once at build, right? So it's not per request. I confused it. |
|
Yes, and generates static file - /lunaria/status.json |
🔗 Linked issue
Related #2785
🧭 Context
The error only in mentioned issue occurs only in canary. We have logic that outputs logs that can help understand what exactly happened, but these logs are only printed in release, not canary. To understand what exactly happened, enabling logs in canary would help
I'm almost sure that the problem is because lunaria, for some reason, can't process git data in the main branch (it definitely didn't generate the file and it definitely crashed here, but without logs it's hard to understand why)
Overall, I can't find a reason why we should ignore logs, so I want us to display them