Skip to content
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

chore(config): fix invalid enum schemas + provide more enum metadata #14586

Merged
merged 5 commits into from
Sep 28, 2022

Conversation

tobz
Copy link
Contributor

@tobz tobz commented Sep 26, 2022

Context

This PR addresses two problems with the current configuration schema generation: types with invalid schemas, and a loss of information for enums and their variants.

First, we've fixed the schema for some common enums -- Compression, Concurrency, and TimeZone -- that had invalid schemas due to their use of specialized (de)serialization logic. As the types themselves did not have a shape that matched what we would allow deserializing from, this meant the schema did not accurately reflect what users can put in a configuration.

We've manually implemented Configurable for these types, with the hope that we can further enhance the procedural macros in the future to allow more control around describing the true shape of a type, or potentially move them over to using specialized serde (de)serialization helpers where we can do these hand-rolled implementations in a single place, and vet them accordingly.

Second, we've added a new piece of metadata for enum variants: the "logical" name. This is a new metadata attribute that gets added to the schema for every enum variant and specifies the ident of the variant itself.

In many cases, the title/description of an enum variant are more human-centric in terms of describing how the variant is used, but there's also a common need/desire for a friendly identifier that can be used to differentiate variants, without necessarily having to add hard-coded logic that has to know that we use const schemas to describe enum tagging fields, and so on.

With logical_name, consumers of the schema can now actually better detect when a schema represents a true enum, instead of situations dealing with multiple parsing strategies (i.e. Compression allowing a single string or object).

@tobz tobz added the ci-condition: integration tests enable Run integration tests on this PR label Sep 26, 2022
@netlify
Copy link

netlify bot commented Sep 26, 2022

Deploy Preview for vector-project canceled.

Name Link
🔨 Latest commit 951ee4a
🔍 Latest deploy log https://app.netlify.com/sites/vector-project/deploys/633448d2a820920008960072

@github-actions github-actions bot added domain: core Anything related to core crates i.e. vector-core, core-common, etc domain: sinks Anything related to the Vector's sinks domain: vrl Anything related to the Vector Remap Language labels Sep 26, 2022
@github-actions
Copy link

Soak Test Results

Baseline: 6b8c9da
Comparison: 9248e87
Total Vector CPUs: 4

Explanation

A soak test is an integrated performance test for vector in a repeatable rig, with varying configuration for vector. What follows is a statistical summary of a brief vector run for each configuration across SHAs given above. The goal of these tests are to determine, quickly, if vector performance is changed and to what degree by a pull request. Where appropriate units are scaled per-core.

The table below, if present, lists those experiments that have experienced a statistically significant change in their throughput performance between baseline and comparision SHAs, with 90.0% confidence OR have been detected as newly erratic. Negative values mean that baseline is faster, positive comparison. Results that do not exhibit more than a ±8.87% change in mean throughput are discarded. An experiment is erratic if its coefficient of variation is greater than 0.3. The abbreviated table will be omitted if no interesting changes are observed.

No interesting changes in throughput with confidence ≥ 90.00% and absolute Δ mean >= ±8.87%:

Fine details of change detection per experiment.
experiment Δ mean Δ mean % confidence baseline mean baseline stdev baseline stderr baseline outlier % baseline CoV comparison mean comparison stdev comparison stderr comparison outlier % comparison CoV erratic declared erratic
socket_to_socket_blackhole 542.79KiB 2.28 100.00% 23.27MiB 214.53KiB 4.38KiB 0 0.0090016 23.8MiB 342.1KiB 6.99KiB 0 0.0140348 False False
splunk_hec_route_s3 342.84KiB 1.79 100.00% 18.69MiB 2.28MiB 47.38KiB 0 0.121767 19.02MiB 2.16MiB 45.16KiB 0 0.113493 False False
datadog_agent_remap_blackhole 862.72KiB 1.42 100.00% 59.41MiB 3.99MiB 83.21KiB 0 0.0672058 60.25MiB 2.9MiB 60.44KiB 0 0.0480644 False False
syslog_loki 94.7KiB 0.64 100.00% 14.44MiB 328.48KiB 6.72KiB 0 0.0222134 14.53MiB 746.42KiB 15.17KiB 0 0.0501557 False False
datadog_agent_remap_blackhole_acks 303.29KiB 0.49 99.80% 60.17MiB 4.28MiB 89.17KiB 0 0.0711638 60.47MiB 1.93MiB 40.39KiB 0 0.0318586 False False
splunk_hec_to_splunk_hec_logs_noack 16.63KiB 0.07 84.21% 23.82MiB 470.2KiB 9.6KiB 0 0.0192698 23.84MiB 333.93KiB 6.82KiB 0 0.0136758 False False
syslog_regex_logs2metric_ddmetrics 7.89KiB 0.06 38.77% 12.12MiB 602.09KiB 12.26KiB 0 0.048519 12.12MiB 471.32KiB 9.61KiB 0 0.037957 False False
http_pipelines_blackhole_acks 183.89B 0.01 5.38% 1.22MiB 109.51KiB 2.23KiB 0 0.0876475 1.22MiB 71.26KiB 1.45KiB 0 0.0570269 False False
splunk_hec_indexer_ack_blackhole 1.07KiB 0 3.20% 23.74MiB 923.63KiB 18.78KiB 0 0.037986 23.74MiB 930.42KiB 18.92KiB 0 0.0382633 False False
enterprise_http_to_http -2.81KiB -0.01 28.91% 23.85MiB 259.3KiB 5.29KiB 0 0.0106165 23.84MiB 265.85KiB 5.44KiB 0 0.0108859 False False
splunk_hec_to_splunk_hec_logs_acks -6.54KiB -0.03 20.86% 23.76MiB 841.97KiB 17.13KiB 0 0.0346057 23.75MiB 877.02KiB 17.84KiB 0 0.036056 False False
file_to_blackhole -60.92KiB -0.06 46.48% 95.34MiB 3.12MiB 64.59KiB 0 0.0326734 95.28MiB 3.56MiB 74.02KiB 0 0.0373448 False False
syslog_log2metric_humio_metrics -7.5KiB -0.06 44.47% 12.94MiB 346.63KiB 7.07KiB 0 0.0261549 12.93MiB 518.81KiB 10.56KiB 0 0.0391683 False False
http_to_http_json -38.52KiB -0.16 99.75% 23.85MiB 325.28KiB 6.64KiB 0 0.0133177 23.81MiB 530.88KiB 10.84KiB 0 0.0217699 False False
fluent_elasticsearch -208.68KiB -0.26 100.00% 79.47MiB 53.01KiB 1.07KiB 0 0.000651285 79.27MiB 1.84MiB 37.95KiB 0 0.0232591 False False
http_to_http_noack -104.89KiB -0.43 100.00% 23.84MiB 410.18KiB 8.39KiB 0 0.0168005 23.73MiB 1.15MiB 23.95KiB 0 0.0483958 False False
http_pipelines_no_grok_blackhole -56.46KiB -0.51 98.85% 10.78MiB 110.74KiB 2.26KiB 0 0.0100269 10.73MiB 1.07MiB 22.21KiB 0 0.0993927 False False
syslog_splunk_hec_logs -108.34KiB -0.66 100.00% 16.12MiB 758.24KiB 15.43KiB 0 0.0459338 16.01MiB 547.14KiB 11.17KiB 0 0.0333645 False False
syslog_humio_logs -128.39KiB -0.78 100.00% 16.13MiB 158.65KiB 3.24KiB 0 0.009606 16.0MiB 163.89KiB 3.35KiB 0 0.0100011 False False
syslog_log2metric_splunk_hec_metrics -146.02KiB -0.81 100.00% 17.63MiB 722.66KiB 14.71KiB 0 0.0400246 17.49MiB 863.47KiB 17.56KiB 0 0.0482135 False False
http_pipelines_blackhole -16.05KiB -0.92 100.00% 1.7MiB 18.46KiB 386.08B 0 0.0105737 1.69MiB 128.61KiB 2.62KiB 0 0.074371 False False
datadog_agent_remap_datadog_logs_acks -748.72KiB -1.2 100.00% 60.79MiB 3.86MiB 80.64KiB 0 0.0634777 60.06MiB 4.77MiB 99.21KiB 0 0.0793424 False False
http_text_to_http_json -560.26KiB -1.38 100.00% 39.52MiB 719.81KiB 14.69KiB 0 0.0177846 38.97MiB 790.04KiB 16.13KiB 0 0.0197938 False False
datadog_agent_remap_datadog_logs -1.07MiB -1.69 100.00% 63.32MiB 439.93KiB 9.01KiB 0 0.00678346 62.25MiB 4.1MiB 85.43KiB 0 0.065871 False False
http_to_http_acks -374.86KiB -2.1 88.58% 17.45MiB 8.17MiB 170.73KiB 0 0.467915 17.09MiB 7.9MiB 164.76KiB 0 0.462104 True True

