这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@u5surf
Copy link
Owner

@u5surf u5surf commented Sep 15, 2025

Summary

  • Remove "# Upstream Zones:" section and detailed summaries from VTS status output
  • Keep only Prometheus metrics for programmatic access
  • Update all test assertions to match new output format

Changes

  • Remove upstream zone summary generation code from generate_vts_status_content()
  • Remove human-readable server summaries (e.g., "backend: 1 servers, 1 total requests")
  • Remove detailed server statistics (e.g., "127.0.0.1:8080: 1 req, 0ms avg")
  • Update test files to remove expectations for summary format
  • Maintain all Prometheus metrics for machine-readable access

Impact

The VTS status endpoint now outputs a cleaner format focused on:

  1. Basic module information (version, status, hostname)
  2. Prometheus metrics for all upstream statistics

This simplifies the output and removes redundant human-readable summaries while preserving all statistical data in Prometheus format.

🤖 Generated with Claude Code

u5surf and others added 4 commits September 16, 2025 08:36
- Remove "# Upstream Zones:" section from status output
- Remove individual server summary lines (e.g., "backend: 1 servers, 1 total requests")
- Remove detailed server statistics (e.g., "127.0.0.1:8080: 1 req, 0ms avg")
- Remove "# Total Upstream Zones: N" counter
- Update all test assertions to remove expectations for summary format
- Keep Prometheus metrics intact for programmatic access

The VTS status now only shows:
1. Basic module information (version, status, hostname)
2. Prometheus metrics for all upstream statistics

This simplifies the output format and focuses on machine-readable metrics
rather than human-readable summaries.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove extra blank lines for consistent code formatting.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove remaining assertions expecting upstream zone summary format
- Fix mutex poisoning errors by handling PoisonError gracefully
- Update all test files to use poison-safe mutex operations
- Replace format-specific checks with Prometheus metrics assertions

Changes:
- Replace `.unwrap()` with proper poison handling for GLOBAL_VTS_TEST_MUTEX
- Use match expressions to handle both Ok and Err(PoisonError) cases for VTS_MANAGER
- Remove assertions checking for "# Total Upstream Zones:" format
- Remove assertions checking for "Xms avg" summary format
- Replace with nginx_vts_upstream_response_seconds metric checks

All 34 tests now pass successfully.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@u5surf u5surf requested a review from Copilot September 16, 2025 08:04
Copy link
Contributor

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 removes human-readable upstream zone summaries from the VTS status output while preserving Prometheus metrics for programmatic access. The changes simplify the status endpoint output by eliminating redundant summary information.

Key changes:

  • Remove upstream zone summary section generation from status output
  • Update error handling for poisoned mutex locks throughout test files
  • Remove test assertions that checked for human-readable summary format

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
testing.sh New test script with shell path error
test_log_phase_handler.rs Updates mutex handling and removes summary format assertions
test_issue3_resolution.rs Updates mutex handling and removes upstream zone summary checks
test_issue3_integrated_flow.rs Updates mutex handling and removes summary format expectations
test_issue2_resolution.rs Updates mutex handling and removes summary assertions
test_issue1_resolution.rs Updates mutex handling and removes backend summary checks
src/lib.rs Removes upstream zone summary generation code and updates integration tests

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

u5surf and others added 2 commits September 16, 2025 18:07
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@u5surf u5surf merged commit db568a7 into main Sep 16, 2025
4 checks passed
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