-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: This diff is part 6 of the stacked changes to introduce a new health-report command in Eden. Specifically, this diff focuses on adding checks to determine *if chef is running properly on user machine**. This is how we have the contents of chef.last.run_stats across different platforms - 1. Mac Path: /var/chef/outputs/chef.last_run_stats Content: ``` { "chef.run_success_timestamp": 1643723400, "chef.os_success": true, "chef.run_success": true, "chef.run_start_time": 1643723395, "chef.run_end_time": 1643723400, "chef.run_elapsed_time": 5, "chef.run_updated_resources_count": 10, "chef.revision": "1234567890abcdef", "chef.destructive_normal": false, "chef.destructive_warn": false, "chef.destructive_error": false, "chef.exception_class": null, "chef.exception": null } ``` 2. Linux Path: /var/chef/outputs/chef.last_run_stats Content: ``` { "chef.run_success_timestamp": 1732645869, "chef.os_success": 1, "chef.run_success": 1, "chef.revision": "f6a94fb83b7790bb5b2cea31747647ff766e5631", "chef.run_timestamp": 1732645869, "chef.run_start_time": 1732645646, "chef.run_end_time": 1732645869, "chef.run_elapsed_time": 223, "chef.run_updated_resources_count": 92, "chef.shard": 97, "tags": { "chef.org": "o3" } } ``` 3. Windows Path: C:\chef\outputs\chef.last_run_stats Content: ``` { "chef.run_success_timestamp": 1732643948, "chef.last_failure_time": 1732644453, "chef.last_success_time": 1732643948, "chef.run_success": false, "chef.run_timestamp": 1732644453, "chef.consecutive_failures": 1, "chef.run_start_time": 1732644188, "chef.run_end_time": 1732644453, "chef.run_elapsed_time": 264, "chef.run_updated_resources_count": 8 } ``` Across all platforms, the output file contents share a common attribute: chef.run_success_timestamp. This attribute consistently indicates the last Chef run time. Therefore, we will focus on checking this attribute across all platforms to detect any issues related to Chef runs. ### Background on Eden Health Check Subcommand **Problem Statement** Currently, when Eden runs within VSCode, we are unable to effectively surface Eden-related issues/failures to users who are unaware that Eden is not healthy on their machine. This can lead to users being unable to use Eden-dependent services like Myles and Sapling. **Solution** To address this issue, we propose creating a new subcommand that performs critical checks related to Eden health. This subcommand will be lightweight and can be automated via VSCode periodic runs. **Critical Checks** The following critical checks should be included in the subcommand: - Eden Daemon Not Running: Check if the Eden daemon is running using eden run. - No Repo Mount Found: Check if any repositories are mounted and if the user is actively developing using Eden-checked out repos. - Corp/Prod Canal Certificates Missing/Expired: Check if Corp/Prod canal certificates are missing or expired, which would prevent Eden from operating. - Eden Stale Version: Check if the Eden version is older than 28 days from the current deployed or installed version. - Last Chef Age/Run: Check if Chef has run recently (ideally every 15 minutes) to ensure that the latest Eden version is installed. **Benefits** By implementing this subcommand, we can: - Surface Eden-related issues/failures to users more effectively - Improve user engagement with Eden-dependent services like Myles and Sapling - Reduce the likelihood of users blaming other systems for issues caused by Eden - Ensure that users have the latest version of Eden installed and running on their machines Reviewed By: jdelliot Differential Revision: D66439133 fbshipit-source-id: 63d43079a0860daa79451d2f61a4403d6e7fe387
- Loading branch information
1 parent
b09fef7
commit a2dae52
Showing
3 changed files
with
118 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters