Skip to content

Fix warning builds worker#10705

Merged
lohanidamodar merged 1 commit into1.8.xfrom
fix-warning-builds-worker
Oct 27, 2025
Merged

Fix warning builds worker#10705
lohanidamodar merged 1 commit into1.8.xfrom
fix-warning-builds-worker

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

fixes Warning: Undefined variable $adapter in /usr/src/code/vendor/appwrite/server-ce/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php on line 905

@ChiragAgg5k ChiragAgg5k changed the base branch from main to 1.8.x October 27, 2025 03:11
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 27, 2025

📝 Walkthrough

Walkthrough

This PR introduces a null initialization of the $adapter variable at the beginning of the site-detection block in Builds.php. This ensures the variable is defined before being used in subsequent logic, allowing the adapter value to be properly passed to the afterBuildSuccess method. No control flow changes are introduced.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single-file change involving a straightforward variable initialization
  • No logic modifications or control flow alterations
  • Homogeneous, minimal change pattern

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "Fix warning builds worker" is directly related to the changeset, which introduces initialization of the $adapter variable in the Builds.php file to fix an undefined variable warning. The title clearly conveys that this PR addresses a warning in the builds worker module and is specific enough for a reviewer scanning history to understand the general nature of the change. While it could be more detailed (e.g., mentioning the specific variable), the title sufficiently summarizes the primary change without being vague or misleading.
Description Check ✅ Passed The PR description directly addresses the changeset by specifying the exact warning being fixed: an undefined variable $adapter in Builds.php on line 905. This aligns perfectly with the summary of changes, which describes initializing $adapter to null to prevent this warning. The description is not vague or generic; it provides specific, actionable information about what issue is being resolved and where it occurs.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ 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 fix-warning-builds-worker

📜 Recent 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 3733df6 and ecc3f61.

📒 Files selected for processing (1)
  • src/Appwrite/Platform/Modules/Functions/Workers/Builds.php (1 hunks)
⏰ 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). (4)
  • GitHub Check: Setup & Build Appwrite Image
  • GitHub Check: Setup & Build Appwrite Image
  • GitHub Check: Setup & Build SDK
  • GitHub Check: scan
🔇 Additional comments (1)
src/Appwrite/Platform/Modules/Functions/Workers/Builds.php (1)

870-870: LGTM! Undefined variable warning resolved.

The initialization of $adapter = null correctly ensures the variable is defined before being passed to afterBuildSuccess at line 906. When the site detection block (lines 871-897) doesn't execute, null is an appropriate value given the method signature accepts a nullable string.


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
binutils 2.44-r2 CVE-2025-5244 HIGH
binutils 2.44-r2 CVE-2025-5245 HIGH
libxml2 2.13.8-r0 CVE-2025-49794 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49796 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49795 HIGH
libxml2 2.13.8-r0 CVE-2025-6021 HIGH
pcre2 10.43-r1 CVE-2025-58050 CRITICAL
golang.org/x/crypto v0.31.0 CVE-2025-22869 HIGH
golang.org/x/oauth2 v0.24.0 CVE-2025-22868 HIGH
stdlib 1.22.10 CVE-2025-47907 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Oct 27, 2025

Open in StackBlitz

npm i https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@10705

commit: ecc3f61

@github-actions
Copy link
Copy Markdown

✨ Benchmark results

  • Requests per second: 1,152
  • Requests with 200 status code: 207,325
  • P99 latency: 0.168683466

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,152 1,196
200 207,325 215,405
P99 0.168683466 0.173079112

@lohanidamodar lohanidamodar merged commit 128dc34 into 1.8.x Oct 27, 2025
163 of 164 checks passed
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