-
Notifications
You must be signed in to change notification settings - Fork 139
Add Lakebase Autoscaling support for Databricks Asset Bundles #4423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
56ae216
8c985be
ba447dc
36d5689
62abddd
fffa0c9
c2e0a29
1ba6c4b
8a0aae8
13a2c6a
fc43b93
85ac829
408a4fe
ca6f0fa
c9c0879
03301b6
f9c72c3
e58db24
ee98bea
2e98c02
50340a0
39a483c
8a12be5
a301a46
1a955ab
94a09f0
04ac494
7befcfa
22bc44e
76a758e
2ca2aa8
e6cf316
1de03ea
b1605f5
ba89ca3
7a49e6c
617baf0
df1a0da
8c1cea8
b228344
aae67e5
0bd60c0
a6eac26
34b07e2
af3269c
071ecf6
c674330
25059ae
d37b76a
496bd0e
3044c14
a7e5497
07bedda
828feb7
41520d5
df65828
ebf1047
b358ec2
a64c4b7
4346d43
0dffcf9
631ef84
f6efb81
6402838
2503a80
0728a63
3ad3f29
bc03f7a
8b18e11
9a30557
76f38f0
efafb00
85fb3e8
afa0eb9
0055aca
7dd6820
2d29ed0
55eecf7
477d014
c4564d9
f46ad98
9066657
97124b4
75c74f9
ecdc08b
45710a5
95066af
8c4ad10
0ce5d85
c26f823
9ca9767
375ebf3
1ed52e0
7d8745e
7d26bdd
c8d1708
ee5336b
67e8d85
f6c4af2
5c5c15e
58199e1
0f339d2
c54c5e6
2dc07d0
7600139
b325350
aeab3c8
dfb6934
9c9264b
a275fdb
50b7da3
5c21360
5c70b28
40cee35
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| bundle: | ||
| name: test-bundle-$UNIQUE_NAME | ||
|
|
||
| resources: | ||
| postgres_projects: | ||
| project: | ||
| project_id: test-pg-project-$UNIQUE_NAME | ||
| display_name: Test Postgres Project | ||
|
|
||
| postgres_branches: | ||
| foo: | ||
| parent: ${resources.postgres_projects.project.name} | ||
| branch_id: test-branch-$UNIQUE_NAME | ||
| no_expiry: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| bundle: | ||
| name: test-bundle-$UNIQUE_NAME | ||
|
|
||
| resources: | ||
| postgres_projects: | ||
| project: | ||
| project_id: test-pg-project-$UNIQUE_NAME | ||
| display_name: Test Postgres Project | ||
|
|
||
| postgres_branches: | ||
| branch: | ||
| parent: ${resources.postgres_projects.project.name} | ||
| branch_id: test-branch-$UNIQUE_NAME | ||
| no_expiry: true | ||
|
|
||
| postgres_endpoints: | ||
| foo: | ||
| parent: ${resources.postgres_branches.branch.name} | ||
| endpoint_id: test-endpoint-$UNIQUE_NAME | ||
| endpoint_type: ENDPOINT_TYPE_READ_WRITE |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| bundle: | ||
| name: test-bundle-$UNIQUE_NAME | ||
|
|
||
| resources: | ||
| postgres_projects: | ||
| foo: | ||
| project_id: test-pg-project-$UNIQUE_NAME | ||
| display_name: Test Postgres Project |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3593,6 +3593,131 @@ resources.pipelines.*.permissions.permissions[*].group_name string ALL | |
| resources.pipelines.*.permissions.permissions[*].permission_level iam.PermissionLevel ALL | ||
| resources.pipelines.*.permissions.permissions[*].service_principal_name string ALL | ||
| resources.pipelines.*.permissions.permissions[*].user_name string ALL | ||
| resources.postgres_branches.*.branch_id string INPUT STATE | ||
| resources.postgres_branches.*.create_time *time.Time REMOTE | ||
| resources.postgres_branches.*.expire_time *time.Time INPUT STATE | ||
| resources.postgres_branches.*.id string INPUT | ||
| resources.postgres_branches.*.is_protected bool INPUT STATE | ||
| resources.postgres_branches.*.lifecycle resources.Lifecycle INPUT | ||
| resources.postgres_branches.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.postgres_branches.*.modified_status string INPUT | ||
| resources.postgres_branches.*.name string REMOTE | ||
| resources.postgres_branches.*.no_expiry bool INPUT STATE | ||
| resources.postgres_branches.*.parent string ALL | ||
| resources.postgres_branches.*.source_branch string INPUT STATE | ||
| resources.postgres_branches.*.source_branch_lsn string INPUT STATE | ||
| resources.postgres_branches.*.source_branch_time *time.Time INPUT STATE | ||
| resources.postgres_branches.*.spec *postgres.BranchSpec REMOTE | ||
| resources.postgres_branches.*.spec.expire_time *time.Time REMOTE | ||
| resources.postgres_branches.*.spec.is_protected bool REMOTE | ||
| resources.postgres_branches.*.spec.no_expiry bool REMOTE | ||
| resources.postgres_branches.*.spec.source_branch string REMOTE | ||
| resources.postgres_branches.*.spec.source_branch_lsn string REMOTE | ||
| resources.postgres_branches.*.spec.source_branch_time *time.Time REMOTE | ||
| resources.postgres_branches.*.spec.ttl *duration.Duration REMOTE | ||
| resources.postgres_branches.*.status *postgres.BranchStatus REMOTE | ||
| resources.postgres_branches.*.status.current_state postgres.BranchStatusState REMOTE | ||
| resources.postgres_branches.*.status.default bool REMOTE | ||
| resources.postgres_branches.*.status.expire_time *time.Time REMOTE | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we move
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note, we can only do it if status.expire_time tracks user setting without delay. If it's possible that field in status can lag behind field in input, this would create unnecessary drift.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some fields there should not drift, e.g. branch_id, because they are immutable. So safe to move. See this commit for full list of fields: 6f62615?new_files_changed=true#diff-7478ee1612d5f53124855c9fa144177bd5ea219b2ec22e416c690c59d99ae6ffR101 |
||
| resources.postgres_branches.*.status.is_protected bool REMOTE | ||
| resources.postgres_branches.*.status.logical_size_bytes int64 REMOTE | ||
| resources.postgres_branches.*.status.pending_state postgres.BranchStatusState REMOTE | ||
| resources.postgres_branches.*.status.source_branch string REMOTE | ||
| resources.postgres_branches.*.status.source_branch_lsn string REMOTE | ||
| resources.postgres_branches.*.status.source_branch_time *time.Time REMOTE | ||
| resources.postgres_branches.*.status.state_change_time *time.Time REMOTE | ||
| resources.postgres_branches.*.ttl *duration.Duration INPUT STATE | ||
| resources.postgres_branches.*.uid string REMOTE | ||
| resources.postgres_branches.*.update_time *time.Time REMOTE | ||
| resources.postgres_branches.*.url string INPUT | ||
| resources.postgres_endpoints.*.autoscaling_limit_max_cu float64 INPUT STATE | ||
| resources.postgres_endpoints.*.autoscaling_limit_min_cu float64 INPUT STATE | ||
| resources.postgres_endpoints.*.create_time *time.Time REMOTE | ||
| resources.postgres_endpoints.*.disabled bool INPUT STATE | ||
| resources.postgres_endpoints.*.endpoint_id string INPUT STATE | ||
| resources.postgres_endpoints.*.endpoint_type postgres.EndpointType INPUT STATE | ||
| resources.postgres_endpoints.*.id string INPUT | ||
| resources.postgres_endpoints.*.lifecycle resources.Lifecycle INPUT | ||
| resources.postgres_endpoints.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.postgres_endpoints.*.modified_status string INPUT | ||
| resources.postgres_endpoints.*.name string REMOTE | ||
| resources.postgres_endpoints.*.no_suspension bool INPUT STATE | ||
| resources.postgres_endpoints.*.parent string ALL | ||
| resources.postgres_endpoints.*.settings *postgres.EndpointSettings INPUT STATE | ||
| resources.postgres_endpoints.*.settings.pg_settings map[string]string INPUT STATE | ||
| resources.postgres_endpoints.*.settings.pg_settings.* string INPUT STATE | ||
| resources.postgres_endpoints.*.spec *postgres.EndpointSpec REMOTE | ||
| resources.postgres_endpoints.*.spec.autoscaling_limit_max_cu float64 REMOTE | ||
| resources.postgres_endpoints.*.spec.autoscaling_limit_min_cu float64 REMOTE | ||
| resources.postgres_endpoints.*.spec.disabled bool REMOTE | ||
| resources.postgres_endpoints.*.spec.endpoint_type postgres.EndpointType REMOTE | ||
| resources.postgres_endpoints.*.spec.no_suspension bool REMOTE | ||
| resources.postgres_endpoints.*.spec.settings *postgres.EndpointSettings REMOTE | ||
| resources.postgres_endpoints.*.spec.settings.pg_settings map[string]string REMOTE | ||
| resources.postgres_endpoints.*.spec.settings.pg_settings.* string REMOTE | ||
| resources.postgres_endpoints.*.spec.suspend_timeout_duration *duration.Duration REMOTE | ||
| resources.postgres_endpoints.*.status *postgres.EndpointStatus REMOTE | ||
| resources.postgres_endpoints.*.status.autoscaling_limit_max_cu float64 REMOTE | ||
| resources.postgres_endpoints.*.status.autoscaling_limit_min_cu float64 REMOTE | ||
| resources.postgres_endpoints.*.status.current_state postgres.EndpointStatusState REMOTE | ||
| resources.postgres_endpoints.*.status.disabled bool REMOTE | ||
| resources.postgres_endpoints.*.status.endpoint_type postgres.EndpointType REMOTE | ||
| resources.postgres_endpoints.*.status.hosts *postgres.EndpointHosts REMOTE | ||
| resources.postgres_endpoints.*.status.hosts.host string REMOTE | ||
| resources.postgres_endpoints.*.status.pending_state postgres.EndpointStatusState REMOTE | ||
| resources.postgres_endpoints.*.status.settings *postgres.EndpointSettings REMOTE | ||
| resources.postgres_endpoints.*.status.settings.pg_settings map[string]string REMOTE | ||
| resources.postgres_endpoints.*.status.settings.pg_settings.* string REMOTE | ||
| resources.postgres_endpoints.*.status.suspend_timeout_duration *duration.Duration REMOTE | ||
| resources.postgres_endpoints.*.suspend_timeout_duration *duration.Duration INPUT STATE | ||
| resources.postgres_endpoints.*.uid string REMOTE | ||
| resources.postgres_endpoints.*.update_time *time.Time REMOTE | ||
| resources.postgres_endpoints.*.url string INPUT | ||
| resources.postgres_projects.*.create_time *time.Time REMOTE | ||
| resources.postgres_projects.*.default_endpoint_settings *postgres.ProjectDefaultEndpointSettings INPUT STATE | ||
| resources.postgres_projects.*.default_endpoint_settings.autoscaling_limit_max_cu float64 INPUT STATE | ||
| resources.postgres_projects.*.default_endpoint_settings.autoscaling_limit_min_cu float64 INPUT STATE | ||
| resources.postgres_projects.*.default_endpoint_settings.no_suspension bool INPUT STATE | ||
| resources.postgres_projects.*.default_endpoint_settings.pg_settings map[string]string INPUT STATE | ||
| resources.postgres_projects.*.default_endpoint_settings.pg_settings.* string INPUT STATE | ||
| resources.postgres_projects.*.default_endpoint_settings.suspend_timeout_duration *duration.Duration INPUT STATE | ||
| resources.postgres_projects.*.display_name string INPUT STATE | ||
| resources.postgres_projects.*.history_retention_duration *duration.Duration INPUT STATE | ||
| resources.postgres_projects.*.id string INPUT | ||
| resources.postgres_projects.*.lifecycle resources.Lifecycle INPUT | ||
| resources.postgres_projects.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.postgres_projects.*.modified_status string INPUT | ||
| resources.postgres_projects.*.name string REMOTE | ||
| resources.postgres_projects.*.pg_version int INPUT STATE | ||
| resources.postgres_projects.*.project_id string INPUT STATE | ||
| resources.postgres_projects.*.spec *postgres.ProjectSpec REMOTE | ||
| resources.postgres_projects.*.spec.default_endpoint_settings *postgres.ProjectDefaultEndpointSettings REMOTE | ||
| resources.postgres_projects.*.spec.default_endpoint_settings.autoscaling_limit_max_cu float64 REMOTE | ||
| resources.postgres_projects.*.spec.default_endpoint_settings.autoscaling_limit_min_cu float64 REMOTE | ||
| resources.postgres_projects.*.spec.default_endpoint_settings.no_suspension bool REMOTE | ||
| resources.postgres_projects.*.spec.default_endpoint_settings.pg_settings map[string]string REMOTE | ||
| resources.postgres_projects.*.spec.default_endpoint_settings.pg_settings.* string REMOTE | ||
| resources.postgres_projects.*.spec.default_endpoint_settings.suspend_timeout_duration *duration.Duration REMOTE | ||
| resources.postgres_projects.*.spec.display_name string REMOTE | ||
| resources.postgres_projects.*.spec.history_retention_duration *duration.Duration REMOTE | ||
| resources.postgres_projects.*.spec.pg_version int REMOTE | ||
| resources.postgres_projects.*.status *postgres.ProjectStatus REMOTE | ||
| resources.postgres_projects.*.status.branch_logical_size_limit_bytes int64 REMOTE | ||
| resources.postgres_projects.*.status.default_endpoint_settings *postgres.ProjectDefaultEndpointSettings REMOTE | ||
| resources.postgres_projects.*.status.default_endpoint_settings.autoscaling_limit_max_cu float64 REMOTE | ||
| resources.postgres_projects.*.status.default_endpoint_settings.autoscaling_limit_min_cu float64 REMOTE | ||
| resources.postgres_projects.*.status.default_endpoint_settings.no_suspension bool REMOTE | ||
| resources.postgres_projects.*.status.default_endpoint_settings.pg_settings map[string]string REMOTE | ||
| resources.postgres_projects.*.status.default_endpoint_settings.pg_settings.* string REMOTE | ||
| resources.postgres_projects.*.status.default_endpoint_settings.suspend_timeout_duration *duration.Duration REMOTE | ||
| resources.postgres_projects.*.status.display_name string REMOTE | ||
| resources.postgres_projects.*.status.history_retention_duration *duration.Duration REMOTE | ||
| resources.postgres_projects.*.status.owner string REMOTE | ||
| resources.postgres_projects.*.status.pg_version int REMOTE | ||
| resources.postgres_projects.*.status.synthetic_storage_size_bytes int64 REMOTE | ||
| resources.postgres_projects.*.uid string REMOTE | ||
| resources.postgres_projects.*.update_time *time.Time REMOTE | ||
| resources.postgres_projects.*.url string INPUT | ||
| resources.quality_monitors.*.assets_dir string ALL | ||
| resources.quality_monitors.*.baseline_table_name string ALL | ||
| resources.quality_monitors.*.custom_metrics []catalog.MonitorMetric ALL | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| bundle: | ||
| name: deploy-postgres-branch-$UNIQUE_NAME | ||
|
|
||
| sync: | ||
| paths: [] | ||
|
|
||
| resources: | ||
| postgres_projects: | ||
| my_project: | ||
| project_id: test-pg-proj-$UNIQUE_NAME | ||
| display_name: "Test Project for Branch" | ||
| pg_version: 16 | ||
| history_retention_duration: "604800s" | ||
| default_endpoint_settings: | ||
| autoscaling_limit_min_cu: 0.5 | ||
| autoscaling_limit_max_cu: 4 | ||
| suspend_timeout_duration: "300s" | ||
|
|
||
| postgres_branches: | ||
| main: | ||
| parent: ${resources.postgres_projects.my_project.id} | ||
| branch_id: main | ||
| no_expiry: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/postgres/projects", | ||
| "q": { | ||
| "project_id": "test-pg-proj-[UNIQUE_NAME]" | ||
| }, | ||
| "body": { | ||
| "spec": { | ||
| "default_endpoint_settings": { | ||
| "autoscaling_limit_max_cu": 4, | ||
| "autoscaling_limit_min_cu": 0.5, | ||
| "suspend_timeout_duration": "300s" | ||
| }, | ||
| "display_name": "Test Project for Branch", | ||
| "history_retention_duration": "604800s", | ||
| "pg_version": 16 | ||
| } | ||
| } | ||
| } | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches", | ||
| "q": { | ||
| "branch_id": "main" | ||
| }, | ||
| "body": { | ||
| "spec": { | ||
| "no_expiry": true | ||
| } | ||
| } | ||
| } | ||
| { | ||
| "method": "GET", | ||
| "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/postgres/projects", | ||
| "q": { | ||
| "project_id": "test-pg-proj-[UNIQUE_NAME]" | ||
| }, | ||
| "body": { | ||
| "spec": { | ||
| "default_endpoint_settings": { | ||
| "autoscaling_limit_max_cu": 4, | ||
| "autoscaling_limit_min_cu": 0.5, | ||
| "suspend_timeout_duration": "300s" | ||
| }, | ||
| "display_name": "Test Project for Branch", | ||
| "history_retention_duration": "604800s", | ||
| "pg_version": 16 | ||
| } | ||
| } | ||
| } | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches", | ||
| "q": { | ||
| "branch_id": "main" | ||
| }, | ||
| "body": { | ||
| "parent": "projects/test-pg-proj-[UNIQUE_NAME]", | ||
| "spec": { | ||
| "no_expiry": true | ||
| } | ||
| } | ||
| } | ||
| { | ||
| "method": "GET", | ||
| "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace_ids.py is another script that could use a similar change.