Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[tmpnet] Misc cleanup for monitoring tooling #3527

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

marun
Copy link
Contributor

@marun marun commented Nov 7, 2024

Why this should be merged

Cleanup DX for local monitoring in preparation for lightning talk.

How this works

  • monitoring scripts output the command to kill the collector they start
  • update script output to be ensure uniform casing
  • write the monitoring url for a local node and tmpnet nodes to their respective node paths for later use
  • update README

How this was tested

Manually

Need to be documented in RELEASES.md?

No

 - monitoring scripts output the command to kill the collector they start
 - make script output uniformly cased
 - write the monitoring url for a local node and tmpnet nodes to their
   respective node paths for later use
@marun marun added the testing This primarily focuses on testing label Nov 7, 2024
@marun marun self-assigned this Nov 7, 2024

// Write link to the network path and to stdout
metricsPath := filepath.Join(n.Dir, "metrics.txt")
if err := os.WriteFile(metricsPath, []byte(metricsURL+"\n"), perms.ReadWrite); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

perms.ReadWrite this is genius!

@yacovm
Copy link
Contributor

yacovm commented Nov 7, 2024


echo 'To stop prometheus: "kill -SIGTERM `cat ~/.tmpnet/prometheus/run.pid` && rm ~/.tmpnet/prometheus/run.pid"'
     ^-- SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.

@StephenButtolph
Copy link
Contributor

echo 'To stop prometheus: "kill -SIGTERM `cat ~/.tmpnet/prometheus/run.pid` && rm ~/.tmpnet/prometheus/run.pid"'
     ^-- SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.

It seems like the intent is for this to be written exactly as written, without evaluating any expressions.

@StephenButtolph
Copy link
Contributor

Ah - it is causing CI to fail

@marun
Copy link
Contributor Author

marun commented Nov 7, 2024

Updated to ignore shellcheck failures, since the intent is to output the literal rather than evaluated version of the text.

@StephenButtolph StephenButtolph added this pull request to the merge queue Nov 7, 2024
Merged via the queue into master with commit b28affe Nov 7, 2024
23 checks passed
@StephenButtolph StephenButtolph deleted the cleanup-monitoring-scripts branch November 7, 2024 19:05
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
testing This primarily focuses on testing
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants