databricks-cli/bundle/config/variable
Pieter Noordhuis 14fe03dcb9
Breakout variable lookup into separate files and tests (#1921)
## Changes

While looking into adding variable lookups for notification destinations
([API][API]), I found the codegen approach for different classes of
variable lookups a bit complex. The template had a custom field override
(for service principals), the package had an override for the cluster
lookup, and it didn't produce tests.

The notification destinations API uses a default page size of 20 for
listing. I want to use a larger page size to limit the number of API
calls, so that would imply another customization on the template or a
manual override.

This code being rather mechanical, I used copilot to produce all
instances of the resolvers and their tests (after writing one of them
manually).

[api]: https://docs.databricks.com/api/workspace/notificationdestinations

## Tests

* Unit tests pass
* Manual confirmation that lookups of warehouses still work
2024-11-21 11:28:50 +01:00
..
lookup.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
lookup_test.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_alert.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_alert_test.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_cluster.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_cluster_policy.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_cluster_policy_test.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_cluster_test.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_dashboard.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_dashboard_test.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_instance_pool.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_instance_pool_test.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_job.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_job_test.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_metastore.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_metastore_test.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_pipeline.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_pipeline_test.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_query.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_query_test.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_service_principal.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_service_principal_test.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_warehouse.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
resolve_warehouse_test.go Breakout variable lookup into separate files and tests (#1921) 2024-11-21 11:28:50 +01:00
variable.go Alias variables block in the `Target` struct (#1748) 2024-09-10 14:49:34 +00:00