Skip to content
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

[rush-serve-plugin] Add build status monitoring via WebSocket #4328

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

dmichon-msft
Copy link
Contributor

Summary

Adds a new configuration option buildStatusWebSocketPath to @rushstack/rush-serve-plugin that, when configured, enables a secure web socket server at wss://localhost:${port}${buildStatusWebSocketPath}.

A client can connect a WebSocket at the aforementioned path to receive information about the status of the current watch-mode build command.

Details

Upon connecting a WebSocket to the server, the plugin will send a sync message that lists all current operations and their statuses, the overall status of the build, and some metadata about the current session (the name of the command, the machine the command is running on).

Whenever the status of one or more operations in the build graph changes, a status-change message will be sent with the new states of the affected operations.

Upon completion of the build, an after-execute message will be sent, containing the final aggregate build status.

Future Work

Add support for fetching build logs and streaming log content.

How it was tested

Temporarily connected rush-serve-plugin to be one of the default Rush plugins in start-dev.js.
Configured a global rule to host a static HTML page that connected to the web socket server and monitored for live updates.

Impacted documentation

The list of OperationStatus values in Rush. The package documentation and schema for @rushstack/rush-serve-plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants