Feature/410 give copilot the same interface as invoke attachments#421
Conversation
- Removed the OAuthProvider struct and replaced it with a simpler configuration using provider IDs and scopes. - Updated Node struct to reference OAuth provider IDs instead of full provider objects. - Centralized OAuth provider configurations in the Hub struct, allowing for easier management and retrieval. - Modified related functions to accommodate the new structure, including extraction and merging of OAuth scopes. - Enhanced the OAuth service to support secret proxy requirements for token exchanges. - Updated UI components to utilize the new OAuth provider configuration structure.
- Added BatchCreateVersionsNode to facilitate the creation of multiple Jira versions in a single request. - Introduced BatchVersionInput and BatchVersionResult structs for handling input and output of batch operations. - Updated existing version handling to improve code readability and maintainability. - Changed icons for various nodes to use a unified Atlassian or Google icon where applicable. - Refactored code for better error handling and response parsing in worklog and version management. - Updated documentation strings for clarity and consistency across nodes.
…fields in hub_info response
…and post sharing functionality - Implemented LinkedIn OAuth provider for authentication and token management. - Created nodes for retrieving user profile information (`GetMeNode`) and sharing text posts (`ShareTextPostNode`). - Added support for sharing articles with optional title and description (`ShareArticleNode`). - Enhanced logging in the UI to format JSON messages for better readability. - Updated OAuth execution flow to handle token refresh and scope validation. - Introduced new methods in the OAuth consent store to check for consent with required scopes. - Improved event handling in the UI components to support new OAuth features.
- Implemented List, Start, and Stop SQL Warehouse nodes in `sql_warehouses.rs`. - Added functionality to list catalogs, schemas, and tables in Unity Catalog in `unity_catalog.rs`. - Introduced data structures for SQL warehouses, catalogs, schemas, and tables with parsing logic. - Enhanced error handling and logging for API requests. - Registered new nodes with appropriate input and output pins, including OAuth scopes and scoring metrics.
…he Pin to be lockless structure
…ed customer tracking
…osit and setup modes
- Extend UserTier struct to include optional product_id. - Update hub.json schema to include product_id in UserTier properties. - Introduce SolutionsPage component for managing solution requests. - Create necessary UI components for displaying, filtering, and editing solutions. - Implement global permissions for reading and writing solutions. - Define solution-related types and enums in a new solution schema file. - Add solution management to the main schema index.
…g status endpoint - Enhanced the SubmissionResponse struct to include a tracking_token. - Added a new route for tracking solution status by token. - Implemented logic to create and store tracking tokens during solution submission. - Created PublicSolutionStatus and PublicSolutionLog structs for tracking responses. - Updated the UI to display tracking information and allow copying of tracking URLs. - Refactored solution details view to include activity logs and payment information. - Updated solution schema to include trackingToken and logs. - Improved solution status handling with descriptive labels and statuses. - Upgraded dependencies: next (16.0.7), react (19.2.1), react-dom (19.2.1).
- Add SendgridMailClient for sending emails via Sendgrid API. - Add SesMailClient for sending emails using AWS SES. - Add SmtpMailClient for sending emails via SMTP. - Create email templates for solution submission confirmation. - Update solution submission route to send confirmation emails. - Add pricing and subscription management routes for user. - Implement pricing retrieval and subscription checkout functionality. - Enhance user state management with pricing and subscription interfaces. - Create a subscription management UI component.
- Added a `notify_customer` field to the `AddLogBody` struct to control customer notifications when a solution log is added. - Implemented email notifications for customers when a solution log is added, including a tracking URL. - Updated the `update_solution` function to send email notifications when the solution status changes, including the new status and tracking URL. - Introduced a `HostedProvider` enum to manage different hosted model providers and their configurations. - Refactored the `fetch_provider` function to support multiple hosted providers and their respective endpoints and API keys. - Updated the request preparation logic to handle different authentication methods based on the hosted provider. - Added tests for the new hosted provider functionality and ensured existing functionality remains intact. - Modified the subscription page to handle billing management for existing subscriptions.
…d streams multiple times
| }); | ||
|
|
||
| let mut stack_hash = self.stack.hash(); | ||
| let mut current_stack_len = self.stack.len(); | ||
| let mut errored = false; | ||
| let mut iter = 0; | ||
|
|
||
| while current_stack_len > 0 { | ||
| self.step(handler.clone()).await; | ||
| iter += 1; | ||
|
|
||
| if iter % 20 == 0 { | ||
| let mut run = self.run.lock().await; | ||
| if let Err(err) = run.flush_logs(false).await { | ||
| eprintln!("[Error] flushing logs: {:?}", err); | ||
| } | ||
| } | ||
|
|
||
| current_stack_len = self.stack.len(); | ||
| let new_stack_hash = self.stack.hash(); |
There was a problem hiding this comment.
Bug: AtomicBool uses Relaxed ordering, potentially causing an indefinite hang on weakly-ordered architectures.
Severity: CRITICAL | Confidence: High
🔍 Detailed Analysis
The flush_cancel AtomicBool uses Ordering::Relaxed for both store and load operations. This provides no synchronization guarantees, meaning the background task's loop might never observe the store(true, Ordering::Relaxed) call from the main thread. This can lead to an indefinite hang of the background task, causing the main thread to deadlock when awaiting its completion on line 908, especially on weakly-ordered architectures like ARM.
💡 Suggested Fix
Change flush_cancel.store(true, Ordering::Relaxed) to flush_cancel.store(true, Ordering::Release) on line 907. Change flush_cancel_clone.load(Ordering::Relaxed) to flush_cancel_clone.load(Ordering::Acquire) on lines 874 and 876.
🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: packages/core/src/flow/execution.rs#L852-L897
Potential issue: The `flush_cancel` `AtomicBool` uses `Ordering::Relaxed` for both store
and load operations. This provides no synchronization guarantees, meaning the background
task's loop might never observe the `store(true, Ordering::Relaxed)` call from the main
thread. This can lead to an indefinite hang of the background task, causing the main
thread to deadlock when awaiting its completion on line 908, especially on
weakly-ordered architectures like ARM.
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 368725
This pull request introduces several improvements and new features across the codebase, focusing on enhanced memory management for Rust services, expanded dependency support, and a significant upgrade to the account page UI in the desktop app. The most important changes are grouped below by theme.
Rust Backend: Memory Management & Dependencies
mimallocallocator as the global memory allocator for all major Rust backend services (main.rsinaws/api,aws/runtime,aws/runtime-async, andlocal/api) to improve performance and memory usage. [1] [2] [3] [4]Cargo.tomlfor time zone support (chrono-tz,iana-time-zone), AWS SESv2, and libraries for email, HTTP requests, and memory allocation (lettre,reqwest,mimalloc). [1] [2] [3]mimallocfor relevant backend crates. [1] [2] [3] [4]Desktop App: Account Page & Subscription UI
SubscriptionCardcomponent, displaying the user's current subscription tier and providing actions for viewing plans and managing billing. This includes dynamic color coding and conditional rendering based on feature flags and user status. [1] [2]account/page.tsxto useuseReffor stable references, centralized profile actions withuseMemo, and added feature gating for premium actions. [1] [2] [3] [4]BadgeandCrown. [1] [2]Release & Workflow Updates
Documentation
.github/instructions/rust.instructions.md, clarifying compilation and commenting practices for contributors.Backend Logic
file-trackerto clarify key identity parsing and delta calculation for object deletions and updates, improving error handling and code readability. [1] [2]