Skip to content

Commit ac6c4e5

Browse files
authored
feat: Add support for Spicepod version v2 (spiceai#9583)
* feat: Add support for Spicepod version v2 - Updated spicepod.schema.json to include "v2" in the version enum. - Changed default version in SpicepodDefinition to v2. - Updated init command to create spicepod.yaml with version v2. - Added comprehensive tests for v1 and v2 versions, ensuring backward compatibility. - Created new test fixtures for v2 spicepods and updated existing v1 fixtures. - Implemented migration logic for deprecated fields from v1 to v2. - Enhanced caching configuration for v2, including new fields and defaults. - Updated documentation and comments to reflect changes in versioning and features. * feat: Remove support for v1beta1 and update examples to v2 * fix: ensure newline at end of iceberg-duckdb[file].yaml * Apply suggestion from @lukekim * feat: Add support for Spicepod version v2 - Updated spicepod.schema.json to include "v2" in the version enum. - Changed default version in SpicepodDefinition to v2. - Updated init command to create spicepod.yaml with version v2. - Added comprehensive tests for v1 and v2 versions, ensuring backward compatibility. - Created new test fixtures for v2 spicepods and updated existing v1 fixtures. - Implemented migration logic for deprecated fields from v1 to v2. - Enhanced caching configuration for v2, including new fields and defaults. - Updated documentation and comments to reflect changes in versioning and features. * feat: Remove support for v1beta1 and update examples to v2 * fix: ensure newline at end of iceberg-duckdb[file].yaml * Apply suggestion from @lukekim * fix: Update JSON schema for v2 features and fix remaining v1beta1 reference - Add read_write_create to AccessMode enum in schema - Add partition_management to Scheduler and PartitionManagement in schema - Update test/adbc/python/spicepod.yaml from v1beta1 to v2 * style: Refactor code for consistency and readability in version tests
1 parent 10bb718 commit ac6c4e5

22 files changed

Lines changed: 1178 additions & 24 deletions

File tree

.schema/spicepod.schema.json

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@
468468
"SpicepodVersion": {
469469
"type": "string",
470470
"enum": [
471-
"v1beta1",
472-
"v1"
471+
"v1",
472+
"v2"
473473
]
474474
},
475475
"SpicepodKind": {
@@ -1216,13 +1216,50 @@
12161216
"type": "null"
12171217
}
12181218
]
1219+
},
1220+
"partition_management": {
1221+
"description": "Partition management configuration.",
1222+
"anyOf": [
1223+
{
1224+
"$ref": "#/$defs/PartitionManagement"
1225+
},
1226+
{
1227+
"type": "null"
1228+
}
1229+
]
12191230
}
12201231
},
12211232
"additionalProperties": false,
12221233
"required": [
12231234
"state_location"
12241235
]
12251236
},
1237+
"PartitionManagement": {
1238+
"type": "object",
1239+
"properties": {
1240+
"interval": {
1241+
"type": "string",
1242+
"default": "30s"
1243+
},
1244+
"max_assignments_per_cycle": {
1245+
"type": "integer",
1246+
"format": "uint",
1247+
"minimum": 0,
1248+
"default": 100
1249+
},
1250+
"max_partitions_per_executor": {
1251+
"type": "integer",
1252+
"format": "uint",
1253+
"minimum": 0,
1254+
"default": 1000
1255+
},
1256+
"discovery_timeout": {
1257+
"type": "string",
1258+
"default": "60s"
1259+
}
1260+
},
1261+
"additionalProperties": false
1262+
},
12261263
"Params": {
12271264
"type": "object",
12281265
"additionalProperties": {
@@ -1488,7 +1525,8 @@
14881525
"type": "string",
14891526
"enum": [
14901527
"read",
1491-
"read_write"
1528+
"read_write",
1529+
"read_write_create"
14921530
]
14931531
},
14941532
"ComponentReference": {

bin/spice/src/commands/init.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ fn determine_names(name_arg: &str) -> (String, String) {
112112
/// Create the spicepod.yaml content.
113113
fn create_spicepod_yaml(name: &str) -> String {
114114
format!(
115-
r"version: v1
115+
r"version: v2
116116
kind: Spicepod
117117
name: {name}
118118
"

0 commit comments

Comments
 (0)