Skip to content

chore: add more sdk config flexibility#11037

Merged
ChiragAgg5k merged 1 commit into1.8.xfrom
more-sdk-config
Dec 29, 2025
Merged

chore: add more sdk config flexibility#11037
ChiragAgg5k merged 1 commit into1.8.xfrom
more-sdk-config

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 29, 2025

📝 Walkthrough

Walkthrough

This pull request modifies SDK metadata generation in src/Appwrite/Platform/Tasks/SDKs.php to support language-specific configuration overrides. The changes replace two hard-coded default values with language-specific alternatives: the GETTING_STARTED.md path now uses the language['gettingStarted'] field with a fallback to the original default, and the short description now uses the language['shortDescription'] field with similar fallback behavior. The modifications maintain existing default value selection logic without introducing new control flow or error handling mechanisms.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • ItzNotABug

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a description explaining the purpose of the SDK configuration changes and why language-specific overrides for GETTING_STARTED and shortDescription are needed.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The PR title states 'add more sdk config flexibility' but the actual change is about making GETTING_STARTED.md path and short description configurable with language-specific overrides.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch more-sdk-config

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
libpng 1.6.51-r0 CVE-2025-66293 HIGH
libpng-dev 1.6.51-r0 CVE-2025-66293 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/Appwrite/Platform/Tasks/SDKs.php (1)

141-142: Consider applying consistent path resolution to overrides.

The fallback path uses realpath() to resolve the path, but the override $language['gettingStarted'] doesn't. This means override paths won't be canonicalized, which could lead to inconsistent path handling if relative paths are provided.

Consider applying realpath() to the override as well to ensure consistent behavior:

🔎 Proposed fix for consistent path handling
-$gettingStarted = $language['gettingStarted'] ?? \realpath(__DIR__ . '/../../../../docs/sdks/' . $language['key'] . '/GETTING_STARTED.md');
+$gettingStarted = isset($language['gettingStarted']) ? \realpath($language['gettingStarted']) : \realpath(__DIR__ . '/../../../../docs/sdks/' . $language['key'] . '/GETTING_STARTED.md');
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8a52975 and 57157a7.

📒 Files selected for processing (1)
  • src/Appwrite/Platform/Tasks/SDKs.php
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Setup & Build Appwrite Image
  • GitHub Check: Setup & Build Appwrite Image
  • GitHub Check: scan
🔇 Additional comments (3)
src/Appwrite/Platform/Tasks/SDKs.php (3)

1-1: Verify PR title and changes alignment.

The PR title mentions "Fix: robust SMTP validation and added regression test" but the code changes are about SDK generation configuration (language-specific gettingStarted paths and shortDescription overrides). There's no SMTP-related code in this diff.

Please confirm:

  • Are these the correct changes for this PR?
  • Should the PR title be updated to reflect the actual changes?

384-384: LGTM!

The language-specific shortDescription override with fallback to the default value is implemented correctly and follows the same pattern as the description field on line 383.


141-141: No action needed. The gettingStarted and shortDescription fields are optional configuration parameters with sensible default fallbacks. The code properly handles missing values using the null coalescing operator (??), so the feature works as intended without requiring these fields to be explicitly defined in the SDK configuration.

@ChiragAgg5k ChiragAgg5k changed the title Fix: robust SMTP validation and added regression test chore: add more sdk config flexibility Dec 29, 2025
@github-actions
Copy link
Copy Markdown

✨ Benchmark results

  • Requests per second: 1,127
  • Requests with 200 status code: 202,884
  • P99 latency: 0.172911385

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,127 1,203
200 202,884 216,551
P99 0.172911385 0.170006648

@ChiragAgg5k ChiragAgg5k merged commit e60391b into 1.8.x Dec 29, 2025
74 of 75 checks passed
@ChiragAgg5k ChiragAgg5k deleted the more-sdk-config branch December 29, 2025 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants