Skip to content

Conversation

@yurishkuro
Copy link
Member

No description provided.

Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
@yurishkuro yurishkuro requested a review from a team as a code owner December 7, 2025 19:51
@yurishkuro yurishkuro added the changelog:refactoring Internal code refactoring without functional changes label Dec 7, 2025
@codecov
Copy link

codecov bot commented Dec 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.19%. Comparing base (2ef635f) to head (85dd92a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7711      +/-   ##
==========================================
- Coverage   96.25%   96.19%   -0.06%     
==========================================
  Files         315      313       -2     
  Lines       16188    16015     -173     
==========================================
- Hits        15581    15406     -175     
- Misses        447      448       +1     
- Partials      160      161       +1     
Flag Coverage Δ
badger_v1 9.38% <0.00%> (+0.17%) ⬆️
badger_v2 1.96% <0.00%> (+0.03%) ⬆️
cassandra-4.x-v1-manual 13.34% <0.00%> (+0.25%) ⬆️
cassandra-4.x-v2-auto ?
cassandra-4.x-v2-manual 1.95% <0.00%> (+0.03%) ⬆️
cassandra-5.x-v1-manual 13.34% <0.00%> (+0.25%) ⬆️
cassandra-5.x-v2-auto 1.95% <0.00%> (+0.03%) ⬆️
cassandra-5.x-v2-manual 1.95% <0.00%> (+0.03%) ⬆️
clickhouse 1.88% <0.00%> (+0.03%) ⬆️
elasticsearch-6.x-v1 17.80% <0.00%> (+0.33%) ⬆️
elasticsearch-7.x-v1 17.84% <0.00%> (+0.33%) ⬆️
elasticsearch-8.x-v1 17.99% <0.00%> (+0.33%) ⬆️
elasticsearch-8.x-v2 1.96% <0.00%> (+0.03%) ⬆️
elasticsearch-9.x-v2 1.96% <0.00%> (+0.03%) ⬆️
grpc_v1 9.18% <75.00%> (+0.17%) ⬆️
grpc_v2 1.96% <0.00%> (+0.03%) ⬆️
kafka-3.x-v2 1.96% <0.00%> (+0.03%) ⬆️
memory_v2 1.96% <0.00%> (+0.03%) ⬆️
opensearch-1.x-v1 17.88% <0.00%> (+0.33%) ⬆️
opensearch-2.x-v1 17.88% <0.00%> (+0.33%) ⬆️
opensearch-2.x-v2 1.96% <0.00%> (+0.03%) ⬆️
opensearch-3.x-v2 1.96% <0.00%> (+0.03%) ⬆️
query 1.96% <0.00%> (+0.03%) ⬆️
tailsampling-processor 0.57% <0.00%> (+0.01%) ⬆️
unittests 94.81% <100.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Yuri Shkuro <[email protected]>
@github-actions
Copy link

github-actions bot commented Dec 7, 2025

Metrics Comparison Summary

Total changes across all snapshots: 53

Detailed changes per snapshot

summary_metrics_snapshot_cassandra

📊 Metrics Diff Summary

Total Changes: 53

  • 🆕 Added: 0 metrics
  • ❌ Removed: 53 metrics
  • 🔄 Modified: 0 metrics

❌ Removed Metrics

  • http_server_request_body_size_bytes (18 variants)
View diff sample
-http_server_request_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="+Inf",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_request_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="0",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_request_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="10",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_request_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="100",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_request_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="1000",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_request_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="10000",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_request_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="25",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
...
- `http_server_request_duration_seconds` (17 variants)
View diff sample
-http_server_request_duration_seconds{http_request_method="GET",http_response_status_code="503",le="+Inf",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_request_duration_seconds{http_request_method="GET",http_response_status_code="503",le="0.005",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_request_duration_seconds{http_request_method="GET",http_response_status_code="503",le="0.01",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_request_duration_seconds{http_request_method="GET",http_response_status_code="503",le="0.025",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_request_duration_seconds{http_request_method="GET",http_response_status_code="503",le="0.05",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_request_duration_seconds{http_request_method="GET",http_response_status_code="503",le="0.075",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_request_duration_seconds{http_request_method="GET",http_response_status_code="503",le="0.1",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
...
- `http_server_response_body_size_bytes` (18 variants)
View diff sample
-http_server_response_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="+Inf",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_response_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="0",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_response_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="10",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_response_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="100",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_response_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="1000",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_response_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="10000",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
-http_server_response_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="25",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
...

➡️ View full metrics file

@yurishkuro yurishkuro merged commit 22b0b0e into jaegertracing:main Dec 7, 2025
61 checks passed
@yurishkuro yurishkuro deleted the delete-more-dead-code2 branch December 7, 2025 20:12
yurishkuro added a commit that referenced this pull request Dec 8, 2025
## Summary

This PR successfully removes all usage of `config.Viperize` from tests
under `internal/storage/...`. According to the issue, these tests should
use direct config struct initialization instead of flag-based
configuration via Viperize, as CLI flag-based configuration for storage
backends has been removed in recent PRs.

## Changes Made

### Modified Test Files:
1. ~~**internal/storage/v1/memory/options_test.go**~~ - *Removed in main
branch (v1/memory implementation deleted)*
2. **internal/storage/v1/badger/options_test.go**: Removed Viperize
usage, tests now create `Config` structs directly (3 tests)
3. **internal/storage/v1/grpc/options_test.go**: Removed Viperize usage,
tests now create `Config` structs directly (3 tests)
4. **internal/storage/metricstore/prometheus/options_test.go**: Removed
Viperize usage, tests now create `Configuration` structs directly (2
tests)
5. **internal/storage/v1/elasticsearch/options_test.go**: Removed
Viperize usage from 11 tests. Also removed two tests that tested flag
registration behavior, and skipped one test that tested flag parsing
error handling (no longer relevant).

### Test Coverage
- All existing tests continue to pass with 100% success rate
- Tests verify the same behavior as before - just using direct config
initialization instead of flag parsing
- Total of 19 tests refactored across 4 files (memory tests removed with
v1/memory deletion)

### Code Quality Improvements
- Removed unused imports (fmt, flag, config packages)
- Added clarifying comments for date layout format strings
- Improved assertion logic clarity using explicit boolean conditions
- Fixed TestAuthenticationConditionalCreation to properly validate
expected values

## Validation
✅ All storage tests pass successfully:
- `internal/storage/v1/elasticsearch/...` - PASS
- `internal/storage/v1/badger/...` - PASS
- `internal/storage/v1/grpc/...` - PASS
- `internal/storage/metricstore/prometheus/...` - PASS

## Conflict Resolution
Resolved conflict where `internal/storage/v1/memory/options_test.go` was
deleted in main branch (v1/memory implementation removed in #7711).
**Rebased onto main branch** to keep PR history clean showing only 5
file changes.

---

- [x] Understand the issue and current code structure
- [x] Remove Viperize usage from
internal/storage/v1/grpc/options_test.go (3 tests)
- [x] Remove Viperize usage from
internal/storage/v1/elasticsearch/options_test.go (11 tests)
- [x] Remove Viperize usage from
internal/storage/v1/badger/options_test.go (3 tests)
- [x] ~~Remove Viperize usage from
internal/storage/v1/memory/options_test.go (1 test)~~ - File removed in
main
- [x] Remove Viperize usage from
internal/storage/metricstore/prometheus/options_test.go (2 tests)
- [x] Run tests to verify changes work correctly
- [x] Code review and address feedback
- [x] Rebase onto main branch
- [x] Fix test validation in TestAuthenticationConditionalCreation

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> in internal/config/config.go there is a function Viperize. It is only
used in tests. In recent PRs we removed all support for CLI flag based
configuration for storage backends so no tests under
internal/storage/... should be using Viperize and the corresponding
initialization of the factories via viper, they should be using direct
initialization via config struct.


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Signed-off-by: Yuri Shkuro <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: yurishkuro <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/storage changelog:refactoring Internal code refactoring without functional changes enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants