Skip to content

feat(storagenode): add empty payload validation #1001

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 2 commits into from
Mar 31, 2025

Conversation

ijsong
Copy link
Member

@ijsong ijsong commented Feb 26, 2025

What this PR does

Add validation for empty payloads in the Append RPC. If there is no payload in
the append request, the RPC returns a gRPC status code of InvalidArgument.

@ijsong ijsong requested a review from hungryjang as a code owner February 26, 2025 16:21
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 18.75000% with 13 lines in your changes missing coverage. Please review.

Project coverage is 79.85%. Comparing base (15d90d2) to head (4e574d8).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pkg/util/telemetry/metric_provider.go 0.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1001      +/-   ##
==========================================
+ Coverage   79.74%   79.85%   +0.11%     
==========================================
  Files         178      178              
  Lines       21478    21493      +15     
==========================================
+ Hits        17127    17163      +36     
+ Misses       3562     3550      -12     
+ Partials      789      780       -9     

☔ 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.

@ijsong ijsong force-pushed the new_and_deprecated_opentelemetry_runtime_metrics branch from d0cd709 to 0f36126 Compare March 5, 2025 11:50
@ijsong ijsong force-pushed the append_empty_payload_validation branch from 19ff247 to 06ca186 Compare March 5, 2025 11:50
@ijsong ijsong force-pushed the new_and_deprecated_opentelemetry_runtime_metrics branch from 0f36126 to 21cfc1d Compare March 6, 2025 10:23
@ijsong ijsong force-pushed the append_empty_payload_validation branch from 06ca186 to f4daea5 Compare March 6, 2025 10:23
@ijsong ijsong force-pushed the new_and_deprecated_opentelemetry_runtime_metrics branch from 21cfc1d to 469806f Compare March 8, 2025 13:07
@ijsong ijsong force-pushed the append_empty_payload_validation branch from f4daea5 to ecd80e5 Compare March 8, 2025 13:07
@ijsong ijsong force-pushed the new_and_deprecated_opentelemetry_runtime_metrics branch from 469806f to 4df0785 Compare March 14, 2025 14:11
@ijsong ijsong force-pushed the append_empty_payload_validation branch from ecd80e5 to 4b4c051 Compare March 14, 2025 14:12
@ijsong ijsong force-pushed the new_and_deprecated_opentelemetry_runtime_metrics branch from 4df0785 to 2d70879 Compare March 26, 2025 15:10
@ijsong ijsong force-pushed the append_empty_payload_validation branch from 4b4c051 to 2c8a69b Compare March 26, 2025 15:10
@ijsong ijsong force-pushed the new_and_deprecated_opentelemetry_runtime_metrics branch from 2d70879 to 5bb0699 Compare March 29, 2025 11:22
@ijsong ijsong force-pushed the append_empty_payload_validation branch from 2c8a69b to 7b17c35 Compare March 29, 2025 11:22
@ijsong ijsong force-pushed the new_and_deprecated_opentelemetry_runtime_metrics branch from 5bb0699 to 1b1a201 Compare March 29, 2025 13:33
@ijsong ijsong force-pushed the append_empty_payload_validation branch from 7b17c35 to 33d7d79 Compare March 29, 2025 13:33
ijsong added 2 commits March 29, 2025 23:10
…e metrics

This commit enables Varlog to support both new and deprecated OpenTelemetry
runtime metrics.

Previously, Varlog only supported the deprecated runtime instrumentation. This
change ensures backward compatibility by simultaneously setting the
`OTEL_GO_X_DEPRECATED_RUNTIME_METRICS` environment variable and using the new
version.

This enhancement allows Varlog to leverage the latest OpenTelemetry features
while maintaining compatibility with older versions, collecting more
comprehensive runtime metrics.
Add validation for empty payloads in the Append RPC. If there is no payload
in the append request, the RPC returns a gRPC status code of InvalidArgument.
@ijsong ijsong force-pushed the new_and_deprecated_opentelemetry_runtime_metrics branch from 1b1a201 to 7777924 Compare March 29, 2025 14:10
@ijsong ijsong force-pushed the append_empty_payload_validation branch from 33d7d79 to 4e574d8 Compare March 29, 2025 14:10
Base automatically changed from new_and_deprecated_opentelemetry_runtime_metrics to main March 31, 2025 08:39
@ijsong ijsong merged commit feccb64 into main Mar 31, 2025
10 checks passed
@ijsong ijsong deleted the append_empty_payload_validation branch March 31, 2025 08:39
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