metatype
metatype copied to clipboard
fix(gate): Improve logging and responses
- Logging before and after each faillible operation
- Runtimes: foreign resolvers
- Always log before reporting error: HTTP response
- Fix error code in artifact_service
- Add
BaseErrorclass for structured messages in responses
Summary by CodeRabbit
-
New Features
- Updated Docker image and dependency versions to
v0.4.1-0for better stability and performance.
- Updated Docker image and dependency versions to
-
Improvements
- Enhanced error handling with specific error classes for better debugging and user feedback.
- Added comprehensive logging across various modules for improved monitoring and troubleshooting.
- Refined error messages and response handling for more informative user interactions.
-
Refactor
- Replaced generic errors with specific error classes to enhance error specificity and debugging capabilities.
-
Chores
- Version bumps across multiple configuration files to maintain consistency with the latest release.
Walkthrough
The recent changes encompass updating version numbers across various configuration files to maintain consistency and compatibility with the new version 0.4.1-0. Notably, enhancements in error handling within the typegate project introduce specific error classes for improved error management and logging. Detailed logging improvements have been implemented across multiple runtime classes to offer more informative log messages.
Changes
| Files | Change Summary |
|---|---|
.ghjk/lock.json, dev/lock.yml, ghjk.ts, meta-cli/Cargo.toml, ... |
Updated various version declarations to 0.4.1-0. |
Cargo.toml, libs/common/Cargo.toml, libs/metagen/tests/mat_rust/Cargo.toml, ... |
Version updated from 0.4.0 to 0.4.1-0. |
examples/templates/deno/compose.yml, examples/templates/node/compose.yml, ... |
Docker image version for typegate service updated to v0.4.1-0 from v0.4.0. |
libs/metagen/Cargo.toml, libs/metagen/src/lib.rs, libs/metagen/src/tests/mod.rs |
Added color-eyre dependency, switched error handling from anyhow to color_eyre. |
meta-cli/Cargo.toml, meta-cli/src/cli/upgrade.rs, meta-cli/src/cli/deploy.rs, ... |
Significant refactoring, restructuring, and logging improvements in various modules within meta-cli. |
meta-cli/src/cli/typegate.rs, meta-cli/src/cli/serialize.rs, meta-cli/src/cli/ui/mod.rs, ... |
Refactored imports, error handling, and logging in different modules within meta-cli. |
typegate/src/engine/computation_engine.ts, typegate/src/errors.ts, typegate/src/libs/jsonpath.ts, ... |
Introduced specific error classes for improved error management and logging within typegate. |
typegate/src/runtimes/graphql.ts, typegate/src/runtimes/prisma/migration.ts, ... |
Enhanced logging with detailed statements and error handling improvements in various runtime classes. |
typegate/src/services/artifact_service.ts, typegate/src/tests/rest/rest_test.ts, ... |
Improved error handling, logging, and error message updates in service modules and test cases within typegate. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai generate interesting stats about this repository and render them as a table.@coderabbitai show all the console.log statements in this repository.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger a review. This is useful when automatic reviews are disabled for the repository.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai helpto get help.
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Codecov Report
Attention: Patch coverage is 48.49138% with 239 lines in your changes are missing coverage. Please review.
Project coverage is 73.52%. Comparing base (
bbdfd35) to head (9775e44). Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #714 +/- ##
==========================================
- Coverage 74.05% 73.52% -0.53%
==========================================
Files 120 120
Lines 13777 14142 +365
Branches 1407 1416 +9
==========================================
+ Hits 10202 10398 +196
- Misses 3549 3717 +168
- Partials 26 27 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.