Skip to content

Potential python deadlock in the tests - #378

Open
BentEngbers wants to merge 1 commit into
prometheus:masterfrom
BentEngbers:python_test_fix
Open

BentEngbers wants to merge 1 commit into
prometheus:masterfrom
BentEngbers:python_test_fix

Conversation

@BentEngbers

@BentEngbers BentEngbers commented Nov 10, 2026 •

Copy link
Copy Markdown

When running the tests cargo test --locked --all --all-features, i got a python module error.
cargo cargo test --locked --all --all-features -- --test-threads=1 seems to solve the issue without any changes.
I don't have that much experience with pyo3 & python so I let claude have stab at it, and these changes seem to resolve the issue.


More details:

$ python --version:
Python 3.14.10

$ pip list:

Package Version
pip 26.0.1
prometheus_client 0.26.0

Failed test output
   Compiling pyo3-ffi v0.30.1
   Compiling prometheus-client v0.25.2 (/home/bente/client_rust)
   Compiling pyo3 v0.30.1
   Compiling prometheus-client-derive-encode v0.5.1 (/home/bente/client_rust/derive-encode)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 2.23s
     Running unittests src/lib.rs (target/debug/deps/prometheus_client-af5347f0a0827a3a)

running 114 tests
test encoding::openmetrics_protobuf::tests::encode_counter_double ... ok
test encoding::openmetrics_protobuf::tests::encode_counter_family_with_prefix_with_label ... ok
test encoding::openmetrics_protobuf::tests::encode_counter_int ... ok
test encoding::openmetrics_protobuf::tests::encode_counter_family ... ok
test encoding::openmetrics_protobuf::tests::encode_family_counter_histogram ... ok
test encoding::openmetrics_protobuf::tests::encode_family_and_counter_and_histogram ... ok
test encoding::openmetrics_protobuf::tests::encode_gauge ... ok
test encoding::openmetrics_protobuf::tests::encode_gauge_u64_max ... ok
test encoding::openmetrics_protobuf::tests::encode_counter_with_unit ... ok
test encoding::openmetrics_protobuf::tests::encode_gauge_u64_normal ... ok
test encoding::openmetrics_protobuf::tests::encode_counter_with_exemplar ... ok
test encoding::openmetrics_protobuf::tests::encode_histogram ... ok
test encoding::openmetrics_protobuf::tests::encode_histogram_with_exemplars ... ok
test encoding::openmetrics_protobuf::tests::encode_info ... ok
test encoding::openmetrics_protobuf::tests::encode_native_only_histogram_errors ... ok
test encoding::prometheus_protobuf::tests::encode_classic_and_native_histogram ... ok
test encoding::prometheus_protobuf::tests::encode_counter_family ... ok
test encoding::prometheus_protobuf::tests::encode_counter_family_with_prefix_and_label ... ok
test encoding::prometheus_protobuf::tests::encode_counter_int ... ok
test encoding::prometheus_protobuf::tests::encode_counter_with_exemplar ... ok
test encoding::prometheus_protobuf::tests::encode_counter_with_unit ... ok
test encoding::prometheus_protobuf::tests::encode_gauge ... ok
test encoding::prometheus_protobuf::tests::encode_family_and_counter_and_histogram ... ok
test encoding::prometheus_protobuf::tests::encode_gauge_u64_max ... ok
test encoding::prometheus_protobuf::tests::encode_histogram ... ok
test encoding::prometheus_protobuf::tests::encode_info ... ok
test encoding::prometheus_protobuf::tests::encode_histogram_with_exemplars ... ok
test encoding::prometheus_protobuf::tests::encode_native_histogram ... ok
test encoding::prometheus_protobuf::tests::encode_native_histogram_nan_only_has_no_op_span ... ok
test encoding::prometheus_protobuf::tests::encode_to_vec_length_delimited ... ok
test encoding::prometheus_text::tests::encode_omits_empty_family ... ok
test encoding::prometheus_text::tests::go_float_matches_go ... ok
test encoding::prometheus_text::tests::go_float_matches_go_exponential_buckets ... ok
test encoding::prometheus_text::tests::go_float_matches_go_linear_buckets ... ok
test encoding::text::tests::encode_classic_and_native_histogram_as_classic_text ... ok
test encoding::text::tests::encode_native_only_histogram_errors ... ok
test encoding::text::tests::encode_omit_empty ... ok
test encoding::text::tests::encode_registry_eof ... ok
test encoding::text::tests::label_values_escape_special_characters ... ok
test metrics::counter::tests::f64_stored_in_atomic_u64 ... ok
test metrics::counter::tests::inc_and_get ... ok
test metrics::family::tests::counter_family ... ok
test metrics::family::tests::counter_family_clear ... ok
test metrics::family::tests::counter_family_does_not_deadlock ... ok
test metrics::family::tests::counter_family_remove ... ok
test metrics::family::tests::histogram_family ... ok
test metrics::family::tests::histogram_family_with_struct_constructor ... ok
test metrics::family::tests::test_get ... ok
test metrics::gauge::tests::inc_dec_and_get ... ok
test metrics::histogram::overflow_bucket_tests::explicit_infinite_bound_does_not_duplicate_the_overflow_bucket ... ok
test metrics::histogram::overflow_bucket_tests::infinite_observation_lands_in_the_overflow_bucket ... ok
test metrics::histogram::tests::classic_and_native_histogram_updates_both_representations ... ok
test metrics::histogram::tests::classic_histogram_counts_nan_in_infinity_bucket ... ok
test metrics::histogram::tests::count ... ok
test metrics::histogram::tests::exponential ... ok
test metrics::histogram::tests::exponential_range ... ok
test metrics::histogram::tests::exponential_range_incorrect ... ok
test metrics::histogram::tests::histogram ... ok
test metrics::histogram::tests::linear ... ok
test metrics::histogram::tests::native_histogram_bounds_match_standard_formula ... ok
test metrics::histogram::tests::native_histogram_bucket_index_matches_standard_boundaries ... ok
test metrics::histogram::tests::native_histogram_counts_nan_without_sparse_bucket ... ok
test metrics::histogram::tests::native_histogram_default_uses_recommended_bucket_factor ... ok
test metrics::histogram::tests::native_histogram_downsamples_like_go_client ... ok
test metrics::histogram::tests::native_histogram_encodes_spans_and_deltas ... ok
test metrics::histogram::tests::native_histogram_fails_for_counts_not_fitting_delta_wire_type ... ok
test metrics::histogram::tests::native_histogram_maps_positive_infinity_into_sparse_bucket ... ok
test metrics::histogram::tests::native_histogram_matches_client_golang_scenarios ... ok
test metrics::histogram::tests::native_histogram_negative_zero_threshold_uses_zero_width_zero_bucket ... ok
test metrics::histogram::tests::native_histogram_no_op_span_marks_zero_width_nan_only_histogram ... ok
test metrics::histogram::tests::native_histogram_positive_upper_bound_uses_bucket_index ... ok
test metrics::histogram::tests::native_histogram_reduces_resolution_when_max_bucket_limit_is_hit ... ok
test metrics::histogram::tests::native_histogram_resets_when_limit_is_hit_after_min_reset_duration ... ok
test metrics::histogram::tests::native_histogram_scheduled_reset_is_triggered_by_observe ... ok
test metrics::histogram::tests::native_histogram_schedules_reset_after_degradation ... ok
test metrics::histogram::tests::native_histogram_stores_sparse_buckets ... ok
test metrics::histogram::tests::native_histogram_supports_bucket_factor_constructor ... ok
test metrics::histogram::tests::native_histogram_supports_zero_width_zero_bucket ... ok
test metrics::histogram::tests::native_histogram_widens_zero_bucket_at_min_schema_when_limited ... ok
test metrics::histogram::tests::native_histogram_widens_zero_bucket_before_reducing_resolution ... ok
test metrics::histogram::tests::native_histogram_zero_min_reset_duration_does_not_reset ... ok
test metrics::histogram::tests::native_histogram_zero_threshold_zero_uses_default ... ok
test metrics::histogram::tests::sum ... ok
test registry::tests::register_counter_with_total_suffix - should panic ... ok
test registry::tests::register_gauge_with_total_suffix ... ok
test encoding::text::tests::label_value_escaping_matches_reference ... ok
test encoding::prometheus_text::tests::encode_counter_with_unit_and_exemplar ... FAILED
test encoding::prometheus_text::tests::encode_histogram ... FAILED
test encoding::prometheus_text::tests::encode_special_values ... FAILED
test encoding::prometheus_text::tests::encode_unknown_collector ... FAILED
test encoding::prometheus_text::tests::encode_counter ... FAILED
test encoding::prometheus_text::tests::encode_family_with_const_labels_and_prefix ... FAILED
test encoding::prometheus_text::tests::encode_escapes_help_and_label_values ... FAILED
test encoding::prometheus_text::tests::encode_histogram_without_observations ... FAILED
test encoding::prometheus_text::tests::encode_histogram_drops_exemplars ... FAILED
test encoding::prometheus_text::tests::encode_family_with_empty_label_set ... FAILED
test encoding::prometheus_text::tests::encode_info ... FAILED
test encoding::prometheus_text::tests::encode_gauges ... FAILED
test encoding::prometheus_text::tests::encode_native_histograms ... FAILED
test encoding::text::tests::encode_counter_with_exemplar ... FAILED
test encoding::text::tests::encode_counter_family ... FAILED
test encoding::text::tests::encode_counter_with_unit ... FAILED
test encoding::text::tests::encode_gauge ... FAILED
test encoding::text::tests::encode_counter ... FAILED
test encoding::text::tests::encode_counter_family_with_prefix_with_label ... FAILED
test encoding::text::tests::encode_histogram_family_with_empty_struct_family_labels ... FAILED
test encoding::text::tests::encode_histogram_family ... FAILED
test encoding::text::tests::escaped_label_values_produce_parseable_exposition ... FAILED
test encoding::text::tests::encode_info ... FAILED
test encoding::text::tests::label_sets_can_be_composed ... FAILED
test encoding::text::tests::sub_registry_with_prefix_and_label ... FAILED
test encoding::text::tests::sub_registry_collector ... FAILED
test encoding::text::tests::encode_histogram_with_exemplars ... FAILED
test encoding::text::tests::encode_histogram ... FAILED

failures:

---- encoding::prometheus_text::tests::encode_counter_with_unit_and_exemplar stdout ----
"# HELP my_counter_seconds_total My counter.\n# TYPE my_counter_seconds_total counter\nmy_counter_seconds_total 1\n"

thread 'encoding::prometheus_text::tests::encode_counter_with_unit_and_exemplar' (667771) panicked at src/encoding/prometheus_text.rs:1120:14:
called `Result::unwrap()` on an `Err` value: "_DeadlockError: deadlock detected by _ModuleLock('prometheus_client.openmetrics') at 140546290219472"

---- encoding::prometheus_text::tests::encode_histogram stdout ----
"# HELP my_histogram My histogram.\n# TYPE my_histogram histogram\nmy_histogram_bucket{le=\"1\"} 1\nmy_histogram_bucket{le=\"2.5\"} 1\nmy_histogram_bucket{le=\"1e+06\"} 1\nmy_histogram_bucket{le=\"+Inf\"} 2\nmy_histogram_sum 2000001.0\nmy_histogram_count 2\n"

thread 'encoding::prometheus_text::tests::encode_histogram' (667776) panicked at src/encoding/prometheus_text.rs:1120:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::prometheus_text::tests::encode_special_values stdout ----
"# HELP pos_inf Pos inf.\n# TYPE pos_inf gauge\npos_inf +Inf\n# HELP neg_inf Neg inf.\n# TYPE neg_inf gauge\nneg_inf -Inf\n# HELP nan NaN.\n# TYPE nan gauge\nnan NaN\n# HELP inf_counter_total Inf counter.\n# TYPE inf_counter_total counter\ninf_counter_total +Inf\n# HELP big_total Big.\n# TYPE big_total counter\nbig_total 9007199254740993\n"

thread 'encoding::prometheus_text::tests::encode_special_values' (667782) panicked at src/encoding/prometheus_text.rs:1120:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::prometheus_text::tests::encode_unknown_collector stdout ----
"# HELP my_const_counter_total some help\n# TYPE my_const_counter_total counter\nmy_const_counter_total 42\n# HELP my_untyped untyped help\n# TYPE my_untyped untyped\nmy_untyped 3\n"

thread 'encoding::prometheus_text::tests::encode_unknown_collector' (667787) panicked at src/encoding/prometheus_text.rs:1120:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::prometheus_text::tests::encode_counter stdout ----
"# HELP my_counter_total My counter.\n# TYPE my_counter_total counter\nmy_counter_total 1000000\n# HELP my_float_counter_total My float counter.\n# TYPE my_float_counter_total counter\nmy_float_counter_total 1.5\n"

thread 'encoding::prometheus_text::tests::encode_counter' (667770) panicked at src/encoding/prometheus_text.rs:1120:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::prometheus_text::tests::encode_family_with_const_labels_and_prefix stdout ----
"# HELP my_prefix_my_counter_family_total My counter family.\n# TYPE my_prefix_my_counter_family_total counter\nmy_prefix_my_counter_family_total{region=\"eu\",method=\"GET\",status=\"200\"} 1\n# HELP my_prefix_my_histogram_family My histogram family.\n# TYPE my_prefix_my_histogram_family histogram\nmy_prefix_my_histogram_family_bucket{region=\"eu\",method=\"GET\",le=\"1\"} 1\nmy_prefix_my_histogram_family_bucket{region=\"eu\",method=\"GET\",le=\"+Inf\"} 1\nmy_prefix_my_histogram_family_sum{region=\"eu\",method=\"GET\"} 0.5\nmy_prefix_my_histogram_family_count{region=\"eu\",method=\"GET\"} 1\n"

