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

[tmpnet] Deploy collectors with golang to simplify cross-repo use #3692

Draft
wants to merge 1 commit into
base: nix
Choose a base branch
from

Conversation

maru-ava
Copy link
Contributor

@maru-ava maru-ava commented Feb 2, 2025

Why this should be merged

Previously, prometheus and promtail were installed and launched by with bash scripts. Migrating installation to nix and launch to golang enables directly sharing the functionality with subnet-evm and hypersdk. No more having to copy and maintain copies of the scripts in multiple repos.

How this works

  • migrates scripts launching prometheus and promtail to golang
  • configures collector start by via the tmpnet e2e flag --enable-collectors

How this was tested

  • CI for regression
  • Manually checked that metrics and logs were collected from local and CI networks with the chnages

Need to be documented in RELEASES.md?

N/A

TODO

@maru-ava maru-ava added testing This primarily focuses on testing ci This focuses on changes to the CI process labels Feb 2, 2025
@maru-ava maru-ava self-assigned this Feb 2, 2025
@maru-ava maru-ava force-pushed the tmpnet-managed-collectors branch from b92d89b to 59e5357 Compare February 2, 2025 04:51
Previously, prometheus and promtail were installed and launched by
with bash scripts. Migrating installation to nix and launch to golang
enables directly sharing the functionality with subnet-evm and
hypersdk. No more having to copy and maintain copies of the scripts in
multiple repos.
Comment on lines +182 to +184
// TODO(marun) Figure out a way to redirect stdout and stderr of a detached child process without a bash shell
cmd := exec.Command("bash", "-c", fullCmd)
configureDetachedProcess(cmd) // Ensure the child process will outlive its parent
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe you can create the command and set Stdout and Stderr to nil directly (according to the docs)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please give it a try and get back to me, because my attempts to create a child process that outlives its parent and configured with stdout and stderr redirected to a file created and opened by that parent were entirely unsuccessful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci This focuses on changes to the CI process testing This primarily focuses on testing
Projects
Status: In Progress 🏗
Development

Successfully merging this pull request may close these issues.

2 participants