Skip to content

[tmpnet] Move monitoring label handling to node #3898

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

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

maru-ava
Copy link
Contributor

@maru-ava maru-ava commented Apr 18, 2025

PR Chain: tmpnet+kube

This PR chain enables tmpnet to deploy temporary networks to Kubernetes. Early PRs refactor tmpnet to support the addition in #3615 of a new tmpnet node runtime for kube.

Why this should be merged

Previously, determination of labels to apply to collected logs and metrics was the responsibility of the process runtime. Since these labels are common to both runtimes, it makes sense for the node to own it.

How this was tested

CI

Need to be documented in RELEASES.md?

N/A

TODO

@maru-ava maru-ava added the tooling Build, test and development tooling label Apr 18, 2025
@maru-ava maru-ava requested a review from Copilot April 18, 2025 00:36
@maru-ava maru-ava self-assigned this Apr 18, 2025
@github-project-automation github-project-automation bot moved this to Backlog 🗄️ in avalanchego Apr 18, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR centralizes the handling of monitoring labels by moving the logic from the process runtime to the node, ensuring that both log and metric collection use the same label source.

  • Removed inline monitoring label generation from process_runtime.go
  • Introduced getMonitoringLabels() in node.go to encapsulate label determination
  • Updated check_monitoring.go to use environment variables directly for GitHub labels selectors

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tests/fixture/tmpnet/process_runtime.go Removed explicit label mapping; now calls getMonitoringLabels()
tests/fixture/tmpnet/node.go Added getMonitoringLabels() and a global githubLabels variable for label names
tests/fixture/tmpnet/check_monitoring.go Revised fallback logic to retrieve GitHub labels directly from environment variables

@maru-ava maru-ava moved this from Backlog 🗄️ to In Review 👀 in avalanchego Apr 18, 2025
@maru-ava maru-ava force-pushed the tmpnet-runtime-flag-writing branch from 2cf574c to a6d0977 Compare April 19, 2025 00:09
@maru-ava maru-ava force-pushed the tmpnet-move-monitoring-label-handling branch from 5ccfadb to 324a27a Compare April 19, 2025 00:11
Base automatically changed from tmpnet-runtime-flag-writing to master April 28, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Build, test and development tooling
Projects
Status: Done 🎉
Development

Successfully merging this pull request may close these issues.

3 participants