Skip to content

Conversation

@007harshmahajan
Copy link
Contributor

@007harshmahajan 007harshmahajan commented Dec 3, 2025

removing the .await

@007harshmahajan 007harshmahajan marked this pull request as ready for review December 3, 2025 19:45
@github-actions github-actions bot added the ☢️ Bug Something isn't working label Dec 3, 2025
@007harshmahajan 007harshmahajan changed the title fix fix: ci build fix Dec 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

Failed to generate code suggestions for PR

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 3, 2025

Greptile Overview

Greptile Summary

Fixed a critical bug where .await was incorrectly added inside tokio::task::spawn() for the domain management watch function. tokio::task::spawn expects a Future, not an awaited result, so this would cause a compilation error or runtime failure.

  • Removed .await from tokio::task::spawn(o2_enterprise::enterprise::domain_management::db::watch().await)
  • Changed to correct pattern: tokio::task::spawn(o2_enterprise::enterprise::domain_management::db::watch())
  • This aligns with all other watch function spawns in the same file

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Score reflects that this is a straightforward bug fix that corrects improper use of tokio::task::spawn. The change removes an incorrectly placed .await keyword that would prevent proper async task spawning. The fix aligns with the established pattern used for all other watch function spawns in the file.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
src/job/mod.rs 5/5 Fixed incorrect .await on tokio::task::spawn call for domain_management watch

Sequence Diagram

sequenceDiagram
    participant Init as init() function
    participant Tokio as tokio::task::spawn
    participant Watch as domain_management::db::watch()
    
    Note over Init,Watch: Before fix (incorrect)
    Init->>Tokio: spawn(watch().await)
    Note over Tokio: Receives already-awaited result<br/>instead of Future
    Tokio--xWatch: ❌ Runtime error
    
    Note over Init,Watch: After fix (correct)
    Init->>Tokio: spawn(watch())
    Tokio->>Watch: Spawns Future on new task
    Watch-->>Tokio: ✓ Runs asynchronously
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@007harshmahajan 007harshmahajan changed the title fix: ci build fix fix: removing the .await Dec 3, 2025
@007harshmahajan 007harshmahajan changed the title fix: removing the .await fix:removing the .await Dec 3, 2025
@007harshmahajan 007harshmahajan changed the title fix:removing the .await fix: removing the .await Dec 3, 2025
@Shrinath-O2 Shrinath-O2 changed the title fix: removing the .await fix: removing the await Dec 4, 2025
@Shrinath-O2 Shrinath-O2 merged commit 6a91424 into main Dec 4, 2025
42 of 48 checks passed
@Shrinath-O2 Shrinath-O2 deleted the fix_enterprise_build branch December 4, 2025 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

☢️ Bug Something isn't working Invalid PR Title

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants