-
Notifications
You must be signed in to change notification settings - Fork 204
Introduce nativelink live #2003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ilsubyeega
wants to merge
1
commit into
TraceMachina:main
Choose a base branch
from
nade-nade:live
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,3 +115,5 @@ Brex | |
| Citrix | ||
| Menlo | ||
| benchmarked | ||
| Datahouse | ||
| WebSocket | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| dist | ||
| .wrangler | ||
| .output | ||
| .vercel | ||
| .netlify | ||
| .vinxi | ||
| app.config.timestamp_*.js | ||
|
|
||
| # Environment | ||
| .env | ||
| .env*.local | ||
|
|
||
| # dependencies | ||
| /node_modules | ||
|
|
||
| # IDEs and editors | ||
| /.idea | ||
| .project | ||
| .classpath | ||
| *.launch | ||
| .settings/ | ||
|
|
||
| # Temp | ||
| gitignore | ||
|
|
||
| # System Files | ||
| .DS_Store | ||
| Thumbs.db |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # nativelink-live | ||
| Live feed viewer for NativeLink. | ||
| This is useful when you want to see what's happening under the hood. | ||
|
|
||
| ## State | ||
| This is alpha software. It's not recommended for production use and not covered by SLA. | ||
|
|
||
| ## Usage | ||
| <!-- maybe live.nativelink.com --> | ||
| You can use the website we host(TBA), or you can self-host it yourself. | ||
| Since this is client-side only static web, you only need to get the service that serves these static files. | ||
|
|
||
| To build the static files, you need to have Node.js and `npm` installed. | ||
| Then, run the following commands: | ||
|
|
||
| ```bash | ||
| npm install | ||
| npm run build | ||
| ``` | ||
|
|
||
| This will create a `dist` directory with the static files. | ||
| You can serve this directory with any static file server, such as `nginx`, `caddy`, or `serve`. | ||
|
|
||
| TODO(ilsubyeega): add example configuration for serving this assets. | ||
|
|
||
| While for development, you may want to use `npm run dev` to start a local development server with hot-reload instead of building. | ||
|
|
||
| ## Screenshot | ||
| TBA | ||
|
|
||
| ## Goals | ||
| - Minimal code; minimal implementation. | ||
|
|
||
| ## Non-goals | ||
| - Invoking something on the NativeLink side; this is a read-only viewer. | ||
| - dedicated tenant support and auth; should be handled by reverse proxy in front of the app | ||
| - support old browser, this uses cutting-edge web technologies. | ||
|
|
||
| ## License | ||
|
|
||
| Copyright 2020–2025 Trace Machina, Inc. | ||
|
|
||
| Licensed under the Functional Source License, Version 1.1, Apache 2.0 Future License. | ||
| SPDX identifier: `FSL-1.1-Apache-2.0`. | ||
|
|
||
| After the second anniversary of the date this version was made available, you may use this | ||
| software under the Apache License, Version 2.0. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Modeling | ||
| - [x] Figure out how UUID works: it has been reviewed but not explict; just a probability of like lottery | ||
| - [ ] WebSockets or HTTP Streaming? | ||
| - [ ] Modelling the data structure | ||
|
|
||
| # Impl | ||
|
|
||
| # Testing | ||
| - [ ] Figure out how-to interatively test UIs | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Datahouse | ||
| Datahouse saves every activities from nativelink instances for metrics and provide APIs for querying. | ||
|
|
||
| ## APIs | ||
| - `GET /detail/:id` - Get the detail of a specific action by its ID. Datahouse will collect when: action is first created and then completed. | ||
|
|
||
| # Live Activity Monitor | ||
| This service should collect every components from nativelink instances and then expose them via WebSocket. | ||
| - WebSocket endpoint: `/ws?version=<NATIVELINK_LIVE_VERISON>` | ||
| - For WebSocket formats, see [WEBSOCKETS.md](WEBSOCKETS.md) | ||
|
|
||
| ## APIs | ||
| - `GET /activities/overall` - Get the overall statistics of activities. | ||
| - `GET /status/:id` - Get the status of a specific action by its ID. The service will cache the status for a while even if the action is completed. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # Concepts | ||
|
|
||
| This document describes the concepts behind `nativelink-live`, a real-time live feed viewer for NativeLink. | ||
| It's intended to provide insight into the inner workings of NativeLink by displaying live data feeds. | ||
|
|
||
| ## Key Components | ||
|
|
||
| ### Live Activity Monitor | ||
|
|
||
| This feature offers a real-time, filterable view of all activities occurring within NativeLink. | ||
| It allows users to monitor events as they happen, providing immediate insights into system operations. | ||
|
|
||
| #### Key Capabilities: | ||
|
|
||
| - View real-time activities. | ||
| - Filter activities by various criteria (for example, type, status). | ||
| - Type: All, Upload, Download, Clients, Executions, Others | ||
| - Status: All, Success, In Progress, Queued, Failed, Canceled | ||
| - Search for specific activities using keywords. | ||
| - Clicking the item would show like: Details, `Stdout`, `Stderr` (if applicable), Timestamp. | ||
|
|
||
| ### Worker Status Dashboard | ||
|
|
||
| This dashboard provides a overview of the status of all workers in the NativeLink clusters. | ||
| It displays information such as status, information, and metrics of each worker. | ||
|
|
||
| #### Key Capabilities: | ||
|
|
||
| - View the information of all workers. | ||
| - Worker ID, Live Metrics(CPU, Memory, Disk, Network), Assigned Actions, Last Heartbeat | ||
| - Status: Idle, Working, Unavailable, Offline | ||
| - Idle: The worker is online and waiting for tasks. | ||
| - Working: The worker is currently processing tasks. Also has sub-statuses: Downloading, Executing, Uploading | ||
| - Unavailable: Temporarily unable to connect. Maybe worker is dead? | ||
| - Offline: The worker is offline and not available for tasks. | ||
| - Shows the assigned actions to each worker by tree-view. | ||
| - Search for specific workers using keywords. | ||
|
|
||
| ### Storage Status Overview | ||
|
|
||
| This overview provides a summary of the status of all storage connected to NativeLink. | ||
| It displays information such as status, configuration, and usage of each storage. | ||
|
|
||
| ### Client Connection Overview | ||
|
|
||
| This overview provides a summary of the status of all clients connected to NativeLink. | ||
| This helps to identify which clients are interacting with the nativelink cluster, what they're doing. | ||
|
|
||
| #### Key Capabilities: | ||
| Client ID, Connection Info, Status(Idle, Disconnected), Metrics(total execution, data transferred, last seen), Activities | ||
|
|
||
| ### Log stream viewer | ||
|
|
||
| This feature provides a real-time stream of logs from NativeLink components. | ||
| It allows of users/devs to monitor logs and deep-dive debugging without requiring terminal access of nativelink. | ||
| The UI should be similar as Chromium's console tab viewer. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # WebSocket | ||
| Live feed should be fed by WebSocket server, for real-time purpose. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <meta name="theme-color" content="#000000" /> | ||
| <link rel="icon" type="image/png" href="https://nativelink-cdn.s3.us-east-1.amazonaws.com/nativelink_favicon.png" /> | ||
| <link rel="stylesheet" href="src/index.css" /> | ||
| <title>Nativelink Live</title> | ||
| </head> | ||
| <body> | ||
| <noscript>You need to enable JavaScript to run this app.</noscript> | ||
| <div id="root"></div> | ||
|
|
||
| <script src="/src/index.tsx" type="module"></script> | ||
| </body> | ||
| </html> |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "name": "nativelink-live", | ||
| "type": "module", | ||
| "dependencies": { | ||
| "material-symbols": "^0.36.3", | ||
| "solid-js": "^1.9.9" | ||
| }, | ||
| "description": "Live view for nativelink", | ||
| "devDependencies": { | ||
| "@solidjs/testing-library": "^0.8.10", | ||
| "@testing-library/jest-dom": "^6.9.1", | ||
| "@testing-library/user-event": "^14.6.1", | ||
| "@vitest/browser": "4.0.0-beta.17", | ||
| "@vitest/browser-preview": "4.0.0-beta.17", | ||
| "jsdom": "^25.0.1", | ||
| "solid-devtools": "^0.34.4", | ||
| "typescript": "^5.9.3", | ||
| "vite": "^7.1.9", | ||
| "vite-plugin-solid": "2.11.8", | ||
| "vitest": "4.0.0-beta.17" | ||
| }, | ||
| "license": "MIT", | ||
| "scripts": { | ||
| "build": "vite build", | ||
| "dev": "vite", | ||
| "serve": "vite preview", | ||
| "start": "vite", | ||
| "test": "vitest" | ||
| }, | ||
| "version": "0.0.0" | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.