Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions bundle/direct/dresources/all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1149,9 +1149,6 @@ func TestNoUpdateResourcesCoverAllFields(t *testing.T) {

t.Run(resourceType, func(t *testing.T) {
err := structwalk.WalkType(adapter.StateType(), func(path *structpath.PatternNode, typ reflect.Type, _ *reflect.StructField) bool {
if path.IsRoot() {
return true
}
if covered[path.String()] {
// This field (or its enclosing object) is classified; the
// whole subtree is covered, so stop descending.
Expand Down
58 changes: 4 additions & 54 deletions bundle/direct/dresources/resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -476,12 +476,7 @@ resources:
# handles the read side (create_database_if_not_exists is input-only, uid is
# output-only) so no-op deploys stay idempotent.
recreate_on_changes:
- field: database_instance_name
reason: immutable
- field: database_name
reason: immutable
- field: create_database_if_not_exists
reason: immutable
- reason: immutable

synced_database_tables:
provided_id_fields:
Expand All @@ -494,28 +489,7 @@ resources:
# handles the read side (input-only and output-only fields) so no-op deploys
# stay idempotent. Same pattern as postgres_synced_tables.
recreate_on_changes:
- field: database_instance_name
reason: immutable
- field: logical_database_name
reason: immutable
- field: spec.source_table_full_name
reason: immutable
- field: spec.primary_key_columns
reason: immutable
- field: spec.timeseries_key
reason: immutable
- field: spec.scheduling_policy
reason: immutable
- field: spec.create_database_objects_if_missing
reason: immutable
- field: spec.new_pipeline_spec
reason: immutable
- field: spec.existing_pipeline_id
reason: immutable
- field: spec.accelerated_sync
reason: immutable
- field: spec.type_overrides
reason: immutable
- reason: immutable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would happen if there are some fields with

- field: ...
  reason: ...

syntax and then also one with ommited field? (let's say by mistake). Shall we error out in such cases and only allow empty field if there are no other entries?

@denik denik Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's no different from adding two overlapping entries today: x and x.y. We don't validate.

We can validate, but it maybe more complex than this simple change. For example, we can also take into account absence of DoUpdate and maybe even make this configuration automatic.


apps:
provided_id_fields:
Expand Down Expand Up @@ -699,10 +673,7 @@ resources:
# requires delete+create. The OpenAPI spec only marks postgres_database
# as IMMUTABLE (handled by autogen); branch and create_database_if_missing
# need explicit entries here.
- field: branch
reason: immutable
- field: create_database_if_missing
reason: immutable
- reason: immutable

postgres_synced_tables:
# The Postgres API has no UpdateSyncedTable endpoint, so every settable
Expand All @@ -716,28 +687,7 @@ resources:
- field: synced_table_id
reason: id_field
recreate_on_changes:
- field: branch
reason: immutable
- field: postgres_database
reason: immutable
- field: source_table_full_name
reason: immutable
- field: primary_key_columns
reason: immutable
- field: timeseries_key
reason: immutable
- field: scheduling_policy
reason: immutable
- field: create_database_objects_if_missing
reason: immutable
- field: new_pipeline_spec
reason: immutable
- field: existing_pipeline_id
reason: immutable
- field: accelerated_sync
reason: immutable
- field: type_overrides
reason: immutable
- reason: immutable

postgres_roles:
recreate_on_changes:
Expand Down
Loading