Copy link
Contributor

@spencergilbert spencergilbert left a comment

Choose a reason for hiding this comment

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

Two recommendations for clarity

src/sinks/util/service/concurrency.rs Outdated Show resolved Hide resolved
src/sinks/util/service/concurrency.rs Outdated Show resolved Hide resolved
@github-actions
Copy link

Soak Test Results

Baseline: fd5ba44
Comparison: ca95a1c
Total Vector CPUs: 4

Explanation

A soak test is an integrated performance test for vector in a repeatable rig, with varying configuration for vector. What follows is a statistical summary of a brief vector run for each configuration across SHAs given above. The goal of these tests are to determine, quickly, if vector performance is changed and to what degree by a pull request. Where appropriate units are scaled per-core.

The table below, if present, lists those experiments that have experienced a statistically significant change in their throughput performance between baseline and comparision SHAs, with 90.0% confidence OR have been detected as newly erratic. Negative values mean that baseline is faster, positive comparison. Results that do not exhibit more than a ±8.87% change in mean throughput are discarded. An experiment is erratic if its coefficient of variation is greater than 0.3. The abbreviated table will be omitted if no interesting changes are observed.

No interesting changes in throughput with confidence ≥ 90.00% and absolute Δ mean >= ±8.87%:

Fine details of change detection per experiment.
experiment Δ mean Δ mean % confidence baseline mean baseline stdev baseline stderr baseline outlier % baseline CoV comparison mean comparison stdev comparison stderr comparison outlier % comparison CoV erratic declared erratic
syslog_log2metric_splunk_hec_metrics 381.38KiB 2.14 100.00% 17.41MiB 660.02KiB 13.44KiB 0 0.0370061 17.79MiB 719.1KiB 14.65KiB 0 0.0394744 False False
syslog_log2metric_humio_metrics 268.12KiB 2.11 100.00% 12.39MiB 298.5KiB 6.09KiB 0 0.0235298 12.65MiB 533.25KiB 10.85KiB 0 0.0411646 False False
syslog_regex_logs2metric_ddmetrics 233.23KiB 1.85 100.00% 12.31MiB 566.18KiB 11.53KiB 0 0.0449108 12.54MiB 538.71KiB 10.98KiB 0 0.0419554 False False
datadog_agent_remap_blackhole_acks 1.02MiB 1.77 100.00% 57.71MiB 4.49MiB 93.55KiB 0 0.0778619 58.73MiB 2.79MiB 58.51KiB 0 0.0475672 False False
syslog_humio_logs 258.5KiB 1.6 100.00% 15.81MiB 305.06KiB 6.23KiB 0 0.0188365 16.06MiB 327.41KiB 6.71KiB 0 0.0198989 False False
syslog_splunk_hec_logs 190.98KiB 1.17 100.00% 15.88MiB 867.38KiB 17.65KiB 0 0.0533309 16.07MiB 852.55KiB 17.37KiB 0 0.0518109 False False
datadog_agent_remap_blackhole 539.47KiB 0.88 100.00% 59.87MiB 3.94MiB 82.04KiB 0 0.0657508 60.4MiB 2.43MiB 50.74KiB 0 0.0402346 False False
splunk_hec_route_s3 163.05KiB 0.86 98.44% 18.42MiB 2.33MiB 48.54KiB 0 0.126542 18.58MiB 2.24MiB 46.79KiB 0 0.120454 False False
http_pipelines_blackhole_acks 4.81KiB 0.4 88.25% 1.17MiB 122.91KiB 2.5KiB 0 0.102418 1.18MiB 87.46KiB 1.78KiB 0 0.0725892 False False
splunk_hec_indexer_ack_blackhole 23.36KiB 0.1 66.68% 23.75MiB 875.8KiB 17.81KiB 0 0.0360064 23.77MiB 799.87KiB 16.28KiB 0 0.0328532 False False
splunk_hec_to_splunk_hec_logs_noack 6.33KiB 0.03 45.82% 23.83MiB 384.51KiB 7.85KiB 0 0.0157528 23.84MiB 332.37KiB 6.78KiB 0 0.0136132 False False
enterprise_http_to_http 1.03KiB 0 10.99% 23.84MiB 256.91KiB 5.24KiB 0 0.0105198 23.85MiB 259.03KiB 5.3KiB 0 0.0106059 False False
splunk_hec_to_splunk_hec_logs_acks -7.61KiB -0.03 24.44% 23.76MiB 832.05KiB 16.93KiB 0 0.0341953 23.75MiB 867.38KiB 17.64KiB 0 0.0356584 False False
file_to_blackhole -52.29KiB -0.05 50.61% 95.37MiB 2.54MiB 52.72KiB 0 0.0266598 95.32MiB 2.66MiB 55.32KiB 0 0.0278735 False False
http_to_http_json -37.52KiB -0.15 99.64% 23.85MiB 334.03KiB 6.82KiB 0 0.0136763 23.81MiB 534.13KiB 10.91KiB 0 0.0219028 False False
http_to_http_acks -35.04KiB -0.2 11.84% 17.45MiB 7.85MiB 164.22KiB 0 0.449986 17.42MiB 8.07MiB 168.35KiB 0 0.463177 True True
fluent_elasticsearch -201.14KiB -0.25 100.00% 79.47MiB 53.41KiB 1.08KiB 0 0.000656176 79.28MiB 1.78MiB 36.74KiB 0 0.0225054 False False
http_to_http_noack -87.3KiB -0.36 99.98% 23.84MiB 410.05KiB 8.39KiB 0 0.0167955 23.75MiB 1.06MiB 22.12KiB 0 0.0446488 False False
socket_to_socket_blackhole -269.21KiB -1.11 100.00% 23.64MiB 1.02MiB 21.32KiB 0 0.0431288 23.38MiB 799.85KiB 16.33KiB 0 0.0333998 False False
http_pipelines_blackhole -19.77KiB -1.18 100.00% 1.64MiB 26.28KiB 550.08B 0 0.0156859 1.62MiB 118.88KiB 2.42KiB 0 0.0718107 False False
datadog_agent_remap_datadog_logs_acks -795.37KiB -1.26 100.00% 61.74MiB 3.29MiB 68.79KiB 0 0.0532882 60.97MiB 4.41MiB 91.81KiB 0 0.0723317 False False
syslog_loki -193.79KiB -1.31 100.00% 14.4MiB 628.41KiB 12.86KiB 0 0.0425959 14.21MiB 897.68KiB 18.25KiB 0 0.0616582 False False
datadog_agent_remap_datadog_logs -888.07KiB -1.42 100.00% 61.28MiB 1.66MiB 34.76KiB 0 0.0270586 60.42MiB 4.17MiB 86.83KiB 0 0.06899 False False
http_pipelines_no_grok_blackhole -179.47KiB -1.62 100.00% 10.83MiB 192.67KiB 3.93KiB 0 0.0173718 10.65MiB 1.1MiB 22.94KiB 0 0.103435 False False
http_text_to_http_json -1.91MiB -4.72 100.00% 40.53MiB 663.5KiB 13.54KiB 0 0.0159822 38.62MiB 823.15KiB 16.81KiB 0 0.020811 False False

