Follow-up to #2087. Saved workflows are checked against a connector's declarations when they are saved, but when a connector later loads with different declarations (an update, a restart that declares something else), nothing re-checks them: a workflow can keep calling an action or channel the connector no longer declares, and the breakage only shows when a run fails.
Done when
When a connector's stored declarations change, every saved workflow that references that connector is re-checked against the new declarations.
If a saved workflow would become invalid, the new declarations are refused (the connector fails to start with a clear reason, and the previous declarations stay in force), the same way bad settings are refused at accept time.
A table test in modules/runs covers a saved workflow whose action or chat channel is no longer declared, and one that still is.
task check passes.
Follow-up to #2087. Saved workflows are checked against a connector's declarations when they are saved, but when a connector later loads with different declarations (an update, a restart that declares something else), nothing re-checks them: a workflow can keep calling an action or channel the connector no longer declares, and the breakage only shows when a run fails.
## Done when
- When a connector's stored declarations change, every saved workflow that references that connector is re-checked against the new declarations.
- If a saved workflow would become invalid, the new declarations are refused (the connector fails to start with a clear reason, and the previous declarations stay in force), the same way bad settings are refused at accept time.
- A table test in `modules/runs` covers a saved workflow whose action or chat channel is no longer declared, and one that still is.
- `task check` passes.
connectors.Module takes a Recheck hook (Use), called from launch after the connector starts and before its declarations are stored; wired in internal/app/archie to runs.Engine.RecheckConnector.
RecheckConnector re-checks every saved workflow that references the connector against the new declarations (recheckWorkflows, pathed workflow.steps[i]...). Any problem returns an InvalidError, the connector is stopped and marked failed, and the previous stored declarations stay in force, so saved workflows never silently lose what they call.
Table test TestRecheckingSavedWorkflowsOnCapabilityChange in modules/runs covers a removed action, a removed chat delivery, still-covering declarations, and an unreferenced connector; verified to fail with the check disabled. task check passes.
Landed in 592d36e0d.
- `connectors.Module` takes a `Recheck` hook (`Use`), called from `launch` after the connector starts and before its declarations are stored; wired in `internal/app/archie` to `runs.Engine.RecheckConnector`.
- `RecheckConnector` re-checks every saved workflow that references the connector against the new declarations (`recheckWorkflows`, pathed `workflow.steps[i]...`). Any problem returns an `InvalidError`, the connector is stopped and marked failed, and the previous stored declarations stay in force, so saved workflows never silently lose what they call.
- Table test `TestRecheckingSavedWorkflowsOnCapabilityChange` in modules/runs covers a removed action, a removed chat delivery, still-covering declarations, and an unreferenced connector; verified to fail with the check disabled. `task check` passes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up to #2087. Saved workflows are checked against a connector's declarations when they are saved, but when a connector later loads with different declarations (an update, a restart that declares something else), nothing re-checks them: a workflow can keep calling an action or channel the connector no longer declares, and the breakage only shows when a run fails.
Done when
modules/runscovers a saved workflow whose action or chat channel is no longer declared, and one that still is.task checkpasses.Landed in
592d36e0d.connectors.Moduletakes aRecheckhook (Use), called fromlaunchafter the connector starts and before its declarations are stored; wired ininternal/app/archietoruns.Engine.RecheckConnector.RecheckConnectorre-checks every saved workflow that references the connector against the new declarations (recheckWorkflows, pathedworkflow.steps[i]...). Any problem returns anInvalidError, the connector is stopped and marked failed, and the previous stored declarations stay in force, so saved workflows never silently lose what they call.TestRecheckingSavedWorkflowsOnCapabilityChangein modules/runs covers a removed action, a removed chat delivery, still-covering declarations, and an unreferenced connector; verified to fail with the check disabled.task checkpasses.Landed in
592d36e0d. Closing without the manual check; it moves to #2096.