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

feat(pegboard): add process monitoring, wip sqlite #1146

Conversation

MasterPtato
Copy link
Contributor

@MasterPtato MasterPtato commented Sep 13, 2024

Fixes RVTEE-608

Changes

Copy link
Contributor

graphite-app bot commented Sep 13, 2024

Your org requires the Graphite merge queue for merging into main

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

You can enable merging using labels in your Graphite merge queue settings.

Copy link
Contributor Author

MasterPtato commented Sep 13, 2024

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.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @MasterPtato and the rest of your teammates on Graphite Graphite

Copy link

linear bot commented Sep 13, 2024

RVTEE-608

@MasterPtato MasterPtato force-pushed the 09-12-feat_pegboard_add_ws_tunnel branch from c3855c3 to 0d527ab Compare September 14, 2024 01:38
@MasterPtato MasterPtato force-pushed the 09-13-feat_pegboard_add_process_monitoring_wip_sqlite branch from 81dbbe7 to d3132bc Compare September 14, 2024 01:39
@MasterPtato MasterPtato marked this pull request as ready for review September 25, 2024 02:26
@MasterPtato MasterPtato force-pushed the 09-12-feat_pegboard_add_ws_tunnel branch from 0d527ab to 9b3c0cd Compare September 28, 2024 00:24
@MasterPtato MasterPtato force-pushed the 09-13-feat_pegboard_add_process_monitoring_wip_sqlite branch from d3132bc to 92504c4 Compare September 28, 2024 00:24
@MasterPtato MasterPtato force-pushed the 09-12-feat_pegboard_add_ws_tunnel branch from 9b3c0cd to 7920edb Compare September 29, 2024 21:46
@MasterPtato MasterPtato force-pushed the 09-13-feat_pegboard_add_process_monitoring_wip_sqlite branch from 92504c4 to 36cebf1 Compare September 29, 2024 21:46
@MasterPtato MasterPtato force-pushed the 09-12-feat_pegboard_add_ws_tunnel branch from 7920edb to c5a2d95 Compare October 1, 2024 18:08
@MasterPtato MasterPtato force-pushed the 09-13-feat_pegboard_add_process_monitoring_wip_sqlite branch from 36cebf1 to 281896a Compare October 1, 2024 18:09
This was referenced Oct 1, 2024
Ok((watcher, rx))
}

pub async fn wait_for_creation<P: AsRef<Path>>(path: P) -> Result<()> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure the systemd service has enough watchers configured. write the calculation in the comments (i.e. supports X containers * Y watchers per container) and comment in this func to update the systemd watcher count too

use sqlx::Error::*;

if i > MAX_QUERY_RETRIES {
bail!("max sql retries: {err}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where do these errors get written & monitored? we need to be able to catch every tiny issue with pb monitors

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was planning on having vector pick up the logs from the manager and stream them to the backend. Didn't get to it for MVP I don't think

}
}

async fn send_packet(&self, packet: protocol::ToServer) -> Result<()> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens on failure? how are all socket close edge cases handled/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the manager errors then restarts and reconnects to the ws

async fn write_event(&self, event: &protocol::Event) -> Result<()> {
// Write event to db
let event_json = serde_json::to_vec(event)?;
utils::query(|| async {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this edge case failure handled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which failure? the serde_json::to_vec?

use client::Client;
use ctx::Ctx;

const PROTOCOL_VERSION: u16 = 1;

#[tokio::main]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we use a current threaded scheduler or limit the threads to 2? this is currently multithreaded, will spin up a lot of excess threads.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do the same in the toolchain

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk how much parallelism we'll actually need

Copy link
Contributor

graphite-app bot commented Oct 9, 2024

Merge activity

NathanFlurry pushed a commit that referenced this pull request Oct 9, 2024
<!-- Please make sure there is an issue that this PR is correlated to. -->
Fixes RVTEE-608
## Changes

<!-- If there are frontend changes, please include screenshots. -->
@graphite-app graphite-app bot closed this Oct 9, 2024
@graphite-app graphite-app bot deleted the 09-13-feat_pegboard_add_process_monitoring_wip_sqlite branch October 9, 2024 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants