vector icon indicating copy to clipboard operation
vector copied to clipboard

chore(deps): Bump Rust version to 1.80

Open bruceg opened this issue 1 year ago • 13 comments
trafficstars

Closes: https://github.com/vectordotdev/vector/pull/20949 Closes: https://github.com/vectordotdev/vector/issues/21127

bruceg avatar Jul 26 '24 22:07 bruceg

Datadog Report

Branch report: bruceg/bump-rust-1.80 Commit report: d651d5e Test service: vector

:x: 1 Failed (0 Known Flaky), 2396 Passed, 0 Skipped, 4m 4.39s Total Time

:x: Failed Tests (1)

  • config::cmd::tests::output_has_consistent_ordering - vector - Details

    Expand for error
    hread 'config::cmd::tests::output_has_consistent_ordering' panicked at src/config/cmd.rs:370:13:
    ssertion \`left == right\` failed
     left: "{\"sinks\":{\"appsignal\":{\"compression\":\"none\",\"endpoint\":\"\",\"inputs\":[\"manually-added-remap\"],\"push_api_key\":\"\",\"type\":\"appsignal\",\"batch\":{},\"buffer\":{\"max_events\":500,\"type\":\"memory\",\"when_full\":\"block\"},\"healthcheck\":{\"enabled\":true},\"request\":{\"rate_limit_duration_secs\":1,\"rate_limit_num\":9223372036854775807,\"retry_attempts\":9223372036854775807,\"retry_initial_backoff_secs\":1,\"retry_jitter_mode\":\"Full\",\"retry_max_duration_secs\":30,\"timeout_secs\":60,\"adaptive_concurrency\":{\"decrease_ratio\":0.9,\"ewma_alpha\":0.4,\"initial_concurrency\":1,\"max_concurrency_limit\":200,\"rtt_deviation_scale\":2.5}}},\"azure_blob\":{\"blob_append_uuid\":true,\"blob_prefix\":\"blob/%F/\",\"blob_time_format\":\"%s\",\"compression\":\"gzip\",\"connection_string\":\"DefaultEndpointsProtocol=https;AccountName=some-account-name;AccountKey=some-account-key;\",\"container_name\":\"logs\",\"inputs\":[\"manually-added-remap\"],\"storage_account\":\"some-account-name\",\"type\":\"azure_blob\",\"batch\":{},\"buffer\":{\"max_events\":500,\"type\":\"memory\",\"when_full\":\"block\"},\"encoding\":{\"codec\":\"json\",\"json\":{\"pretty\":false}},\"framing\":{\"method\":\"newline_delimited\"},\"healthcheck\":{\"enabled\":true},\"request\":{\"rate_limit_duration_secs\":1,\"rate_limit_num\":250,\"retry_attempts\":9223372036854775807,\"retry_initial_backoff_secs\":1,\"retry_jitter_mode\":\"Full\",\"retry_max_duration_secs\":30,\"timeout_secs\":60,\"adaptive_concurrency\":{\"decrease_ratio\":0.9,\"ewma_alpha\":0.4,\"initial_concurrency\":1,\"max_concurrency_limit\":200,\"rtt_deviation_scale\":2.5}}},\"kafka\":{\"bootstrap_servers\":\"10.14.22.123:9092,10.14.23.332:9092\",\"compression\":\"none\",\"inputs\":[\"manually-added-remap\"],\"key_field\":\".user_id\",\"message_timeout_ms\":300000,\"socket_timeout_ms\":60000,\"topic\":\"topic-1234\",\"type\":\"kafka\",\"batch\":{},\"buffer\":{\"max_events\":500,\"type\":\"memory\",\"when_full\":\"block\"},\"encoding\":{\"codec\":\"json\",\"json\":{\"pretty\":false}},\"healthcheck\":{\"enabled\":true},\"librdkafka_options\":{}},\"pulsar\":{\"compression\":\"none\",\"endpoint\":\"pulsar://127.0.0.1:6650\",\"inputs\":[\"manually-added-remap\"],\"topic\":\"topic-1234\",\"type\":\"pulsar\",\"batch\":{},\"buffer\":{\"max_events\":500,\"type\":\"memory\",\"when_full\":\"block\"},\"encoding\":{\"codec\":\"text\"},\"healthcheck\":{\"enabled\":true}}},\"sources\":{\"apache_metrics\":{\"endpoints\":[\"http://localhost:8080/server-status/?auto\"],\"namespace\":\"apache\",\"scrape_interval_secs\":15,\"type\":\"apache_metrics\"},\"aws_s3\":{\"compression\":\"auto\",\"strategy\":\"sqs\",\"type\":\"aws_s3\",\"acknowledgements\":{},\"auth\":{\"imds\":{\"connect_timeout_seconds\":1,\"max_attempts\":4,\"read_timeout_seconds\":1}},\"decoding\":{\"codec\":\"bytes\"},\"framing\":{\"method\":\"newline_delimited\"}},\"file\":{\"exclude\":[],\"file_key\":\"file\",\"glob_minimum_cooldown_ms\":1000,\"ignore_not_found\":false,\"include\":[\"/var/log/**/*.log\"],\"line_delimiter\":\"\\n\",\"max_line_bytes\":102400,\"max_read_bytes\":2048,\"multi_line_timeout\":1000,\"oldest_first\":false,\"read_from\":\"beginning\",\"rotate_wait_secs\":9223372036854775807,\"type\":\"file\",\"acknowledgements\":{},\"fingerprint\":{\"ignored_header_bytes\":0,\"lines\":1,\"strategy\":\"checksum\"},\"internal_metrics\":{\"include_file_tag\":false}},\"file_descriptor\":{\"fd\":3,\"type\":\"file_descriptor\"}},\"transforms\":{\"filter\":{\"condition\":\".message = \\\"value\\\"\",\"inputs\":[\"apache_metrics\",\"aws_s3\",\"file\",\"file_descriptor\"],\"type\":\"filter\"},\"manually-added-remap\":{\"drop_on_abort\":false,\"drop_on_error\":false,\"inputs\":[\"apache_metrics\",\"aws_s3\",\"file\",\"file_descriptor\"],\"metric_tag_values\":\"single\",\"reroute_dropped\":false,\"runtime\":\"ast\",\"type\":\"remap\"},\"metric_to_log\":{\"host_tag\":\"host-tag\",\"inputs\":[\"apache_metrics\",\"aws_s3\",\"file\",\"file_descriptor\"],\"metric_tag_values\":\"single\",\"type\":\"metric_to_log\"},\"sample\":{\"inputs\":[\"apache_metrics\",\"aws_s3\",\"file\",\"file_descriptor\"],\"rate\":10,\"type\":\"sample\"},\"tag_cardinality_limit\":{\"inputs\":[\"apache_metrics\",\"aws_s3\",\"file\",\"file_descriptor\"],\"limit_exceeded_action\":\"drop_tag\",\"mode\":\"exact\",\"type\":\"tag_cardinality_limit\",\"value_limit\":500}}}"
    right: "{\"sinks\":{\"appsignal\":{\"compression\":\"none\",\"endpoint\":\"\",\"inputs\":[\"manually-added-remap\"],\"push_api_key\":\"\",\"type\":\"appsignal\",\"batch\":{},\"buffer\":{\"max_events\":500,\"type\":\"memory\",\"when_full\":\"block\"},\"healthcheck\":{\"enabled\":true},\"request\":{\"rate_limit_duration_secs\":1,\"rate_limit_num\":9223372036854775807,\"retry_attempts\":9223372036854775807,\"retry_initial_backoff_secs\":1,\"retry_jitt
    

This has introduced a problem with the file_descriptor source: the new standard library panics if an owned file descriptor that was not actually opened is closed. We, however, use arbitrary file descriptor numbers in a few places in tests and generating a sample config. These end up being loaded into a component and then closed, causing a panic. I can work around the tests but I'm not sure what to do about the generated config.

bruceg avatar Jul 31 '24 00:07 bruceg

This has introduced a problem with the file_descriptor source: the new standard library panics if an owned file descriptor that was not actually opened is closed. We, however, use arbitrary file descriptor numbers in a few places in tests and generating a sample config. These end up being loaded into a component and then closed, causing a panic. I can work around the tests but I'm not sure what to do about the generated config.

Could you do the same thing for config generation that you did for tests?

std::fs::File::open("/dev/null").unwrap().into_raw_fd();

jszwedko avatar Jul 31 '24 16:07 jszwedko

Could you do the same thing for config generation that you did for tests?

That's a possibility, but /dev/null only works for Unix AFAIK and I don't know the equivalent for Windows.

bruceg avatar Jul 31 '24 16:07 bruceg

Could you do the same thing for config generation that you did for tests?

That's a possibility, but /dev/null only works for Unix AFAIK and I don't know the equivalent for Windows.

Ah, for some reason I was thinking this source was only included on *nix, but I see it exists on Windows too. Maybe it could conditionally open /dev/null on *nix and c:/nul on Windows (seems to be the equivalent? Unsure if it is represented as an openable file).

jszwedko avatar Jul 31 '24 16:07 jszwedko

The latest attempt still doesn't work, giving the error: fatal runtime error: IO Safety violation: owned file descriptor already closed

bruceg avatar Jul 31 '24 17:07 bruceg

The latest attempt still doesn't work, giving the error: fatal runtime error: IO Safety violation: owned file descriptor already closed

Oddly I don't get that error running the tests locally 🤔

jszwedko avatar Jul 31 '24 18:07 jszwedko

The latest attempt still doesn't work, giving the error: fatal runtime error: IO Safety violation: owned file descriptor already closed

Oddly I don't get that error running the tests locally 🤔

Update: I can reproduce on Linux.

jszwedko avatar Jul 31 '24 18:07 jszwedko

Removing this explicit close seems to fix it: https://github.com/vectordotdev/vector/blob/789848fdb9137a9d291f4254de62a1cb58518e0f/src/sources/file_descriptors/file_descriptor.rs#L230

I'm not sure what else might be closing the fd before that line though 🤔

jszwedko avatar Jul 31 '24 18:07 jszwedko

Rust 1.80.1 is out (https://blog.rust-lang.org/2024/08/08/Rust-1.80.1.html), which addresses some bugs. Should we update the version in this PR to 1.80.1? @bruceg

jorgehermo9 avatar Aug 10 '24 11:08 jorgehermo9

I'm not sure what else might be closing the fd before that line though 🤔

That is rather weird, yeah. The only thing I could figure is that it gets copied by the above write! call, and the copy is closed. That would point to a broken design, though — types that are Copy shouldn't have destructors.

bruceg avatar Aug 21 '24 15:08 bruceg

I'm not sure what else might be closing the fd before that line though 🤔

Oh, I think I see it. That one looks like the change in the library exposes a race where the test closes the FD in the same thread as the source before the source does. That doesn't resolve the problem with generate_config where even naming the wrong FD triggers the panic, though.

bruceg avatar Aug 21 '24 17:08 bruceg

That doesn't resolve the problem with generate_config where even naming the wrong FD triggers the panic, though.

Actually it does. Spooky action at a distance.

bruceg avatar Aug 21 '24 22:08 bruceg

Thanks for taking this across the finish line!

jszwedko avatar Oct 10 '24 23:10 jszwedko

Let's address this https://github.com/vectordotdev/vector/pull/20949#discussion_r1797288335 before merging.

pront avatar Oct 11 '24 18:10 pront

Let's address this #20949 (comment) before merging.

Oops, fixed it in c1fd64d1e and forgot to push.

bruceg avatar Oct 11 '24 19:10 bruceg

Regression Detector Results

Run ID: 230ddd7e-d8b4-41ad-b49d-3e1674e848da Metrics dashboard

Baseline: a1edf90e9b78ace1cbb0b579324b1d5b027754b5 Comparison: fb035f4b9bf5586558afbbfa0d299d05b50760ac

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

No significant changes in experiment optimization goals

Confidence level: 90.00% Effect size tolerance: |Δ mean %| ≥ 5.00%

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI links
file_to_blackhole egress throughput -18.50 [-24.72, -12.29]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI links
syslog_regex_logs2metric_ddmetrics ingress throughput +4.05 [+3.93, +4.18]
syslog_log2metric_splunk_hec_metrics ingress throughput +3.13 [+3.02, +3.25]
http_elasticsearch ingress throughput +2.77 [+2.58, +2.96]
syslog_splunk_hec_logs ingress throughput +2.59 [+2.47, +2.71]
http_to_http_acks ingress throughput +2.53 [+1.28, +3.77]
datadog_agent_remap_datadog_logs ingress throughput +2.44 [+2.22, +2.65]
syslog_log2metric_humio_metrics ingress throughput +2.34 [+2.18, +2.50]
syslog_loki ingress throughput +1.62 [+1.53, +1.70]
splunk_hec_to_splunk_hec_logs_noack ingress throughput +0.02 [-0.07, +0.11]
http_to_http_json ingress throughput +0.02 [-0.01, +0.05]
http_to_http_noack ingress throughput -0.00 [-0.02, +0.02]
splunk_hec_to_splunk_hec_logs_acks ingress throughput -0.00 [-0.11, +0.10]
splunk_hec_indexer_ack_blackhole ingress throughput -0.03 [-0.12, +0.06]
datadog_agent_remap_blackhole_acks ingress throughput -0.04 [-0.15, +0.07]
otlp_http_to_blackhole ingress throughput -0.13 [-0.28, +0.02]
fluent_elasticsearch ingress throughput -0.25 [-0.74, +0.24]
otlp_grpc_to_blackhole ingress throughput -0.25 [-0.37, -0.14]
syslog_log2metric_tag_cardinality_limit_blackhole ingress throughput -0.30 [-0.38, -0.23]
syslog_humio_logs ingress throughput -0.31 [-0.41, -0.21]
http_text_to_http_json ingress throughput -0.35 [-0.49, -0.21]
datadog_agent_remap_blackhole ingress throughput -0.40 [-0.52, -0.28]
http_to_s3 ingress throughput -0.51 [-0.78, -0.24]
datadog_agent_remap_datadog_logs_acks ingress throughput -0.58 [-0.73, -0.43]
splunk_hec_route_s3 ingress throughput -2.45 [-2.76, -2.14]
socket_to_socket_blackhole ingress throughput -2.64 [-2.72, -2.57]
file_to_blackhole egress throughput -18.50 [-24.72, -12.29]

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

github-actions[bot] avatar Oct 11 '24 22:10 github-actions[bot]

Regression Detector Results

Run ID: 5bb76055-ea83-496f-8277-03b9b9ede069 Metrics dashboard

Baseline: 22c23c34cb9e38e39a3d92c0b9bfe79f60f313e2 Comparison: 31dc38f2126d94f1ff7800c82fd0b67cf7e5dfa9

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

Significant changes in experiment optimization goals

Confidence level: 90.00% Effect size tolerance: |Δ mean %| ≥ 5.00%

perf experiment goal Δ mean % Δ mean % CI links
syslog_log2metric_humio_metrics ingress throughput +6.66 [+6.54, +6.79]

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI links
file_to_blackhole egress throughput -5.46 [-12.33, +1.42]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI links
syslog_log2metric_humio_metrics ingress throughput +6.66 [+6.54, +6.79]
otlp_http_to_blackhole ingress throughput +3.79 [+3.66, +3.93]
socket_to_socket_blackhole ingress throughput +3.04 [+2.95, +3.13]
datadog_agent_remap_datadog_logs_acks ingress throughput +2.52 [+2.33, +2.71]
http_text_to_http_json ingress throughput +1.88 [+1.75, +2.01]
datadog_agent_remap_datadog_logs ingress throughput +1.78 [+1.56, +2.01]
otlp_grpc_to_blackhole ingress throughput +1.04 [+0.93, +1.16]
http_to_s3 ingress throughput +0.78 [+0.50, +1.05]
http_to_http_noack ingress throughput +0.13 [+0.06, +0.21]
syslog_log2metric_splunk_hec_metrics ingress throughput +0.06 [-0.05, +0.17]
http_to_http_json ingress throughput +0.03 [-0.02, +0.07]
http_to_http_acks ingress throughput +0.02 [-1.18, +1.23]
splunk_hec_route_s3 ingress throughput +0.00 [-0.30, +0.30]
splunk_hec_to_splunk_hec_logs_acks ingress throughput -0.00 [-0.11, +0.11]
splunk_hec_indexer_ack_blackhole ingress throughput -0.01 [-0.09, +0.08]
splunk_hec_to_splunk_hec_logs_noack ingress throughput -0.01 [-0.11, +0.09]
syslog_regex_logs2metric_ddmetrics ingress throughput -0.02 [-0.18, +0.15]
syslog_log2metric_tag_cardinality_limit_blackhole ingress throughput -0.38 [-0.45, -0.30]
syslog_humio_logs ingress throughput -0.41 [-0.51, -0.31]
datadog_agent_remap_blackhole ingress throughput -0.51 [-0.61, -0.40]
syslog_loki ingress throughput -0.56 [-0.66, -0.47]
fluent_elasticsearch ingress throughput -0.59 [-1.08, -0.09]
http_elasticsearch ingress throughput -0.80 [-0.96, -0.64]
datadog_agent_remap_blackhole_acks ingress throughput -0.86 [-0.97, -0.75]
syslog_splunk_hec_logs ingress throughput -1.00 [-1.10, -0.90]
file_to_blackhole egress throughput -5.46 [-12.33, +1.42]

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

github-actions[bot] avatar Oct 12 '24 00:10 github-actions[bot]