Skip to content

Update docs for Resource.Reconfigure removal [On Hold until v0.133.0]#5042

Open
Shannon Bradshaw (shannonbradshaw) wants to merge 3 commits into
mainfrom
claude/update-module-reconfigure-lifecycle
Open

Update docs for Resource.Reconfigure removal [On Hold until v0.133.0]#5042
Shannon Bradshaw (shannonbradshaw) wants to merge 3 commits into
mainfrom
claude/update-module-reconfigure-lifecycle

Conversation

@shannonbradshaw

@shannonbradshaw Shannon Bradshaw (shannonbradshaw) commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Source changes

Docs changes

  • docs/build-modules/module-reference.md: Simplified the Python/Go defaults table — removed the "Rebuild on config change" and "In-place reconfigure" rows (rebuild is now universal, not a default-vs-custom behavior). Added a prose paragraph clarifying that viam-server always rebuilds modular resources when config or dependencies change. Updated ReconfigureResource RPC description: no longer called by viam-server, config changes go through RemoveResource + AddResource instead. Not labeled Deprecated since proto has no [deprecated = true].
  • docs/build-modules/platform-apis.md: Fix frontmatter description from "validate and reconfigure functions" to "validate function and constructor".
  • docs/data/filter-at-the-edge.md: Change "reconfigure method" to "constructor" when describing how to access dependencies.
  • docs/tutorials/configure/pet-photographer.md: Rename Go Reconfigure to private reconfigure since it is no longer part of the public Resource interface.
  • static/include/components/apis/overrides/protos/sensor.Reconfigure.md: Updated override text to use "Reconstruct" language.

Consolidation

This PR now incorporates all changes from #5111. Once this PR merges, #5111 should be closed.

Merge gate

Do not merge until rdk v0.133.0 is tagged AND contains #6098. The latest tag (v0.132.0) still has Reconfigure on the Resource interface. Merging before the release would make docs wrong for the current shipped SDK.

How I found these

  • Xref lookup: search-patterns.yaml entry for Resource.Reconfigure with associated terms (AlwaysRebuild, ReconfigureResource, etc.)
  • Grep matches: full sweep for Reconfigure, reconfigure method, reconfigure function across docs repo

Generated by daily docs change agent

@netlify

netlify Bot commented May 6, 2026

Copy link
Copy Markdown

Deploy Preview for viam-docs ready!

Name Link
🔨 Latest commit beabe1f
🔍 Latest deploy log https://app.netlify.com/projects/viam-docs/deploys/6a43fb79cca1010007f9749f
😎 Deploy Preview https://deploy-preview-5042--viam-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 43 (🔴 down 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label May 6, 2026

Copy link
Copy Markdown
Collaborator Author

