-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix: t3-env standardization #606
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
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
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.
PR Summary
Comprehensive standardization of environment variable handling across the codebase by migrating from direct process.env access to t3-env for improved Docker runtime compatibility.
- Replaced environment variable access in critical components like
apps/sim/contexts/socket-context.tsxandapps/sim/lib/auth-client.tsto use strongly-typed env object - Added significant workflow execution tracking through new tables in
apps/sim/db/migrations/0049_fancy_cardiac.sqlincluding detailed block metrics and performance monitoring - Enhanced dependency checking logic in
apps/sim/executor/index.tsto better handle inactive execution paths and multiple inputs - Improved error handling in
apps/sim/app/api/function/execute/route.tswith detailed line numbers, stack traces and user-friendly error messages - Added support for normalized workflow state loading across API routes, replacing direct state column access with structured table queries
54 files reviewed, 4 comments
Edit PR Review Bot Settings | Greptile
|
✅ No security or compliance issues detected. Reviewed everything up to e783222. Security Overview
Detected Code Changes
Reply to this PR with |
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.
in general, can we consolidate all tehse separate is prod and is dev checks to teh unified environment.ts file? Or will that cause client-side/server-side complications @adiologydev
|
|
||
| const logger = createLogger('Sidebar') | ||
|
|
||
| const IS_DEV = process.env.NODE_ENV === 'development' |
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.
does this still need to be here or can we just import isDev from environment.ts?
In general, I expect DEV and PROD checks to only happen on the server so it could be consolidated but seeing how there are mixups where some things are running on the server and others on the client, and there's not much differentiation for determination. |
|
@adiologydev failing tests, this is a blocker for self-hosting since the socket server URL is not getting picked up when running in docker |
0c97121 to
38aab1e
Compare
|
@adiologydev needs rebase |
f27c40f to
e783222
Compare
Done |
* chore: use t3-env as source of truth * chore: update mock env for failing tests
* fix(sharing): fixed folders not appearing when sharing workflows (#616) * fix(sharing): fixed folders not appearing when sharing workflows * cleanup * fixed error case * fix(deletions): folder deletions were hanging + use cascade deletions throughout (#620) * use cascade deletion * fix lint --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan> * fix(envvars): t3-env standardization (#606) * chore: use t3-env as source of truth * chore: update mock env for failing tests * feat(enhanced logs): integration + log visualizer canvas (#618) * feat(logs): enhanced logging system with cleanup and theme fixes - Implement enhanced logging cleanup with S3 archival and retention policies - Fix error propagation in trace spans for manual executions - Add theme-aware styling for frozen canvas modal - Integrate enhanced logging system across all execution pathways - Add comprehensive trace span processing and iteration navigation - Fix boolean parameter types in enhanced logs API * add warning for old logs * fix lint * added cost for streaming outputs * fix overflow issue * fix lint * fix selection on closing sidebar * tooltips z index increase --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan> Co-authored-by: Waleed Latif <walif6@gmail.com> --------- Co-authored-by: Waleed Latif <walif6@gmail.com> Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan> Co-authored-by: Aditya Tripathi <aditya@climactic.co>
* fix(sharing): fixed folders not appearing when sharing workflows (#616) * fix(sharing): fixed folders not appearing when sharing workflows * cleanup * fixed error case * fix(deletions): folder deletions were hanging + use cascade deletions throughout (#620) * use cascade deletion * fix lint --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan> * fix(envvars): t3-env standardization (#606) * chore: use t3-env as source of truth * chore: update mock env for failing tests * feat(enhanced logs): integration + log visualizer canvas (#618) * feat(logs): enhanced logging system with cleanup and theme fixes - Implement enhanced logging cleanup with S3 archival and retention policies - Fix error propagation in trace spans for manual executions - Add theme-aware styling for frozen canvas modal - Integrate enhanced logging system across all execution pathways - Add comprehensive trace span processing and iteration navigation - Fix boolean parameter types in enhanced logs API * add warning for old logs * fix lint * added cost for streaming outputs * fix overflow issue * fix lint * fix selection on closing sidebar * tooltips z index increase --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan> Co-authored-by: Waleed Latif <walif6@gmail.com> * fix(frozen canvas): don't error if workflow state not available for migrated logs (#624) * fix(frozen canvas): don't error if workflow state not available for old logs * fix lint --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan> * fix(reddit): update to oauth endpoints (#627) * fix(reddit): change tool to use oauth token * fix lint * add contact info * Update apps/sim/tools/reddit/get_comments.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update apps/sim/tools/reddit/hot_posts.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update apps/sim/tools/reddit/get_posts.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * fix type error --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local> Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * feat(tools): added reordering of tool calls in agent tool input (#629) * added tool re-ordering in agent block * styling * fix(oauth): fix oauth to use correct subblock value setter + remove unused local storage code (#628) * fix(oauth): fixed oauth state not persisting in credential selector * remove unused local storage code for oauth * fix lint * selector clearance issue fix * fix typing issue * fix lint * remove cred id from logs * fix lint * works --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net> * fix(mem-deletion): hard deletion of memory (#622) * fix: memory deletion * fix: bun run lint --------- Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local> * feat(build): added turbopack builds to prod (#630) * added turbopack to prod builds * block access to sourcemaps * revert changes to docs * fix(docs): fixed broken docs links (#632) * fix(resp format): non-json input was crashing (#631) * fix response format non-json input crash bug * fix lint --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net> * fix(revert-deployed): correctly revert to deployed state as unit op using separate endpoint (#633) * fix(revert-deployed): revert deployed functionality with separate endpoint * fix lint --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net> * fix(dropdown): simplify & fix tag dropdown for parallel & loop blocks (#634) * fix(dropdown): simplify & fix tag dropdown for parallel & loop blocks * fixed build * fix(response-format): add response format to tag dropdown, chat panel, and chat client (#637) * add response format structure to tag dropdown * handle response format outputs for chat client and chat panel, implemented the response format handling for streamed responses * cleanup * fix(sockets-server-disconnection): on reconnect force sync store to db (#638) * keep warning until refresh * works * fix sockets server sync on reconnection * infinite reconn attempts * fix lint --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net> * fix(build): fixed build * Revert "fix(sockets-server-disconnection): on reconnect force sync store to d…" (#640) This reverts commit 6dc8b17. * fix(sockets): force user to refresh on disconnect in order to mkae changes, add read-only offline mode (#641) * force user to refresh on disconnect in order to mkae changes, add read-only offline mode * remove unused hook * style * update tooltip msg * remove unnecessary useMemo around log * fix(sockets): added debouncing for sub-block values to prevent overloading socket server, fixed persistence issue during streaming back from LLM response format, removed unused events (#642) * fix(sockets): added debouncing for sub-block values to prevent overloading socket server, fixed persistence issue during streaming back from LLM response format, removed unused events * reuse existing isStreaming state for code block llm-generated response format --------- Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com> Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan> Co-authored-by: Aditya Tripathi <aditya@climactic.co> Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local> Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com> Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
* chore: use t3-env as source of truth * chore: update mock env for failing tests
* fix(sharing): fixed folders not appearing when sharing workflows (simstudioai#616) * fix(sharing): fixed folders not appearing when sharing workflows * cleanup * fixed error case * fix(deletions): folder deletions were hanging + use cascade deletions throughout (simstudioai#620) * use cascade deletion * fix lint --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan> * fix(envvars): t3-env standardization (simstudioai#606) * chore: use t3-env as source of truth * chore: update mock env for failing tests * feat(enhanced logs): integration + log visualizer canvas (simstudioai#618) * feat(logs): enhanced logging system with cleanup and theme fixes - Implement enhanced logging cleanup with S3 archival and retention policies - Fix error propagation in trace spans for manual executions - Add theme-aware styling for frozen canvas modal - Integrate enhanced logging system across all execution pathways - Add comprehensive trace span processing and iteration navigation - Fix boolean parameter types in enhanced logs API * add warning for old logs * fix lint * added cost for streaming outputs * fix overflow issue * fix lint * fix selection on closing sidebar * tooltips z index increase --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan> Co-authored-by: Waleed Latif <walif6@gmail.com> --------- Co-authored-by: Waleed Latif <walif6@gmail.com> Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan> Co-authored-by: Aditya Tripathi <aditya@climactic.co>
* fix(sharing): fixed folders not appearing when sharing workflows (simstudioai#616) * fix(sharing): fixed folders not appearing when sharing workflows * cleanup * fixed error case * fix(deletions): folder deletions were hanging + use cascade deletions throughout (simstudioai#620) * use cascade deletion * fix lint --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan> * fix(envvars): t3-env standardization (simstudioai#606) * chore: use t3-env as source of truth * chore: update mock env for failing tests * feat(enhanced logs): integration + log visualizer canvas (simstudioai#618) * feat(logs): enhanced logging system with cleanup and theme fixes - Implement enhanced logging cleanup with S3 archival and retention policies - Fix error propagation in trace spans for manual executions - Add theme-aware styling for frozen canvas modal - Integrate enhanced logging system across all execution pathways - Add comprehensive trace span processing and iteration navigation - Fix boolean parameter types in enhanced logs API * add warning for old logs * fix lint * added cost for streaming outputs * fix overflow issue * fix lint * fix selection on closing sidebar * tooltips z index increase --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan> Co-authored-by: Waleed Latif <walif6@gmail.com> * fix(frozen canvas): don't error if workflow state not available for migrated logs (simstudioai#624) * fix(frozen canvas): don't error if workflow state not available for old logs * fix lint --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan> * fix(reddit): update to oauth endpoints (simstudioai#627) * fix(reddit): change tool to use oauth token * fix lint * add contact info * Update apps/sim/tools/reddit/get_comments.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update apps/sim/tools/reddit/hot_posts.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update apps/sim/tools/reddit/get_posts.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * fix type error --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local> Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * feat(tools): added reordering of tool calls in agent tool input (simstudioai#629) * added tool re-ordering in agent block * styling * fix(oauth): fix oauth to use correct subblock value setter + remove unused local storage code (simstudioai#628) * fix(oauth): fixed oauth state not persisting in credential selector * remove unused local storage code for oauth * fix lint * selector clearance issue fix * fix typing issue * fix lint * remove cred id from logs * fix lint * works --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net> * fix(mem-deletion): hard deletion of memory (simstudioai#622) * fix: memory deletion * fix: bun run lint --------- Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local> * feat(build): added turbopack builds to prod (simstudioai#630) * added turbopack to prod builds * block access to sourcemaps * revert changes to docs * fix(docs): fixed broken docs links (simstudioai#632) * fix(resp format): non-json input was crashing (simstudioai#631) * fix response format non-json input crash bug * fix lint --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net> * fix(revert-deployed): correctly revert to deployed state as unit op using separate endpoint (simstudioai#633) * fix(revert-deployed): revert deployed functionality with separate endpoint * fix lint --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net> * fix(dropdown): simplify & fix tag dropdown for parallel & loop blocks (simstudioai#634) * fix(dropdown): simplify & fix tag dropdown for parallel & loop blocks * fixed build * fix(response-format): add response format to tag dropdown, chat panel, and chat client (simstudioai#637) * add response format structure to tag dropdown * handle response format outputs for chat client and chat panel, implemented the response format handling for streamed responses * cleanup * fix(sockets-server-disconnection): on reconnect force sync store to db (simstudioai#638) * keep warning until refresh * works * fix sockets server sync on reconnection * infinite reconn attempts * fix lint --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net> * fix(build): fixed build * Revert "fix(sockets-server-disconnection): on reconnect force sync store to d…" (simstudioai#640) This reverts commit 6dc8b17. * fix(sockets): force user to refresh on disconnect in order to mkae changes, add read-only offline mode (simstudioai#641) * force user to refresh on disconnect in order to mkae changes, add read-only offline mode * remove unused hook * style * update tooltip msg * remove unnecessary useMemo around log * fix(sockets): added debouncing for sub-block values to prevent overloading socket server, fixed persistence issue during streaming back from LLM response format, removed unused events (simstudioai#642) * fix(sockets): added debouncing for sub-block values to prevent overloading socket server, fixed persistence issue during streaming back from LLM response format, removed unused events * reuse existing isStreaming state for code block llm-generated response format --------- Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com> Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan> Co-authored-by: Aditya Tripathi <aditya@climactic.co> Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local> Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com> Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
Description
Use t3-env everywhere to make sure our Docker builds work with runtime variables.
Note: I skipped socket server since we're moving it as a separate app. Also, instrumentation was skipped for now. due to errors
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Built and started containers locally.
Checklist:
bun run test)Security Considerations:
Additional Information:
Any additional information, configuration or data that might be necessary to reproduce the issue or use the feature.