Skip to content

Allow Unicode letters in bundle variable reference paths#5532

Draft
Rada1302 wants to merge 1 commit into
mainfrom
unicode-variable-reference-support
Draft

Allow Unicode letters in bundle variable reference paths#5532
Rada1302 wants to merge 1 commit into
mainfrom
unicode-variable-reference-support

Conversation

@Rada1302

Copy link
Copy Markdown

Extend ${...} segment matching to accept Unicode letters (not just ASCII) across Go, Python, and JSON Schema validation, with a shared reference_vectors contract to keep the three implementations in sync.

Changes

  • Updated the variable reference segment regex from ASCII-only ([a-zA-Z]…) to Unicode letter-aware matching (\p{L} in Go, [^\W\d_] in Python).
  • Exported dynvar.BaseVarDef in Go and reused it in bundle JSON Schema generation so schema validation matches runtime parsing.
  • Added libs/dyn/dynvar/testdata/reference_vectors.json as a shared contract exercised by Go (ref_vectors_test.go) and Python (test_variable_reference_vectors.py) tests.
  • Consolidated existing inline Go reference tests into the vector-driven suite.
  • Added bundle schema fixtures for Unicode pass cases (CJK, accented Latin, separator edge cases) and fail cases (emoji, NFD decomposed accents).
  • Regenerated bundle/schema/jsonschema.json.

Why

Bundle variable names and references were previously limited to ASCII letters in ${...} paths, which blocked valid Unicode identifiers (e.g. CJK variable names like ${var.变量}). The Go runtime matcher, Python pydabs transform layer, and JSON Schema validation each had their own copy of the regex, which made drift likely. Centralizing the segment definition in BaseVarDef / _base_var_def and locking behavior with shared vector tests keeps all three layers consistent.

Emoji, symbols, and NFD-normalized characters (e.g. e + combining acute instead of precomposed é) remain rejected intentionally — only Unicode letters and digits (after the first character) are allowed in segments, preserving existing separator rules (-, _).

Tests

  • go test ./libs/dyn/dynvar/... — vector-driven tests for NewRef, IsPureVariableReference, and PureReferenceToPath
  • go test ./bundle/schema/... -run TestSchemaValidate — new pass/fail schema fixtures for Unicode references
  • cd python && task test — Python vector parity tests against the same reference_vectors.json

Extend ${...} segment matching to accept Unicode letters (not just ASCII)
across Go, Python, and JSON Schema validation, with a shared reference_vectors
contract to keep the three implementations in sync.
@Rada1302 Rada1302 temporarily deployed to test-trigger-is June 10, 2026 10:43 — with GitHub Actions Inactive
@Rada1302 Rada1302 temporarily deployed to test-trigger-is June 10, 2026 10:43 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Commit: aee3e7e

Run: 27270782888

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 7 15 261 948 8:53
🟨​ aws windows 7 15 263 946 17:34
💚​ aws-ucws linux 7 15 357 862 12:12
💚​ aws-ucws windows 7 15 359 860 11:22
💚​ azure linux 1 17 264 946 8:28
🔄​ azure windows 1 1 17 265 944 10:44
💚​ azure-ucws linux 1 17 362 858 15:49
💚​ azure-ucws windows 1 17 364 856 10:27
💚​ gcp linux 1 17 260 949 8:38
💚​ gcp windows 1 17 262 947 10:29
23 interesting tests: 15 SKIP, 7 KNOWN, 1 flaky
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 💚​R 🟨​K 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 💚​R 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 💚​R 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 🟨​K 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/replace_existing 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_projects/update_display_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/grants/select 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestSyncEnsureRemotePathIsUsableIfRepoExists ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p
Top 32 slowest tests (at least 2 minutes):
duration env testname
5:03 gcp windows TestAccept
5:02 azure-ucws windows TestAccept
5:01 aws-ucws windows TestAccept
4:54 azure windows TestAccept
4:46 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:30 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:30 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:00 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:00 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:47 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:46 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:46 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:29 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:21 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:19 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:16 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:12 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:11 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:09 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:05 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:56 azure linux TestAccept
2:54 gcp linux TestAccept
2:53 aws linux TestAccept
2:49 aws-ucws linux TestAccept
2:49 azure-ucws linux TestAccept
2:44 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:38 azure-ucws linux TestAccept/bundle/resources/volumes/recreate/DATABRICKS_BUNDLE_ENGINE=terraform
2:37 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:32 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:28 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:03 azure-ucws linux TestFilerWorkspaceFilesExtensionsReadDir
2:02 azure-ucws linux TestAccept/bundle/resources/volumes/recreate/DATABRICKS_BUNDLE_ENGINE=direct

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.

2 participants