thread 'encoding::prometheus_text::tests::encode_family_with_const_labels_and_prefix' (667773) panicked at src/encoding/prometheus_text.rs:1120:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::prometheus_text::tests::encode_escapes_help_and_label_values stdout ----
"# HELP my_gauge Help with \\\\ backslash, \"quotes\" and\\nnewline.\n# TYPE my_gauge gauge\nmy_gauge{path=\"C:\\\\dir \\\"quoted\\\"\\nnext\"} 2\n"

thread 'encoding::prometheus_text::tests::encode_escapes_help_and_label_values' (667772) panicked at src/encoding/prometheus_text.rs:1120:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::prometheus_text::tests::encode_histogram_without_observations stdout ----
"# HELP my_histogram My histogram.\n# TYPE my_histogram histogram\nmy_histogram_bucket{le=\"0.5\"} 0\nmy_histogram_bucket{le=\"+Inf\"} 0\nmy_histogram_sum 0.0\nmy_histogram_count 0\n# HELP my_histogram_family My histogram family.\n# TYPE my_histogram_family histogram\nmy_histogram_family_bucket{method=\"GET\",le=\"0.5\"} 0\nmy_histogram_family_bucket{method=\"GET\",le=\"+Inf\"} 0\nmy_histogram_family_sum{method=\"GET\"} 0.0\nmy_histogram_family_count{method=\"GET\"} 0\nmy_histogram_family_bucket{method=\"POST\",status=\"500\",le=\"0.5\"} 0\nmy_histogram_family_bucket{method=\"POST\",status=\"500\",le=\"+Inf\"} 0\nmy_histogram_family_sum{method=\"POST\",status=\"500\"} 0.0\nmy_histogram_family_count{method=\"POST\",status=\"500\"} 0\n"

thread 'encoding::prometheus_text::tests::encode_histogram_without_observations' (667778) panicked at src/encoding/prometheus_text.rs:1120:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::prometheus_text::tests::encode_histogram_drops_exemplars stdout ----
"# HELP my_histogram My histogram.\n# TYPE my_histogram histogram\nmy_histogram_bucket{le=\"0.5\"} 1\nmy_histogram_bucket{le=\"+Inf\"} 1\nmy_histogram_sum 0.25\nmy_histogram_count 1\n# HELP my_histogram_family My histogram family.\n# TYPE my_histogram_family histogram\nmy_histogram_family_bucket{method=\"POST\",status=\"500\",le=\"0.5\"} 0\nmy_histogram_family_bucket{method=\"POST\",status=\"500\",le=\"+Inf\"} 1\nmy_histogram_family_sum{method=\"POST\",status=\"500\"} 0.75\nmy_histogram_family_count{method=\"POST\",status=\"500\"} 1\nmy_histogram_family_bucket{method=\"GET\",le=\"0.5\"} 1\nmy_histogram_family_bucket{method=\"GET\",le=\"+Inf\"} 1\nmy_histogram_family_sum{method=\"GET\"} 0.25\nmy_histogram_family_count{method=\"GET\"} 1\n"

thread 'encoding::prometheus_text::tests::encode_histogram_drops_exemplars' (667777) panicked at src/encoding/prometheus_text.rs:1120:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::prometheus_text::tests::encode_family_with_empty_label_set stdout ----
"# HELP my_counter_total My counter.\n# TYPE my_counter_total counter\nmy_counter_total 1\n"

thread 'encoding::prometheus_text::tests::encode_family_with_empty_label_set' (667774) panicked at src/encoding/prometheus_text.rs:1120:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::prometheus_text::tests::encode_info stdout ----
"# HELP my_info_metric_info My info metric.\n# TYPE my_info_metric_info gauge\nmy_info_metric_info{env=\"prod\",os=\"GNU/linux\"} 1\n"

thread 'encoding::prometheus_text::tests::encode_info' (667779) panicked at src/encoding/prometheus_text.rs:1120:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::prometheus_text::tests::encode_gauges stdout ----
"# HELP my_gauge My gauge.\n# TYPE my_gauge gauge\nmy_gauge -3\n# HELP my_float_gauge My float gauge.\n# TYPE my_float_gauge gauge\nmy_float_gauge 0.25\n# HELP my_u32_gauge My u32 gauge.\n# TYPE my_u32_gauge gauge\nmy_u32_gauge 7\n# HELP my_u64_gauge My u64 gauge.\n# TYPE my_u64_gauge gauge\nmy_u64_gauge 0\n# HELP my_i64_gauge My i64 gauge.\n# TYPE my_i64_gauge gauge\nmy_i64_gauge -1\n"

thread 'encoding::prometheus_text::tests::encode_gauges' (667775) panicked at src/encoding/prometheus_text.rs:1120:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::prometheus_text::tests::encode_native_histograms stdout ----
"# HELP native_only Native only.\n# TYPE native_only histogram\nnative_only_bucket{le=\"+Inf\"} 1\nnative_only_sum 3.0\nnative_only_count 1\n# HELP native_and_classic Native and classic.\n# TYPE native_and_classic histogram\nnative_and_classic_bucket{le=\"1\"} 1\nnative_and_classic_bucket{le=\"+Inf\"} 1\nnative_and_classic_sum 0.5\nnative_and_classic_count 1\n"

thread 'encoding::prometheus_text::tests::encode_native_histograms' (667780) panicked at src/encoding/prometheus_text.rs:1120:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::text::tests::encode_counter_with_exemplar stdout ----
"# HELP my_counter_with_exemplar_seconds My counter with exemplar.\n# TYPE my_counter_with_exemplar_seconds counter\n# UNIT my_counter_with_exemplar_seconds seconds\nmy_counter_with_exemplar_seconds_total 1 # {user_id=\"42\"} 1.0\n# EOF\n"

thread 'encoding::text::tests::encode_counter_with_exemplar' (667795) panicked at src/encoding/text.rs:1448:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::text::tests::encode_counter_family stdout ----
"# HELP my_counter_family My counter family.\n# TYPE my_counter_family counter\nmy_counter_family_total{method=\"GET\",status=\"200\"} 1\n# EOF\n"

thread 'encoding::text::tests::encode_counter_family' (667793) panicked at src/encoding/text.rs:1448:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::text::tests::encode_counter_with_unit stdout ----
"# HELP my_counter_seconds My counter.\n# TYPE my_counter_seconds counter\n# UNIT my_counter_seconds seconds\nmy_counter_seconds_total 0\n# EOF\n"

thread 'encoding::text::tests::encode_counter_with_unit' (667796) panicked at src/encoding/text.rs:1448:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::text::tests::encode_gauge stdout ----
"# HELP my_gauge My gauge.\n# TYPE my_gauge gauge\nmy_gauge 0\n# HELP u32_gauge Gauge::<u32, AtomicU32>.\n# TYPE u32_gauge gauge\nu32_gauge 0\n# HELP f32_gauge Gauge::<f32, AtomicU32>.\n# TYPE f32_gauge gauge\nf32_gauge 0.0\n# HELP i32_gauge Gauge::<i32, AtomicU32>.\n# TYPE i32_gauge gauge\ni32_gauge 0\n# EOF\n"

thread 'encoding::text::tests::encode_gauge' (667797) panicked at src/encoding/text.rs:1448:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::text::tests::encode_counter stdout ----
"# HELP my_counter My counter.\n# TYPE my_counter counter\nmy_counter_total 0\n# HELP f32_counter Counter::<f32, AtomicU32>.\n# TYPE f32_counter counter\nf32_counter_total 0.0\n# HELP u32_counter Counter::<u32, AtomicU32>.\n# TYPE u32_counter counter\nu32_counter_total 0\n# EOF\n"

thread 'encoding::text::tests::encode_counter' (667792) panicked at src/encoding/text.rs:1448:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::text::tests::encode_counter_family_with_prefix_with_label stdout ----
"# HELP my_prefix_my_counter_family My counter family.\n# TYPE my_prefix_my_counter_family counter\nmy_prefix_my_counter_family_total{my_key=\"my_value\",method=\"GET\",status=\"200\"} 1\n# EOF\n"

thread 'encoding::text::tests::encode_counter_family_with_prefix_with_label' (667794) panicked at src/encoding/text.rs:1448:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::text::tests::encode_histogram_family_with_empty_struct_family_labels stdout ----
"# HELP my_histogram My histogram.\n# TYPE my_histogram histogram\nmy_histogram_sum{} 1.0\nmy_histogram_count{} 1\nmy_histogram_bucket{le=\"1.0\"} 1\nmy_histogram_bucket{le=\"2.0\"} 1\nmy_histogram_bucket{le=\"4.0\"} 1\nmy_histogram_bucket{le=\"8.0\"} 1\nmy_histogram_bucket{le=\"16.0\"} 1\nmy_histogram_bucket{le=\"32.0\"} 1\nmy_histogram_bucket{le=\"64.0\"} 1\nmy_histogram_bucket{le=\"128.0\"} 1\nmy_histogram_bucket{le=\"256.0\"} 1\nmy_histogram_bucket{le=\"512.0\"} 1\nmy_histogram_bucket{le=\"+Inf\"} 1\n# EOF\n"

thread 'encoding::text::tests::encode_histogram_family_with_empty_struct_family_labels' (667800) panicked at src/encoding/text.rs:1448:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::text::tests::encode_histogram_family stdout ----
"# HELP my_histogram My histogram.\n# TYPE my_histogram histogram\nmy_histogram_sum{method=\"GET\",status=\"200\"} 1.0\nmy_histogram_count{method=\"GET\",status=\"200\"} 1\nmy_histogram_bucket{le=\"1.0\",method=\"GET\",status=\"200\"} 1\nmy_histogram_bucket{le=\"2.0\",method=\"GET\",status=\"200\"} 1\nmy_histogram_bucket{le=\"4.0\",method=\"GET\",status=\"200\"} 1\nmy_histogram_bucket{le=\"8.0\",method=\"GET\",status=\"200\"} 1\nmy_histogram_bucket{le=\"16.0\",method=\"GET\",status=\"200\"} 1\nmy_histogram_bucket{le=\"32.0\",method=\"GET\",status=\"200\"} 1\nmy_histogram_bucket{le=\"64.0\",method=\"GET\",status=\"200\"} 1\nmy_histogram_bucket{le=\"128.0\",method=\"GET\",status=\"200\"} 1\nmy_histogram_bucket{le=\"256.0\",method=\"GET\",status=\"200\"} 1\nmy_histogram_bucket{le=\"512.0\",method=\"GET\",status=\"200\"} 1\nmy_histogram_bucket{le=\"+Inf\",method=\"GET\",status=\"200\"} 1\n# EOF\n"

thread 'encoding::text::tests::encode_histogram_family' (667799) panicked at src/encoding/text.rs:1448:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::text::tests::escaped_label_values_produce_parseable_exposition stdout ----
"# HELP requests Requests.\n# TYPE requests counter\nrequests_total{client_version=\"a\\\"} evil{x=\\\"1\\\\line\\nnext\"} 1\n# EOF\n"

thread 'encoding::text::tests::escaped_label_values_produce_parseable_exposition' (667806) panicked at src/encoding/text.rs:1448:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::text::tests::encode_info stdout ----
"# HELP my_info_metric My info metric.\n# TYPE my_info_metric info\nmy_info_metric_info{os=\"GNU/linux\"} 1\n# EOF\n"

thread 'encoding::text::tests::encode_info' (667802) panicked at src/encoding/text.rs:1448:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::text::tests::label_sets_can_be_composed stdout ----
"# HELP items Example metric.\n# TYPE items counter\nitems_total{color=\"red\",size=\"large\"} 1\n# EOF\n"

thread 'encoding::text::tests::label_sets_can_be_composed' (667807) panicked at src/encoding/text.rs:1448:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::text::tests::sub_registry_with_prefix_and_label stdout ----
"# HELP my_top_level_metric some help.\n# TYPE my_top_level_metric counter\nmy_top_level_metric_total 0\n# HELP prefix_1_my_prefix_1_metric some help.\n# TYPE prefix_1_my_prefix_1_metric counter\nprefix_1_my_prefix_1_metric_total 0\n# HELP prefix_1_prefix_1_1_my_prefix_1_1_metric some help.\n# TYPE prefix_1_prefix_1_1_my_prefix_1_1_metric counter\nprefix_1_prefix_1_1_my_prefix_1_1_metric_total 0\n# HELP prefix_1_my_prefix_1_2_metric some help.\n# TYPE prefix_1_my_prefix_1_2_metric counter\nprefix_1_my_prefix_1_2_metric_total{registry=\"1_2\"} 0\n# HELP prefix_1_my_prefix_1_3_metric some help.\n# TYPE prefix_1_my_prefix_1_3_metric counter\nprefix_1_my_prefix_1_3_metric_total{label_1_3_1=\"value_1_3_1\",label_1_3_2=\"value_1_3_2\"} 0\n# HELP prefix_1_prefix_1_3_1_my_prefix_1_3_1_metric some help.\n# TYPE prefix_1_prefix_1_3_1_my_prefix_1_3_1_metric counter\nprefix_1_prefix_1_3_1_my_prefix_1_3_1_metric_total{label_1_3_1=\"value_1_3_1\",label_1_3_2=\"value_1_3_2\"} 0\n# HELP prefix_3_my_prefix_3_metric some help.\n# TYPE prefix_3_my_prefix_3_metric counter\nprefix_3_my_prefix_3_metric_total 0\n# EOF\n"

thread 'encoding::text::tests::sub_registry_with_prefix_and_label' (667811) panicked at src/encoding/text.rs:1448:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::text::tests::sub_registry_collector stdout ----
"# HELP top_level some help\n# TYPE top_level counter\ntop_level_total 42\n# HELP prefix_1_sub_level some help\n# TYPE prefix_1_sub_level counter\nprefix_1_sub_level_total 42\n# HELP prefix_1_prefix_1_2_sub_sub_level some help\n# TYPE prefix_1_prefix_1_2_sub_sub_level counter\nprefix_1_prefix_1_2_sub_sub_level_total 42\n# EOF\n"

thread 'encoding::text::tests::sub_registry_collector' (667810) panicked at src/encoding/text.rs:1448:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::text::tests::encode_histogram_with_exemplars stdout ----
"# HELP my_histogram My histogram.\n# TYPE my_histogram histogram\nmy_histogram_sum 3.0\nmy_histogram_count 2\nmy_histogram_bucket{le=\"1.0\"} 1 # {user_id=\"42\"} 1.0 1794329323.6953793\nmy_histogram_bucket{le=\"2.0\"} 2 # {user_id=\"99\"} 2.0\nmy_histogram_bucket{le=\"4.0\"} 2\nmy_histogram_bucket{le=\"8.0\"} 2\nmy_histogram_bucket{le=\"16.0\"} 2\nmy_histogram_bucket{le=\"32.0\"} 2\nmy_histogram_bucket{le=\"64.0\"} 2\nmy_histogram_bucket{le=\"128.0\"} 2\nmy_histogram_bucket{le=\"256.0\"} 2\nmy_histogram_bucket{le=\"512.0\"} 2\nmy_histogram_bucket{le=\"+Inf\"} 2\n# EOF\n"

thread 'encoding::text::tests::encode_histogram_with_exemplars' (667801) panicked at src/encoding/text.rs:1448:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"

---- encoding::text::tests::encode_histogram stdout ----
"# HELP my_histogram My histogram.\n# TYPE my_histogram histogram\nmy_histogram_sum 1.0\nmy_histogram_count 1\nmy_histogram_bucket{le=\"1.0\"} 1\nmy_histogram_bucket{le=\"2.0\"} 1\nmy_histogram_bucket{le=\"4.0\"} 1\nmy_histogram_bucket{le=\"8.0\"} 1\nmy_histogram_bucket{le=\"16.0\"} 1\nmy_histogram_bucket{le=\"32.0\"} 1\nmy_histogram_bucket{le=\"64.0\"} 1\nmy_histogram_bucket{le=\"128.0\"} 1\nmy_histogram_bucket{le=\"256.0\"} 1\nmy_histogram_bucket{le=\"512.0\"} 1\nmy_histogram_bucket{le=\"+Inf\"} 1\n# EOF\n"

thread 'encoding::text::tests::encode_histogram' (667798) panicked at src/encoding/text.rs:1448:14:
called `Result::unwrap()` on an `Err` value: "ImportError: Loaded module 'parser' not found in sys.modules"


failures:
    encoding::prometheus_text::tests::encode_counter
    encoding::prometheus_text::tests::encode_counter_with_unit_and_exemplar
    encoding::prometheus_text::tests::encode_escapes_help_and_label_values
    encoding::prometheus_text::tests::encode_family_with_const_labels_and_prefix
    encoding::prometheus_text::tests::encode_family_with_empty_label_set
    encoding::prometheus_text::tests::encode_gauges
    encoding::prometheus_text::tests::encode_histogram
    encoding::prometheus_text::tests::encode_histogram_drops_exemplars
    encoding::prometheus_text::tests::encode_histogram_without_observations
    encoding::prometheus_text::tests::encode_info
    encoding::prometheus_text::tests::encode_native_histograms
    encoding::prometheus_text::tests::encode_special_values
    encoding::prometheus_text::tests::encode_unknown_collector
    encoding::text::tests::encode_counter
    encoding::text::tests::encode_counter_family
    encoding::text::tests::encode_counter_family_with_prefix_with_label
    encoding::text::tests::encode_counter_with_exemplar
    encoding::text::tests::encode_counter_with_unit
    encoding::text::tests::encode_gauge
    encoding::text::tests::encode_histogram
    encoding::text::tests::encode_histogram_family
    encoding::text::tests::encode_histogram_family_with_empty_struct_family_labels
    encoding::text::tests::encode_histogram_with_exemplars
    encoding::text::tests::encode_info
    encoding::text::tests::escaped_label_values_produce_parseable_exposition
    encoding::text::tests::label_sets_can_be_composed
    encoding::text::tests::sub_registry_collector
    encoding::text::tests::sub_registry_with_prefix_and_label

test result: FAILED. 86 passed; 28 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s

error: test failed, to rerun pass `-p prometheus-client --lib`

Signed-off-by: Bent Engbers <bentengbers@dreamsolution.nl>
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.

1 participant