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(deps): Bump Rust version to 1.80 #20949

Merged
merged 16 commits into from
Oct 12, 2024
Merged

chore(deps): Bump Rust version to 1.80 #20949

merged 16 commits into from
Oct 12, 2024

Conversation

bruceg
Copy link
Member

@bruceg bruceg commented Jul 26, 2024

Closes: #21127

@bruceg bruceg added type: tech debt A code change that does not add user value. dependencies Pull requests that update a dependency file no-changelog Changes in this PR do not need user-facing explanations in the release changelog labels Jul 26, 2024
@bruceg bruceg requested a review from a team as a code owner July 26, 2024 22:29
@github-actions github-actions bot added domain: sources Anything related to the Vector's sources domain: transforms Anything related to Vector's transform components domain: sinks Anything related to the Vector's sinks domain: core Anything related to core crates i.e. vector-core, core-common, etc domain: vdev Anything related to the vdev tooling labels Jul 26, 2024
Cargo.toml Fixed Show fixed Hide fixed
lib/vector-buffers/Cargo.toml Fixed Show fixed Hide fixed
lib/vector-core/Cargo.toml Fixed Show fixed Hide fixed
Copy link
Member

@jszwedko jszwedko left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

@@ -25,7 +25,7 @@ pub fn data_dir() -> &'static Path {
pub fn default_target() -> String {
if cfg!(windows) {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: could this be target_os = "windows" for consistency?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe, but we use just windows everywhere else. There are two special OS-type configs, unix and windows. In the case of unix, it includes both Linux and macOS (and of course BSDs etc), but I'm not sure if windows similarly includes some other sub-targets.

@datadog-vectordotdev
Copy link

datadog-vectordotdev bot commented Jul 26, 2024

Datadog Report

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

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

❌ Failed Tests (1)

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

    Expand for error
     thread 'config::cmd::tests::output_has_consistent_ordering' panicked at src/config/cmd.rs:370:13:
     assertion \`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
    

@@ -2,7 +2,6 @@
feature = "sources-apache_metrics",
feature = "sources-aws_ecs_metrics",
feature = "sources-aws_kinesis_firehose",
feature = "sources-http-client",

Choose a reason for hiding this comment

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

Does this line get removed or just corrected to feature = "sources-http_client", with an underscore?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good question. I had initially just corrected it, but since the feature before correction was always false, it obviously wasn't necessary so I just removed it.

@bruceg
Copy link
Member Author

bruceg commented Jul 31, 2024

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.

@jszwedko
Copy link
Member

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();

@bruceg
Copy link
Member Author

bruceg commented Jul 31, 2024

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.

@jszwedko
Copy link
Member

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

@bruceg
Copy link
Member Author

bruceg commented Jul 31, 2024

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

@jszwedko
Copy link
Member

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
Copy link
Member

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
Copy link
Member

Removing this explicit close seems to fix it:

close(write_fd).unwrap();

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

@bruceg
Copy link
Member Author

bruceg commented Aug 21, 2024

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 bruceg requested a review from jszwedko October 10, 2024 22:59
@jszwedko
Copy link
Member

Thanks for taking this across the finish line!

lib/vector-tap/src/controller.rs Show resolved Hide resolved
@@ -163,7 +163,7 @@ impl TransformContext {
}
}

#[cfg(any(test, feature = "test"))]
#[cfg(test)]
Copy link
Contributor

Choose a reason for hiding this comment

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

This might break other users who use the test feature.

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe that ended up complaining about an unreachable pub item, meaning it can't actually be used outside of vector as it stands.

Copy link
Member Author

Choose a reason for hiding this comment

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

AFAICT that is only ever called from src/transforms/remap.rs in its test code, so it being unreachable unused code when built with just the test feature tracks.

Copy link
Contributor

@pront pront Oct 11, 2024

Choose a reason for hiding this comment

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

Interesting, TransformContext is exposed though. The new_test function only has one usage and all fields are pub already, maybe it can be deleted/refactored.

@@ -14,7 +14,8 @@ use crate::Error;
/// But, config and topology reload logic can handle:
/// - Invalid config, caused either by user or by data race.
/// - Frequent changes, caused by user/editor modifying/saving file in small chunks.
/// so we can use smaller, more responsive delay.
/// so we can use smaller, more responsive delay.
#[cfg(unix)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this break macOS builds?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, I could have sworn I needed to add that to fix a clippy issue, but it's not there now and it's obviously bogus since the constant is used unconditionally below.

@jszwedko jszwedko added this pull request to the merge queue Oct 11, 2024
@pront pront removed this pull request from the merge queue due to a manual request Oct 11, 2024
@pront
Copy link
Contributor

pront commented Oct 11, 2024

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

@bruceg
Copy link
Member Author

bruceg commented Oct 11, 2024

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

Oops, fixed it in c1fd64d and forgot to push.

@pront pront enabled auto-merge October 11, 2024 19:03
@pront pront added this pull request to the merge queue Oct 11, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 11, 2024
@jszwedko jszwedko added this pull request to the merge queue Oct 11, 2024
Copy link

Regression Detector Results

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

Baseline: a1edf90
Comparison: fb035f4

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

Copy link

Regression Detector Results

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

Baseline: 22c23c3
Comparison: 31dc38f

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

Merged via the queue into master with commit 31dc38f Oct 12, 2024
50 checks passed
@jszwedko jszwedko deleted the bruceg/bump-rust-1.80 branch October 12, 2024 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file domain: core Anything related to core crates i.e. vector-core, core-common, etc domain: sinks Anything related to the Vector's sinks domain: sources Anything related to the Vector's sources domain: transforms Anything related to Vector's transform components domain: vdev Anything related to the vdev tooling no-changelog Changes in this PR do not need user-facing explanations in the release changelog type: tech debt A code change that does not add user value.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vector is broken in Nixpkgs
5 participants