Hold: source change reverted. The RDK change this PR documents (viamrobotics/rdk#5944, Remove-Reconfigure) was reverted by viamrobotics/rdk#5997 on 2026-05-07. Reconfigure is back on the Resource interface temporarily while the cascade-fix bakes on main.

The #5997 PR description says: "To reland Remove-Reconfigure: revert this PR." So Remove-Reconfigure is expected to re-land in 1-2 weeks.

Recommendation: Do not merge this PR until Remove-Reconfigure re-lands. Once it does, this PR's changes will be correct again and can be merged (possibly with minor updates if the re-land differs from #5944).


Generated by daily docs change agent


Generated by Claude Code

@viamrobotics-overwatch

Copy link
Copy Markdown

Hey Shannon Bradshaw (@shannonbradshaw) — CI is green and no reviewer is assigned yet. Could you request one when you have a chance?

Auto-comment from overwatch. Will not re-nudge for 7 days.

2 similar comments
@viamrobotics-overwatch

Copy link
Copy Markdown

Hey Shannon Bradshaw (@shannonbradshaw) — CI is green and no reviewer is assigned yet. Could you request one when you have a chance?

Auto-comment from overwatch. Will not re-nudge for 7 days.

@viamrobotics-overwatch

Copy link
Copy Markdown

Hey Shannon Bradshaw (@shannonbradshaw) — CI is green and no reviewer is assigned yet. Could you request one when you have a chance?

Auto-comment from overwatch. Will not re-nudge for 7 days.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, but I would hold off on merging since we reverted the linked PR to let the additional fixes bake and will land the actual remove reconfigure in the next week or so.

Comment thread docs/build-modules/module-reference.md Outdated
Comment on lines +239 to +252
@@ -240,12 +240,16 @@ if __name__ == '__main__':

The default behavior when you don't implement a method:

| Behavior | Go | Python |
| ------------------------ | ------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |
| Rebuild on config change | Default (`viam-server` destroys and re-creates the resource) | Default (`viam-server` destroys and re-creates the resource) |
| In-place reconfigure | Not supported for modular resources | Implement `reconfigure()` (called if your class satisfies the `Reconfigurable` protocol) |
| No-op close | Embed `resource.TriviallyCloseable` | Default on `ResourceBase` |
| Skip config validation | Embed `resource.TriviallyValidateConfig` | Default on `EasyResource` |
| Behavior | Go | Python |
| ------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| Rebuild on config change | Default (`viam-server` destroys and re-creates the resource) | Default (`viam-server` destroys and re-creates the resource) |
| No-op close | Embed `resource.TriviallyCloseable` | Default on `ResourceBase` |
| Skip config validation | Embed `resource.TriviallyValidateConfig` | Default on `EasyResource` |

`viam-server` always rebuilds modular resources when their configuration
changes. It removes the existing resource instance and creates a new one
using the constructor. In-place reconfiguration is not supported for
modular resources in any language.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The rebuild row doesn't really fit the structure of this table anymore since there is no default / not-default behavior, the behavior is to always rebuild. It can probably be dropped and the paragraph at the bottom explaining how modular resources are always rebuilt can do the explaining. Also, rebuilds happen when dependencies change as well, if worth mentioning.

nit: As an aside. this table structure was a little confusing to me. I interpreted as: default behavior if you don't implement a Close method is a no-op close, which embeds resource.TriviallyCloseable. But it should be conveyed the other way around. If you embed resource.TriviallyCloseable then you get the default behavior of a no-op close.

Comment thread docs/build-modules/module-reference.md Outdated
| --------------------- | ----------------------------------------------------------------------------------- |
| `Ready` | Handshake: module returns its supported API/model pairs. |
| `AddResource` | Create a new resource instance from config. |
| `ReconfigureResource` | Rebuild an existing resource with new config (removes and re-creates the resource). |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this is clear as-is, and the distinction is mostly one of internal mechanics but since we mention:

In-place reconfiguration is not supported for modular resources in any language.

consider mentioning the name ReconfigureResource is retained for compatibility reasons for more clarity.

Comment on lines +1 to +2
Reconfigure this resource.
Reconfigure must reconfigure the resource atomically and in place.
For modular resources, reconfiguration destroys the existing resource instance and creates a new one using the constructor.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe we can move away from the language of reconfigure towards reconstruction? i.e.

Reconstruct this resource.
For modular resources, reconstruction destroys...

@shannonbradshaw

Copy link
Copy Markdown
Collaborator Author

Thanks, Daniel Botros (@danielbotros). Will hold off on merging.

@viamrobotics-overwatch

Copy link
Copy Markdown

Hey Shannon Bradshaw (@shannonbradshaw) — this PR has been approved and CI has been green for 3+ business days. Ready to merge?

Auto-comment from overwatch. Will not re-nudge for 7 days.

Copy link
Copy Markdown
Collaborator Author

Daniel Botros (@danielbotros) Thanks for the review. The three feedback points were already incorporated into the latest push:

  1. Rebuild row removed — the table now only lists Close and Validate behaviors. The paragraph below covers the always-rebuild behavior and mentions both config and dependency changes.
  2. Compatibility note — the RPC table description for ReconfigureResource now says "The name is retained for compatibility."
  3. Reconstruct language — the sensor.Reconfigure.md override uses "Reconstruct this resource" instead of "Reconfigure."

On your nit about table framing: the header changed from "Behavior" to "To get this behavior" to make the direction clearer (embed X → get Y), though I understand the original framing was ambiguous.

Important caveat: The Remove-Reconfigure change (rdk#5811/rdk#5944) that this PR documents is still reverted (rdk#5997). The current RDK behavior is in-place reconfiguration for modular resources, not the always-rebuild behavior this PR describes. I'll keep this PR on hold until Remove-Reconfigure re-lands. If the re-land changes the design (e.g., per your suggestion about reconstruction language), I'll update accordingly.


Generated by daily docs change agent


Generated by Claude Code

@viamrobotics-overwatch

Copy link
Copy Markdown

Hey Shannon Bradshaw (@shannonbradshaw) — this PR has been approved and CI has been green for 9+ business days. Ready to merge?

Auto-comment from overwatch. Will not re-nudge for 7 days.

@viamrobotics-overwatch

Copy link
Copy Markdown

Hey Shannon Bradshaw (@shannonbradshaw) — this PR has been approved and CI has been green for 14+ business days. Ready to merge?

Auto-comment from overwatch. Will not re-nudge for 7 days.

@viamrobotics-overwatch

Copy link
Copy Markdown

Hey Shannon Bradshaw (@shannonbradshaw) — this PR has been approved and CI has been green for 20+ business days. Ready to merge?

Auto-comment from overwatch. Will not re-nudge for 7 days.

@btshrewsbury-viam btshrewsbury-viam self-assigned this Jun 25, 2026
@btshrewsbury-viam

Copy link
Copy Markdown
Collaborator

Daniel Botros (@danielbotros) mentioned this should make it in the June 30th release. Need to run a new check on the docs content

@btshrewsbury-viam btshrewsbury-viam changed the title Update module reconfiguration lifecycle docs Update module reconfiguration lifecycle docs [On Hold Unitl June 30th] Jun 26, 2026
@btshrewsbury-viam

Copy link
Copy Markdown
Collaborator

Overlaps with #5111 — these should be consolidated. Both PRs rewrite the same module-reference.md defaults table and the same ReconfigureResource RPC row for the same Reconfigure removal (rdk #5944 / reland #6098), with conflicting wording and different base-table states. They can't both merge cleanly; recommend folding into one PR and closing the other.

The release gate isn't met yet — gate on the tag, not the date. The removal is not in a released rdk tag: latest is v0.132.0 (June 23), which still has Reconfigure in the Resource interface (resource.go@v0.132.0:77); #6098 is 12 commits after that tag. The "[On Hold Until June 30th]" date has arrived but the gating release has not. Recommend gating on v0.133.0 being tagged AND containing #6098 (the framing on #5111, "until Next RDK Release", is correct), then merging. Merging before then makes the docs wrong for the current shipped SDK (in v0.132.0 in-place reconfigure is still supported and ReconfigureResource still updates in place).

If reconciling: this PR's prose paragraph (always rebuilds; not supported in any language) is the cleaner, language-agnostic table treatment — prefer it over #5111's "Not supported" row. But #5111's ReconfigureResource description is the more accurate one: on main, viam-server no longer calls ReconfigureResource — resource config changes go through RemoveResource + AddResource (no ReconfigureResource call site remains in module/modmanager/manager.go). Neither PR should label the RPC formally Deprecated, since module.proto has no [deprecated = true] on it — phrase it as "no longer called by viam-server".

viam-server now always rebuilds modular resources (close + re-create)
when their configuration changes. In-place reconfiguration via
Reconfigure() is no longer supported for modular resources in any
language. This removes the incorrect claim that Python modules can
implement reconfigure() to handle config changes in place.

Source: viamrobotics/rdk#5944

https://claude.ai/code/session_01Xd7GAtzjRzypiJK1amk4Uu
…nstruct language

- Drop "Rebuild on config change" row from defaults table since rebuilds
  are universal, not a default-vs-custom behavior. Note dependency changes
  also trigger rebuilds.
- Add compatibility note to ReconfigureResource RPC description.
- Use "Reconstruct" language in sensor.Reconfigure override.

https://claude.ai/code/session_01Xd7GAtzjRzypiJK1amk4Uu
…otographer fixes; fix ReconfigureResource wording

Incorporates changes from #5111 so both PRs can be consolidated:
- platform-apis.md: fix frontmatter "reconfigure functions" to "constructor"
- filter-at-the-edge.md: fix "reconfigure method" to "constructor"
- pet-photographer.md: Reconfigure -> reconfigure (private method)
- module-reference.md: ReconfigureResource RPC is no longer called by
  viam-server (uses RemoveResource + AddResource instead); not labeled
  Deprecated since proto has no [deprecated = true]

Per btshrewsbury-viam review: gate merge on v0.133.0 containing rdk#6098.

https://claude.ai/code/session_01Xd7GAtzjRzypiJK1amk4Uu
@shannonbradshaw Shannon Bradshaw (shannonbradshaw) force-pushed the claude/update-module-reconfigure-lifecycle branch from 45c5ae7 to beabe1f Compare June 30, 2026 17:23
@shannonbradshaw Shannon Bradshaw (shannonbradshaw) changed the title Update module reconfiguration lifecycle docs [On Hold Unitl June 30th] Update docs for Resource.Reconfigure removal [On Hold until v0.133.0] Jun 30, 2026
@shannonbradshaw

Copy link
Copy Markdown
Collaborator Author

Consolidated in beabe1f. This PR now includes all changes from #5111:

  • platform-apis.md: frontmatter fix ("reconfigure functions" → "validate function and constructor")
  • filter-at-the-edge.md: "reconfigure method" → "constructor"
  • pet-photographer.md: Reconfigure → private reconfigure
  • module-reference.md: ReconfigureResource described as "no longer called by viam-server" (not labeled Deprecated since proto has no [deprecated = true])

Updated title and description to gate on v0.133.0 containing rdk#6098. Once this merges, #5111 can be closed.


Generated by Claude Code

@viamrobotics-overwatch

Copy link
Copy Markdown

Hey Shannon Bradshaw (@shannonbradshaw) — this PR has been approved and CI has been green for 3+ business days. Ready to merge?

Auto-comment from overwatch. Will not re-nudge for 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to build This pull request is marked safe to build from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants