Skip to content

Action versioning and archiving#1803

Open
AaronPlave wants to merge 16 commits intodevelopfrom
feat/action-versioning
Open

Action versioning and archiving#1803
AaronPlave wants to merge 16 commits intodevelopfrom
feat/action-versioning

Conversation

@AaronPlave
Copy link
Copy Markdown
Contributor

@AaronPlave AaronPlave commented Mar 16, 2026

Description

Introduces versioning and archiving for action definitions. Instead of mutating action_definition in place when a new action file is uploaded, each upload now creates an immutable action_definition_version row with an auto-incrementing revision number.

Main changes:

  • New actions.action_definition_version table holds per-version data (action_file_id, parameter_schema, settings_schema, author, archived)
  • action_definition is simplified to hold only shared metadata (name, description, settings, archived, workspace_id) — file and schema columns moved to the version table
  • action_run now records action_definition_revision so runs are pinned to the version that executed them. Defaults to the latest revision if not provided.
  • DB triggers (pg_notify) updated to fire on action_definition_version inserts instead of action_definition inserts
  • Action server listener updated to write schema extraction results to the version table and strip stale settings keys from the parent definition when a new version's schema drops them
  • Hasura metadata and permissions added for the new table. Existing permissions updated to reflect the column changes
  • Migration 31_action_versioning includes both up.sql and down.sql

Areas I'd appreciate closer review on:

  • The migration SQL — especially the data-migration step that backfills version 0 from existing rows and the column drop ordering. Want to make sure the up/down are safe and complete.
  • The auto-increment revision trigger (action_definition_version_set_revision)
  • The stale-settings-stripping query in dbListeners.ts — this prunes settings keys from the parent action_definition when a new version's schema no longer includes them. Want to make sure the SQL logic is right and doesn't accidentally wipe valid settings.

Verification

  • Write tests
  • Verify behaviors with UI

@AaronPlave AaronPlave changed the title WIP action versioning and archiving Action versioning and archiving Mar 17, 2026
@AaronPlave AaronPlave requested review from JoelCourtney and removed request for JoelCourtney March 26, 2026 17:20
@AaronPlave
Copy link
Copy Markdown
Contributor Author

2. If you are running an older version of an action, and the settings schema has changed, the action run modal will ask you to specify the settings for this run - OK so far. But if one or more of these settings was a file or fileList type setting, the file dropdown is not correctly populated with the files in the workspace, and the default setting values are not correctly set.

Fixed in the UI PR.

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

Labels

publish Tells GH to publish docker images for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants