Skip to content
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

Merge v1.1.3 #624

Merged
merged 11 commits into from
Jan 11, 2025
Merged

Merge v1.1.3 #624

merged 11 commits into from
Jan 11, 2025

Conversation

pingu2k4
Copy link
Contributor

@pingu2k4 pingu2k4 commented Jan 11, 2025

Update dependency xunit.runner.visualstudio to 3.0.1

Description by Korbit AI

What change is being made?

Add support for creating documents with a response type in the Appwrite client library and update test suites accordingly to ensure successful integration of the new functionality.

Why are these changes being made?

These changes introduce a more flexible method for creating documents in the application by allowing developers to specify both the request and response data types, which enhances API interaction versatility. The updates also ensure the client library remains consistent with the Appwrite API's capabilities and includes thorough testing to validate the new functionality's integration. Additionally, several test dependency versions have been updated for improved test suite performance and reliability.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

renovate bot and others added 11 commits January 11, 2025 02:53
Merge pull request #621 from PinguApps/dev
…sesClientTests.CreateDocumentGenericGeneric.cs

Co-authored-by: codefactor-io[bot] <47775046+codefactor-io[bot]@users.noreply.github.com>
…sesClientTests.cs

Co-authored-by: codefactor-io[bot] <47775046+codefactor-io[bot]@users.noreply.github.com>
Added additional method to create document but return another type
Update dependency xunit.runner.visualstudio to 3.0.1
@pingu2k4 pingu2k4 self-assigned this Jan 11, 2025
@pingu2k4 pingu2k4 merged commit fec651f into main Jan 11, 2025
9 of 10 checks passed
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Fix Detected
Functionality Type Mismatch Risk in Generic CreateDocument ▹ view
Suppressed issues based on your team's Korbit activity
This issue Is similar to Because

lines 104:107:

The catch block uses a generic Exception type and loses context by immediately converting to a generic response.

Log exceptions before returning an exception response.

Similar issues were not addressed in the past

When you react to issues (for example, an upvote or downvote) or you fix them, Korbit will tune future reviews based on these signals.

Files scanned
File Path Reviewed
src/PinguApps.Appwrite.Shared/Constants.cs
src/PinguApps.Appwrite.Client/Internals/IDatabasesApi.cs
src/PinguApps.Appwrite.Client/Clients/ClientDatabasesClient.cs
src/PinguApps.Appwrite.Client/Clients/IClientDatabasesClient.cs
src/PinguApps.Appwrite.Server/Internals/IDatabasesApi.cs
src/PinguApps.Appwrite.Server/Clients/ServerDatabasesClient.cs
src/PinguApps.Appwrite.Server/Clients/IServerDatabasesClient.cs

Explore our documentation to understand the languages and file types we support and the files we ignore.

Need a new review? Comment /korbit-review on this PR and I'll review your latest changes.

Korbit Guide: Usage and Customization

Interacting with Korbit

  • You can manually ask Korbit to review your PR using the /korbit-review command in a comment at the root of your PR.
  • You can ask Korbit to generate a new PR description using the /korbit-generate-pr-description command in any comment on your PR.
  • Too many Korbit comments? I can resolve all my comment threads if you use the /korbit-resolve command in any comment on your PR.
  • Chat with Korbit on issues we post by tagging @korbit-ai in your reply.
  • Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.

Customizing Korbit

  • Check out our docs on how you can make Korbit work best for you and your team.
  • Customize Korbit for your organization through the Korbit Console.

Current Korbit Configuration

General Settings
Setting Value
Review Schedule Automatic excluding drafts
Max Issue Count 10
Automatic PR Descriptions
Issue Categories
Category Enabled
Naming
Database Operations
Documentation
Logging
Error Handling
Systems and Environment
Objects and Data Structures
Readability and Maintainability
Asynchronous Processing
Design Patterns
Third-Party Libraries
Performance
Security
Functionality

Feedback and Support

Note

Korbit Pro is free for open source projects 🎉

Looking to add Korbit to your team? Get started with a free 2 week trial here

/// <typeparam name="TResponse">The type of the response</typeparam>
/// <param name="request">The request content</param>
/// <returns>The document</returns>
Task<AppwriteResult<Document<TResponse>>> CreateDocument<TData, TResponse>(CreateDocumentRequest<TData> request)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type Mismatch Risk in Generic CreateDocument category Functionality

Tell me more
What is the issue?

The generic CreateDocument method may allow creating a document with mismatched data types between request and response, which could lead to runtime deserialization errors.

Why this matters

If TData and TResponse are different types, the server response (which will contain TData) might fail to deserialize into TResponse, causing runtime exceptions.

Chat with Korbit by mentioning @korbit-ai, and give a 👍 or 👎 to help Korbit improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant