sentry-options 1.2.3__tar.gz → 1.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sentry_options-1.2.3 → sentry_options-1.2.4}/Cargo.lock +5 -5
- {sentry_options-1.2.3 → sentry_options-1.2.4}/Cargo.toml +2 -2
- {sentry_options-1.2.3 → sentry_options-1.2.4}/PKG-INFO +1 -1
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/python/uv.lock +1 -1
- {sentry_options-1.2.3 → sentry_options-1.2.4}/pyproject.toml +1 -1
- {sentry_options-1.2.3 → sentry_options-1.2.4}/sentry-options-validation/src/feature-schema-defs.json +5 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/sentry-options-validation/src/lib.rs +59 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/python/Cargo.toml +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/python/benches/bench_get.py +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/python/benches/bench_has.py +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/python/benches/bench_isset.py +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/python/src/lib.rs +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/python/tests/conftest.py +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/python/tests/features_test.py +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/python/tests/options_override_test.py +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/python/tests/options_test.py +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/python/tests/propagation_test.py +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/python/tests/refresh_test.py +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/rust/Cargo.toml +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/rust/benches/features_bench.rs +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/rust/benches/isset_bench.rs +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/rust/benches/options_bench.rs +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/rust/benches/reload_trace.rs +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/rust/src/features.rs +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/rust/src/lib.rs +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/rust/src/testing.rs +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/clients/rust/tests/override_validation.rs +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/python/sentry_options/__init__.py +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/python/sentry_options/_core.pyi +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/python/sentry_options/py.typed +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/python/sentry_options/testing.py +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/sentry-options-validation/Cargo.toml +0 -0
- {sentry_options-1.2.3 → sentry_options-1.2.4}/sentry-options-validation/src/namespace-schema.json +0 -0
|
@@ -435,7 +435,7 @@ dependencies = [
|
|
|
435
435
|
|
|
436
436
|
[[package]]
|
|
437
437
|
name = "example"
|
|
438
|
-
version = "1.2.
|
|
438
|
+
version = "1.2.4"
|
|
439
439
|
dependencies = [
|
|
440
440
|
"anyhow",
|
|
441
441
|
"sentry-options",
|
|
@@ -1446,7 +1446,7 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|
|
1446
1446
|
|
|
1447
1447
|
[[package]]
|
|
1448
1448
|
name = "sentry-options"
|
|
1449
|
-
version = "1.2.
|
|
1449
|
+
version = "1.2.4"
|
|
1450
1450
|
dependencies = [
|
|
1451
1451
|
"arc-swap",
|
|
1452
1452
|
"criterion",
|
|
@@ -1461,7 +1461,7 @@ dependencies = [
|
|
|
1461
1461
|
|
|
1462
1462
|
[[package]]
|
|
1463
1463
|
name = "sentry-options-cli"
|
|
1464
|
-
version = "1.2.
|
|
1464
|
+
version = "1.2.4"
|
|
1465
1465
|
dependencies = [
|
|
1466
1466
|
"chrono",
|
|
1467
1467
|
"clap",
|
|
@@ -1478,7 +1478,7 @@ dependencies = [
|
|
|
1478
1478
|
|
|
1479
1479
|
[[package]]
|
|
1480
1480
|
name = "sentry-options-python"
|
|
1481
|
-
version = "1.2.
|
|
1481
|
+
version = "1.2.4"
|
|
1482
1482
|
dependencies = [
|
|
1483
1483
|
"pyo3",
|
|
1484
1484
|
"sentry-options",
|
|
@@ -1487,7 +1487,7 @@ dependencies = [
|
|
|
1487
1487
|
|
|
1488
1488
|
[[package]]
|
|
1489
1489
|
name = "sentry-options-validation"
|
|
1490
|
-
version = "1.2.
|
|
1490
|
+
version = "1.2.4"
|
|
1491
1491
|
dependencies = [
|
|
1492
1492
|
"anyhow",
|
|
1493
1493
|
"arc-swap",
|
|
@@ -3,13 +3,13 @@ resolver = "3"
|
|
|
3
3
|
members = ["sentry-options-validation", "clients/rust", "clients/python"]
|
|
4
4
|
|
|
5
5
|
[workspace.package]
|
|
6
|
-
version = "1.2.
|
|
6
|
+
version = "1.2.4"
|
|
7
7
|
edition = "2024"
|
|
8
8
|
repository = "https://github.com/getsentry/sentry-options"
|
|
9
9
|
license = "Apache-2.0"
|
|
10
10
|
|
|
11
11
|
[workspace.dependencies]
|
|
12
|
-
sentry-options-validation = { path = "sentry-options-validation", version = "1.2.
|
|
12
|
+
sentry-options-validation = { path = "sentry-options-validation", version = "1.2.4" }
|
|
13
13
|
serde = { version = "1.0", features = ["derive"] }
|
|
14
14
|
serde_json = "1.0.145"
|
|
15
15
|
anyhow = "1.0.100"
|
{sentry_options-1.2.3 → sentry_options-1.2.4}/sentry-options-validation/src/feature-schema-defs.json
RENAMED
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
"description": {
|
|
29
29
|
"type": "string",
|
|
30
30
|
"description": "Human-readable description of the feature."
|
|
31
|
+
},
|
|
32
|
+
"experiment_mode": {
|
|
33
|
+
"type": ["string", "null"],
|
|
34
|
+
"enum": ["simple", null],
|
|
35
|
+
"description": "When set, the flag is treated as an experiment with exposure tracking. Does not affect evaluation."
|
|
31
36
|
}
|
|
32
37
|
},
|
|
33
38
|
"required": ["owner", "segments", "created_at"],
|
|
@@ -2297,6 +2297,65 @@ Error: \"version\" is a required property"
|
|
|
2297
2297
|
schema.validate_option("feature.organizations:fury-mode", &json!({"segments": []}));
|
|
2298
2298
|
assert!(matches!(result, Err(ValidationError::ValueError { .. })));
|
|
2299
2299
|
}
|
|
2300
|
+
|
|
2301
|
+
#[test]
|
|
2302
|
+
fn test_validate_values_feature_with_experiment_mode() {
|
|
2303
|
+
let temp_dir = TempDir::new().unwrap();
|
|
2304
|
+
create_test_schema(&temp_dir, "test", FEATURE_SCHEMA);
|
|
2305
|
+
let registry = SchemaRegistry::from_directory(temp_dir.path()).unwrap();
|
|
2306
|
+
|
|
2307
|
+
let result = registry.validate_values(
|
|
2308
|
+
"test",
|
|
2309
|
+
&json!({
|
|
2310
|
+
"feature.organizations:fury-mode": {
|
|
2311
|
+
"owner": {"team": "hybrid-cloud"},
|
|
2312
|
+
"segments": [],
|
|
2313
|
+
"created_at": "2024-01-01",
|
|
2314
|
+
"experiment_mode": "simple"
|
|
2315
|
+
}
|
|
2316
|
+
}),
|
|
2317
|
+
);
|
|
2318
|
+
assert!(result.is_ok());
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
#[test]
|
|
2322
|
+
fn test_validate_values_feature_with_invalid_experiment_mode_fails() {
|
|
2323
|
+
let temp_dir = TempDir::new().unwrap();
|
|
2324
|
+
create_test_schema(&temp_dir, "test", FEATURE_SCHEMA);
|
|
2325
|
+
let registry = SchemaRegistry::from_directory(temp_dir.path()).unwrap();
|
|
2326
|
+
|
|
2327
|
+
let result = registry.validate_values(
|
|
2328
|
+
"test",
|
|
2329
|
+
&json!({
|
|
2330
|
+
"feature.organizations:fury-mode": {
|
|
2331
|
+
"owner": {"team": "hybrid-cloud"},
|
|
2332
|
+
"segments": [],
|
|
2333
|
+
"created_at": "2024-01-01",
|
|
2334
|
+
"experiment_mode": "not-a-real-mode"
|
|
2335
|
+
}
|
|
2336
|
+
}),
|
|
2337
|
+
);
|
|
2338
|
+
assert!(matches!(result, Err(ValidationError::ValueError { .. })));
|
|
2339
|
+
}
|
|
2340
|
+
|
|
2341
|
+
#[test]
|
|
2342
|
+
fn test_validate_values_feature_without_experiment_mode_still_valid() {
|
|
2343
|
+
let temp_dir = TempDir::new().unwrap();
|
|
2344
|
+
create_test_schema(&temp_dir, "test", FEATURE_SCHEMA);
|
|
2345
|
+
let registry = SchemaRegistry::from_directory(temp_dir.path()).unwrap();
|
|
2346
|
+
|
|
2347
|
+
let result = registry.validate_values(
|
|
2348
|
+
"test",
|
|
2349
|
+
&json!({
|
|
2350
|
+
"feature.organizations:fury-mode": {
|
|
2351
|
+
"owner": {"team": "hybrid-cloud"},
|
|
2352
|
+
"segments": [],
|
|
2353
|
+
"created_at": "2024-01-01"
|
|
2354
|
+
}
|
|
2355
|
+
}),
|
|
2356
|
+
);
|
|
2357
|
+
assert!(result.is_ok());
|
|
2358
|
+
}
|
|
2300
2359
|
}
|
|
2301
2360
|
|
|
2302
2361
|
mod store_tests {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sentry_options-1.2.3 → sentry_options-1.2.4}/sentry-options-validation/src/namespace-schema.json
RENAMED
|
File without changes
|