Skip to content

direct: Fix cluster recreate if apply_policy_default_values is set; auto handle fields not in remote type#5693

Merged
denik merged 8 commits into
mainfrom
denik/known-missing-remote-types
Jun 24, 2026
Merged

direct: Fix cluster recreate if apply_policy_default_values is set; auto handle fields not in remote type#5693
denik merged 8 commits into
mainfrom
denik/known-missing-remote-types

Conversation

@denik

@denik denik commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Automatically add to ignore_remote_changes fields that are not present in RemoteType. This fixes unwanted recreates for clusters with apply_policy_default_values set (Cluster gets recreated during deployment #5179 (comment)).
  • Remove manually added ignore_remote_changes entries that are now handled automatically.
  • For model_serving_endpoints and vector_search_endpoints extend remote type with fields that are present in StateType but have different path in native get response and populate them in DoRead (e.g. target_qps <- scaling_info.requested_target_qps). This fixes remote references, diffs and makes this fields "normal", not subject to automatic "missing_in_remote" skips. Add a rule to dresources/README.md about this approach.

Tests

New invariant test specifically reproducing apply_policy_default_values issue.

…g manual ignore_remote_changes entries

Fields accepted by the API on write but not returned by GET (e.g.
apply_policy_default_values on clusters) always appear nil in remote
state, causing spurious drift after every deploy.

Add automatic suppression: if a field is present in StateType but
absent from RemoteType and there is no local change (old == new),
skip it with reason missing_in_remote. Local changes (old != new)
still fall through to update or recreate as normal.

Add a test that rejects manual ignore_remote_changes entries in
resources.yml for fields already covered by the automatic rule, and
remove the nine entries that became redundant.

Co-authored-by: Isaac
@denik denik temporarily deployed to test-trigger-is June 23, 2026 18:06 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 23, 2026 18:06 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 2c3b27c

Run: 28076141820

Env 🟨​KNOWN ✅​pass 🙈​skip Time
🟨​ aws linux 1 216 99 3:32
🟨​ aws windows 1 218 97 2:32
🟨​ aws-ucws linux 1 297 18 3:43
🟨​ aws-ucws windows 1 299 16 4:14
🟨​ azure linux 1 216 98 3:11
🟨​ azure windows 1 218 96 2:47
🟨​ azure-ucws linux 1 299 15 3:42
🟨​ azure-ucws windows 1 301 13 3:25
🟨​ gcp linux 1 215 100 3:05
🟨​ gcp windows 1 217 98 2:39
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 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K

…ee resources

For vector_search_endpoints, secret_scopes, and model_serving_endpoints,
fields that the API returns under a different name were being mapped in
RemapState. This made them appear absent from RemoteType, causing the new
missing_in_remote suppression to hide real drift.

Fix: extend RemoteType with the state-compatible field names and do the
mapping in DoRead/newXxxRemote instead. RemapState becomes a direct copy.

Co-authored-by: Isaac
@denik denik temporarily deployed to test-trigger-is June 23, 2026 18:33 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 23, 2026 18:33 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 23, 2026 18:35 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 23, 2026 18:35 — with GitHub Actions Inactive
secret_scope.go reverted: field mapping between InputType/StateType names
makes the RemoteType fix non-trivial (reference resolution needs InputType
names; drift detection needs StateType names). Will address separately.

Acceptance output updates are correct new behavior from this PR:
- model_serving_endpoints: remote_state now includes flattened fields
- quality_monitors: warehouse_id/skip_builtin_dashboard reason changes
  from "input_only" (manual resources.yml) to "missing_in_remote" (auto)

Co-authored-by: Isaac
@denik denik temporarily deployed to test-trigger-is June 23, 2026 18:46 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 23, 2026 18:46 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 23, 2026 18:52 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 23, 2026 18:52 — with GitHub Actions Inactive
@denik denik enabled auto-merge June 23, 2026 18:59
denik added 3 commits June 24, 2026 06:53
Co-authored-by: Isaac
Co-authored-by: Isaac
@denik denik temporarily deployed to test-trigger-is June 24, 2026 04:55 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 24, 2026 04:55 — with GitHub Actions Inactive
@denik denik added this pull request to the merge queue Jun 24, 2026
Merged via the queue into main with commit 8740a01 Jun 24, 2026
25 checks passed
@denik denik deleted the denik/known-missing-remote-types branch June 24, 2026 06:22
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.

3 participants