@tobz tobz enabled auto-merge (squash) September 28, 2022 01:43
@tobz tobz merged commit f56f3c8 into master Sep 28, 2022
@tobz tobz deleted the tobz/fix-configurable-enum-impls branch September 28, 2022 16:02
@github-actions
Copy link

Soak Test Results

Baseline: c3988f5
Comparison: 951ee4a
Total Vector CPUs: 4

Explanation

A soak test is an integrated performance test for vector in a repeatable rig, with varying configuration for vector. What follows is a statistical summary of a brief vector run for each configuration across SHAs given above. The goal of these tests are to determine, quickly, if vector performance is changed and to what degree by a pull request. Where appropriate units are scaled per-core.

The table below, if present, lists those experiments that have experienced a statistically significant change in their throughput performance between baseline and comparision SHAs, with 90.0% confidence OR have been detected as newly erratic. Negative values mean that baseline is faster, positive comparison. Results that do not exhibit more than a ±8.87% change in mean throughput are discarded. An experiment is erratic if its coefficient of variation is greater than 0.3. The abbreviated table will be omitted if no interesting changes are observed.

No interesting changes in throughput with confidence ≥ 90.00% and absolute Δ mean >= ±8.87%:

Fine details of change detection per experiment.
experiment Δ mean Δ mean % confidence baseline mean baseline stdev baseline stderr baseline outlier % baseline CoV comparison mean comparison stdev comparison stderr comparison outlier % comparison CoV erratic declared erratic
syslog_splunk_hec_logs 466.99KiB 2.93 100.00% 15.58MiB 755.79KiB 15.38KiB 0 0.0473584 16.04MiB 593.0KiB 12.1KiB 0 0.0361013 False False
syslog_humio_logs 432.47KiB 2.63 100.00% 16.05MiB 274.33KiB 5.6KiB 0 0.0166898 16.47MiB 285.37KiB 5.85KiB 0 0.0169166 False False
syslog_log2metric_splunk_hec_metrics 405.83KiB 2.36 100.00% 16.82MiB 783.74KiB 15.97KiB 0 0.0455029 17.21MiB 900.95KiB 18.35KiB 0 0.0511032 False False
socket_to_socket_blackhole 523.78KiB 2.25 100.00% 22.72MiB 303.4KiB 6.19KiB 0 0.013036 23.24MiB 292.79KiB 5.98KiB 0 0.0123031 False False
syslog_regex_logs2metric_ddmetrics 253.37KiB 2.05 100.00% 12.07MiB 476.55KiB 9.71KiB 0 0.0385556 12.32MiB 540.19KiB 11.01KiB 0 0.0428262 False False
datadog_agent_remap_datadog_logs_acks 1.17MiB 1.98 100.00% 59.23MiB 4.0MiB 83.57KiB 0 0.0675184 60.4MiB 4.74MiB 98.63KiB 0 0.0784316 False False
syslog_log2metric_humio_metrics 138.33KiB 1.09 100.00% 12.37MiB 301.06KiB 6.14KiB 0 0.0237691 12.5MiB 534.85KiB 10.89KiB 0 0.0417702 False False
splunk_hec_route_s3 205.62KiB 1.08 99.83% 18.6MiB 2.27MiB 47.25KiB 0 0.121982 18.8MiB 2.18MiB 45.5KiB 0 0.115734 False False
http_pipelines_blackhole_acks 10.39KiB 0.86 99.98% 1.17MiB 110.92KiB 2.26KiB 0 0.0921995 1.18MiB 81.99KiB 1.67KiB 0 0.0675693 False False
http_text_to_http_json 277.3KiB 0.72 100.00% 37.87MiB 854.61KiB 17.44KiB 0 0.0220311 38.14MiB 838.87KiB 17.12KiB 0 0.0214718 False False
syslog_loki 101.86KiB 0.68 100.00% 14.55MiB 311.47KiB 6.38KiB 0 0.0208979 14.65MiB 744.47KiB 15.13KiB 0 0.0496104 False False
http_to_http_acks 121.91KiB 0.68 39.28% 17.39MiB 7.88MiB 164.79KiB 0 0.452962 17.51MiB 8.16MiB 170.56KiB 0 0.466132 True True
datadog_agent_remap_blackhole_acks 221.5KiB 0.36 95.59% 60.68MiB 4.28MiB 89.04KiB 0 0.0704569 60.9MiB 3.09MiB 64.59KiB 0 0.0507376 False False
datadog_agent_remap_blackhole 73.24KiB 0.12 54.25% 59.0MiB 3.76MiB 78.3KiB 0 0.0636473 59.08MiB 2.87MiB 59.86KiB 0 0.0485579 False False
splunk_hec_to_splunk_hec_logs_noack 15.01KiB 0.06 80.32% 23.82MiB 460.22KiB 9.39KiB 0 0.0188618 23.84MiB 335.68KiB 6.85KiB 0 0.0137492 False False
enterprise_http_to_http 761.26B 0 8.08% 23.85MiB 251.77KiB 5.14KiB 0 0.0103087 23.85MiB 255.32KiB 5.23KiB 0 0.0104539 False False
splunk_hec_to_splunk_hec_logs_acks -705.22B -0 2.27% 23.76MiB 845.84KiB 17.21KiB 0 0.0347605 23.76MiB 836.85KiB 17.03KiB 0 0.0343919 False False
splunk_hec_indexer_ack_blackhole -7.11KiB -0.03 25.52% 23.77MiB 727.63KiB 14.81KiB 0 0.0298878 23.76MiB 789.12KiB 16.06KiB 0 0.032423 False False
file_to_blackhole -38.08KiB -0.04 30.07% 95.34MiB 3.16MiB 65.48KiB 0 0.0331223 95.3MiB 3.54MiB 73.69KiB 0 0.037162 False False
http_to_http_json -41.82KiB -0.17 99.82% 23.84MiB 346.88KiB 7.08KiB 0 0.0142038 23.8MiB 557.12KiB 11.37KiB 0 0.022852 False False
fluent_elasticsearch -173.75KiB -0.21 100.00% 79.47MiB 52.21KiB 1.06KiB 0 0.000641404 79.3MiB 1.5MiB 30.79KiB 0 0.0188754 False False
datadog_agent_remap_datadog_logs -137.8KiB -0.22 91.49% 60.43MiB 439.85KiB 9.01KiB 0 0.00710657 60.3MiB 3.82MiB 79.49KiB 0 0.0632674 False False
http_to_http_noack -68.77KiB -0.28 99.96% 23.85MiB 259.77KiB 5.31KiB 0 0.0106359 23.78MiB 920.45KiB 18.76KiB 0 0.0377924 False False
http_pipelines_blackhole -5.44KiB -0.32 99.21% 1.68MiB 14.64KiB 306.41B 0 0.00851923 1.67MiB 99.2KiB 2.02KiB 0 0.0578968 False False
http_pipelines_no_grok_blackhole -83.81KiB -0.76 99.99% 10.71MiB 62.38KiB 1.27KiB 0 0.00568598 10.63MiB 1023.59KiB 20.82KiB 0 0.0940192 False False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-condition: integration tests enable Run integration tests on this PR domain: core Anything related to core crates i.e. vector-core, core-common, etc domain: sinks Anything related to the Vector's sinks domain: vrl Anything related to the Vector Remap Language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants