Conversation
📝 WalkthroughWalkthroughThe changes reorganize the handling of build timing variables within the Possibly related PRs
Suggested reviewers
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
Security Scan Results for PRDocker Image Scan Results
Source Code Scan Results🎉 No vulnerabilities found! |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php (1)
635-641: Consider adding timeout protection for the timing event.The test now expects a separate timing event after the deployment becomes ready. While this correctly reflects the new behavior, consider adding timeout protection or error handling in case the expected timing event doesn't arrive.
+// Add timeout or max attempts to prevent infinite waiting +$attempts = 0; +$maxAttempts = 10; + $response = json_decode($client->receive(), true); +$attempts++; + +if ($attempts > $maxAttempts) { + $this->fail('Timed out waiting for build timing event'); +} + $this->assertContains("functions.{$functionId}.deployments.{$deploymentId}.update", $response['data']['events']); $this->assertContains('console', $response['data']['channels']); $this->assertContains("projects.{$projectId}", $response['data']['channels']); $this->assertNotEmpty($response['data']['payload']['buildDuration']); $this->assertNotEmpty($response['data']['payload']['buildEndedAt']);Additionally, consider validating that the timing values are reasonable:
$this->assertNotEmpty($response['data']['payload']['buildDuration']); $this->assertNotEmpty($response['data']['payload']['buildEndedAt']); +$this->assertGreaterThan(0, $response['data']['payload']['buildDuration']); +$this->assertIsNumeric($response['data']['payload']['buildDuration']);
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/Appwrite/Platform/Modules/Functions/Workers/Builds.php(3 hunks)tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/Appwrite/Platform/Modules/Functions/Workers/Builds.php
⏰ Context from checks skipped due to timeout of 90000ms (19)
- GitHub Check: E2E Service Test (Users)
- GitHub Check: E2E Service Test (Storage)
- GitHub Check: E2E Service Test (Webhooks)
- GitHub Check: E2E Service Test (VCS)
- GitHub Check: E2E Service Test (Sites)
- GitHub Check: E2E Service Test (Messaging)
- GitHub Check: E2E Service Test (Proxy)
- GitHub Check: E2E Service Test (Locale)
- GitHub Check: E2E Service Test (GraphQL)
- GitHub Check: E2E Service Test (Projects)
- GitHub Check: E2E Service Test (FunctionsSchedule)
- GitHub Check: E2E Service Test (Console)
- GitHub Check: E2E Service Test (Avatars)
- GitHub Check: E2E Service Test (Account)
- GitHub Check: E2E Service Test (Dev Keys)
- GitHub Check: Unit Test
- GitHub Check: E2E General Test
- GitHub Check: Benchmark
- GitHub Check: scan
🔇 Additional comments (1)
tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php (1)
610-610: Approve the timing condition change.The change from checking
buildEndedAttobuildSizecorrectly reflects the new build timing flow where timing information is deferred until the end of the process.
What does this PR do?
It used to jump a lot - screenshot ,edge distribution, template pushing, repo cloning.. Now it tracks entire process accuratly:
CleanShot.2025-06-25.at.10.28.54.mp4
Test Plan
Video above; existing tests to pass
Related PRs and Issues
x
Checklist