Repository navigation
feat(provider): check Fabric configurations and readiness inputs by name - #12900
Merged
Merged
Conversation
…ation
fabric_agent_configuration checked config_json against Fabric's types
only while planning, and reported any failure as "observation query
failed", without saying what was wrong.
The resource now checks config_json during validation and reports
"Invalid config_json" on that attribute, naming the rejected field
("at harness.adapter_id") through a safe path and never the value. An
attribute check can now build its message, so ValidateAttribute
returns a Cow instead of a fixed string; storage's checks are
unchanged.
Part of #12788.
fabric_sandbox_readiness took one sandbox map of strings. Generated graphs filled it with every string attribute of the sandbox, filtering out its typed inputs, and merged in the agent configuration's config_json. OpenTofu could not check which keys the read needed, and a missing or misspelled key surfaced only when the read failed. The data source now requires the nine attributes it reads by name: the sandbox's workspace, name, id, owner, generation, agent_name, agent_runtime, and runtime_json, and the configuration's config_json. The checks are unchanged; validation now also requires runtime_json and config_json, which the read already needed. Generated graphs reference each attribute directly. Part of #12788.
ValidateAttribute now returns Cow<'static, str>. The managed gateway and Kubernetes definitions, added to v1 after this change was written, pass SDK checks that return a fixed &'static str; convert their errors instead of changing the SDK signatures.
Contributor
This was referenced Oct 9, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #12857, which merged into the stale
feat/fabric-capabilitiesbranch instead ofv1. Part of #12788 (step 2 of 3, the last).The first two commits are #12857's, cherry-picked onto
v1unchanged. The third is new:v1added two attribute checks after #12857 was written.Failure
fabric_agent_configurationcheckedconfig_jsonagainst Fabric's types only while planning, and reported any failure asobservation query failed, without saying what was wrong.fabric_sandbox_readinesstook onesandboxmap of strings. Generated graphs filled it with every string attribute of the sandbox, filtering out its typed inputs, and merged in the configuration'sconfig_json. OpenTofu could not check which keys the read needed; a missing or misspelled key surfaced only when the read failed.Decision
Three commits:
config_jsonis checked during validation withserde_path_to_error, and reported asInvalid config_jsonon that attribute:config_json is not a valid Fabric configuration at harness.adapter_id. The path passes throughdiagnostic_field; the value and Fabric's own message, which can quote it, never appear. To build that message,ValidateAttributereturnsCow<'static, str>instead of&'static str; storage's checks return the same fixed text.workspace,name,id,owner,generation,agent_name,agent_runtime, andruntime_json, and the configuration'sconfig_json: the keys the read already used. The checks are unchanged; validation now also requiresruntime_jsonandconfig_json. Generated graphs reference each attribute directly, and the filter for typed sandbox inputs goes away.v1's newer attribute checks adopt the owned message. The managed gateway and Kubernetes definitions pass SDK checks that return&'static str; their definitions now convert the error rather than changing those SDK signatures.Two items in #12788 were deliberately not done; the issue records why:
configas an HCL value. Fabric's configuration schema is open, so generated blocks would drop extension keys. Adynamicattribute would fit, but the pinnedtf-providerdecodes state without the schema and cannot tell a dynamic attribute's[type, value]pair from a two-element list.config_jsonstays a JSON string.ownerandgenerationon the configuration. They are the sandbox's identity, which the provider verifies before acting, not the configuration's own. They stay required.Validation
harness.adapter_idand malformed JSON are reported without the input. Readiness exposes the nine required inputs and nosandboxmap, hands the bridge exactly those nine, defers on unknown inputs, rejects missing or empty ones, and does not echo rejected values.Invalid config_json ... at harness.adapter_id, never shows the value, and makes no sandbox call.cargo cipassed on linux_arm64 for feat(provider): check Fabric configurations and readiness inputs by name #12857's two commits, including 108 lifecycle tests.deployment::web_search_cli_export_reapply_and_destroyreached its 300 s limit under load and passed alone in 255 s. That test timed out the same way on this host before these changes, so CI on this PR is the authoritative lifecycle result.