fix: add wf registry command#4714
Conversation
|
🚅 Deployed to the rivet-pr-4714 environment in rivet-frontend
|
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR #4714 ReviewSummary of changes:
Bug: span.record() calls are no-ops (pegboard-envoy/src/lib.rs)The new span.record(...) calls in handle_websocket will be silently ignored at runtime. In tracing 0.1.x, Span::record() only has effect if the field was pre-declared in the #[tracing::instrument] macro's fields(...) argument. The handle_websocket function uses #[tracing::instrument(skip_all)] with no fields(...) clause, so neither namespace_id nor envoy_key are declared on the span and the record calls are no-ops. The correct pattern is to declare the fields upfront: #[tracing::instrument(skip_all, fields(namespace_id, envoy_key))]
async fn handle_websocket(...) {
span.record("namespace_id", conn.namespace_id.to_string());
span.record("envoy_key", &conn.envoy_key);
}Minor IssuesRegistry variant missing doc comment All other SubCommand variants use /// doc comments that clap renders as help text. The Registry variant uses a regular // comment, so engine wf registry --help will show no description. Change to: /// Prints the current workflow registry. Registry command initializes DB/pools unnecessarily execute() always creates Pools and DatabaseKv before the match self dispatch, so running engine wf registry incurs a full DB pool initialization even though Registry never uses db. Consider restructuring execute() to only initialize db for variants that need it. Registry variant style Minor style inconsistency: all other zero-field variants in this file use the bare form (e.g. Registry rather than Registry {}). Positive Observations
|
dfd9202 to
b4e1f50
Compare
db1b306 to
a696272
Compare
a696272 to
741b7d4
Compare
b4e1f50 to
39b3555
Compare
741b7d4 to
ff10f7c
Compare
39b3555 to
2daf067
Compare
2daf067 to
f8853a2
Compare

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: