Introducing a new way to review your PRs.

Read the announcement

hcavarsan / pipedash

One dashboard for CI/CD pipelines across multiple providers

View on GitHub

19 documents · Updated Nov 23, 2026

docs / plugin-platform

Plugin platform and provider lifecycle

The plugin platform gives the core application one provider API for many external pipeline and deployment systems. Each plugin describes its connection needs, user-facing features, and data model, then turns provider-specific state and actions into shared pipeline, run, log, health, permission, and sign-in behavior. See Provider integrations for the wider provider model, Provider adapters for the boundary between provider APIs and the core domain, and Core domain and persistence for the shared domain state that consumes provider data.

Plugin contract

The plugin contract is the shared interface between a provider integration and the application. A plugin owns access to one external system while the core asks for the same broad set of catalog, history, action, log, and health operations without knowing that system’s API shape. The public contract is exposed by crates/…/lib.rs and defined across its plugin, metadata, schema, health, sign-in, action, and type modules.

Each plugin supplies metadata and an initialization step. Its behavior can include:

  • Validate credentials and report permissions.
  • Discover organizations and available pipelines.
  • Fetch pipelines, run history, run details, and workflow parameters.
  • Trigger, cancel, review, rerun, or reconcile work when supported.
  • Read logs, artifacts, agents, queues, or rate limits when supported.
  • Report component health and an external status page when available.
  • Start sign-in and describe token renewal rules when supported.

Shared metadata facts also guide core behavior outside direct plugin actions. For example, a run marked as awaiting review cannot be canceled as a normal active run, and the same state is not counted as a run waiting in the provider queue.

Unsupported actions return a shared not-supported result. This lets the application keep one API while plugin metadata controls which actions and features are available to users.

Shared provider behavior

The plugin API also supplies common rules that keep provider results consistent. Action state follows both declared capabilities and current pipeline or run facts. Trigger forms can reuse valid prior inputs and apply typed defaults, while result helpers normalize external conclusions and deployment health into shared pipeline states.

Network work follows the shared error model. Transient failures can be retried with a delay, permanent failures return at once, and a request that may have reached the provider is not sent again after a timeout. Successful cached lookups can be reused, while transient errors remain retryable and partial collection stops on a transient failure.

References: crates/…/lib.rs• L1-26 crates/…/defaults.rs• L24-82 crates/…/timing.rs• L5-33 crates/…/tests.rs• L75-124 crates/…/utils.rs• L21-99

Plugin metadata

Plugin metadata connects provider behavior to setup, permissions, tables, and user-facing copy. The core uses it to list provider types and explain which features work with a provider’s permissions. Presentation data also lets a provider use terms such as “resource” or “reconciliation” instead of forcing generic pipeline language on every provider.

The main metadata groups are:

GroupPurpose
IdentityNames the provider type and supplies display data such as its icon and version.
ConfigurationDescribes connection fields and the authentication modes that can use them.
TablesDescribes provider data views, columns, sorting, filtering, and display rules.
CapabilitiesStates which pipeline and run actions the provider can support.
Permissions and featuresLinks access checks to optional application features.
PresentationDefines provider terms, status labels, setup copy, action copy, and empty states.
Run historyDescribes how the provider represents and orders historical records.

Capability flags and action state form one contract. A plugin must not expose an action that its metadata does not allow. The built-in provider contract tests check this relationship for every registered plugin, along with schema consistency and table sort paths.

References: crates/…/builders.rs• L151-218 crates/…/presentation.rs• L15-124 crates/…/defaults.rs• L38-77 crates/…/contract.rs• L62-111 crates/…/contract.rs• L145-201

Configuration schemas

The configuration schema lets the application build provider setup from a structured description instead of hard-coding each provider form. A field has a key, label, input type, required state, optional default, validation rules, and a section such as authentication, connection, or settings.

Authentication is part of the schema. A provider can offer token, sign-in, kubeconfig, or no-auth modes. Fields can be active only for selected modes, so the provider draft validates and saves only the fields that belong to the chosen connection method. Dynamic field options let the core ask an initialized plugin for values such as kubeconfig contexts or namespaces.

The schema also describes provider-specific tables. Table definitions tell the client which columns exist, how values should render, when columns appear, and which columns support sorting or filtering. The client can therefore render provider views without provider-specific form or table code.

Provider drafts are checked before they reach storage. The validation step reports the active fields and missing values, rejects unsupported authentication modes, validates field patterns, and requires a completed sign-in when sign-in mode is selected. Resource selection is part of this check when a provider requires manual selection. Changing a scope such as a namespace or kubeconfig clears stale selections so the next fetch can refresh them.

References: crates/…/schema.rs• L8-137 crates/…/schema.rs• L145-240 crates/…/draft.rs• L29-157 crates/…/rules.rs• L103-179 crates/…/columns.rs• L10-131

Registry and discovery

The plugin registry maps a stable provider type string to plugin metadata and a factory for fresh plugin instances. The built-in plugin crate registers the provider crates under their crate-derived type names. The registry is the source for setup discovery and the creation path for configured providers.

The core uses the registry to:

  • List provider types and metadata for setup.
  • Reject unknown provider types in stored, imported, or file-based configuration.
  • Create an independent plugin instance for each configured provider.

Provider type names are identity keys. The registry tests require every declared built-in provider to be registered, require metadata to use the same type set, and require each factory call to return a separate instance.

References: crates/…/lib.rs• L151-167 crates/…/Cargo.toml• L10-26 crates/…/registry.rs• L26-88 crates/…/capabilities.rs• L38-55

Provider loading

The provider service turns saved configuration into a live provider that fetch and action services can use. It resolves the provider type, prepares the shared HTTP client when needed, resolves stored or sign-in credentials, initializes a fresh plugin, and wraps it in the core provider boundary.

The lifecycle has these stages:

  1. The service reads provider configuration from storage or a configuration file.
  2. The registry checks that the provider type is known.
  3. The service resolves credentials and creates the client requested by the plugin.
  4. The plugin initializes and validates the connection.
  5. The service installs the live provider with a generation and refresh schedule.
  6. Fetch and action services use that instance until a configuration or credential change replaces it.

The following diagram shows how saved configuration becomes a shared core provider and then serves application work.

flowchart LR
    Config[Saved provider configuration] --> Service[Provider service]
    Service --> Registry[Plugin registry]
    Registry --> Plugin[Fresh provider plugin]
    Service --> Credentials[Token or sign-in credential]
    Service --> Client[Shared HTTP client]
    Credentials --> Plugin
    Client --> Plugin
    Plugin --> Adapter[Plugin adapter]
    Adapter --> Live[Live core provider]
    Live --> Scheduler[Fetch scheduler and application actions]

Adding or updating a provider validates credentials and checks permissions before the new configuration becomes active. A successful change replaces the live instance, resets fetch state, refreshes health input, and queues a fetch. Removal clears the stored provider and its live, scheduled, health, log, and cached-data state.

Configuration import and file sync use the same loading rules. They reject unknown types before applying changes and apply only changed provider blocks. A failed partial apply reports what succeeded and can be retried without silently accepting invalid provider state.

References: crates/…/auth.rs• L55-135 crates/…/config.rs• L32-178 crates/…/mutations.rs• L47-169 crates/…/mutations.rs• L202-233

Provider adapter

The plugin adapter is the translation boundary from the plugin API to the core domain provider API. It forwards supported operations, converts shared pipeline and run values, and maps plugin errors into domain errors. This keeps provider-specific error names and data types out of core services.

The adapter also carries the configured provider ID and type. It adds that identity to returned data and preserves capability, health, status-page, log, and token-renewal information for the core. Core-owned monitoring fields, including learned cadence, start unset when plugin pipelines enter the domain so later core services can derive them from run data.

The core therefore handles provider work through one domain interface even when providers use different external models. Local plugin IDs are translated to global IDs at this boundary, and global IDs are reduced back to local IDs before plugin calls.

References: crates/…/plugin_adapter.rs• L28-87 crates/…/plugin_adapter.rs• L90-155 crates/…/plugin_adapter.rs• L158-345 crates/…/error.rs• L5-74

Health and status interfaces

Health has two optional plugin sources. A plugin can report named internal components and can provide an external status page. The core combines these signals with fetch results and scheduler state to show whether a provider is fresh, stale, down, or waiting for its next attempt.

Component checks use shared health levels from operational through major outage. Permission errors remain visible. Missing components are treated as an absent installation only when all requested components are missing. A custom status page must use HTTPS, or HTTP for a literal loopback address, and is read through its summary feed.

The health interface also supports provider-specific checks such as Flux controller health. Feature metadata ties those checks to the permissions needed to use them. The provider service sends health inputs when providers are added, replaced, reloaded, or removed so health state follows the live provider generation.

References: crates/…/health.rs• L19-205 crates/…/metadata.rs• L42-120 crates/…/plugin.rs• L83-145 crates/…/config.rs• L193-221

Sign-in interface

The sign-in interface lets a plugin describe an OAuth-style connection while the core owns flow state, callbacks, credential storage, and renewal. A plugin supplies the identity provider, client information, scopes, redirect details, and token type. It can also state which refresh responses require a new sign-in.

The provider service uses this interface for new providers and reconnects. It starts a flow from plugin configuration, checks that a callback belongs to the expected flow and provider, exchanges the code, and keeps the result until the provider draft is saved. A saved credential is renewed before use when it is due to expire. The provider service serializes sign-in mode separately from a bearer token, so editing a provider does not expose the stored credential as a form value.

The flow is linked to its provider during reconnect. This prevents one provider from consuming another provider’s sign-in result. A provider may instead offer token, no-auth, or kubeconfig access, and the schema tells the draft which path is valid.

References: crates/…/auth.rs• L37-49 crates/…/auth.rs• L55-123 crates/…/auth.rs• L161-232 crates/…/draft.rs• L93-156 crates/…/sign_in.rs• L6-29

Provider management interface

The provider management surface lets the client list and edit configured providers, validate credentials, preview available pipelines, fetch organizations and field options, inspect permissions and feature availability, read table schemas, refresh data, and import or export provider settings. The provider service keeps configuration, live state, health, schedules, and fetched data related but separate.

Provider-specific selection is part of this management path. A draft can request all available resources or a selected set. The service preserves a valid saved selection when only credentials change, but requires a new selection after the provider’s scope changes. Plugins can also filter saved selections against the current provider catalog when that operation is supported.

The application exposes one management flow even when a plugin has very different connection models. For example, ArgoCD can connect to its API with a token or sign-in, or read ArgoCD resources directly from Kubernetes with a kubeconfig. FluxCD uses Kubernetes resources and reports separate optional features for controller health, events, workloads, and reconciliation. These differences stay inside metadata and the plugin contract.

References: crates/…/capabilities.rs• L17-35 crates/…/rules.rs• L103-179 crates/…/mutations.rs• L47-164 crates/…/metadata.rs• L12-99 crates/…/plugin.rs• L165-205 crates/…/metadata.rs• L123-219

Provider plugin examples

Concrete plugins use the same contract for different provider shapes. The important platform pattern is not the external protocol. It is the way each plugin turns its native resources into common pipelines, runs, actions, logs, and health signals.

Provider shapeShared product view
ArgoCD API or Kubernetes accessApplications become pipelines. Sync history becomes runs. Resource trees, events, and pod logs become health and log nodes.
CircleCIProjects become pipelines. Pipeline workflows and jobs become run history and log nodes. Trigger inputs can include branches, pipeline choices, and typed parameters.
Coolify or KomodoApplications or stacks become pipelines. Deployments or updates become runs. Deployment and stage output become logs.
FluxCDKustomizations and HelmReleases become resources. Reconciliation history and current status become runs. Controller, workload, and event checks enrich health.

ArgoCD shows why the plugin boundary matters. Its API and Kubernetes modes share one provider-facing behavior, while the plugin selects the right backend, applies the configured scope, and keeps actions within that scope. FluxCD shows the same pattern for permission-driven optional features and current-state snapshots when native history is bounded.

References: crates/…/backend.rs• L28-147 crates/…/plugin.rs• L223-365 crates/…/actions.rs• L80-218 crates/…/plugin.rs• L115-238 crates/…/plugin.rs• L178-318 crates/…/plugin.rs• L193-282

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the provider type in plugin registration, registry metadata, factories, and stored or imported configuration aligned.
  • Keep authentication options, mode-scoped fields, draft validation, credential resolution, and plugin initialization aligned.
  • Keep capability flags, permission-backed features, presentation actions, and plugin methods aligned.
  • When changing shared pipeline, run, log, health, or error values, update both the plugin API and the adapter mapping.
  • When changing table columns or sort paths, keep the provider schema aligned with the fields the core can display and sort.
  • When changing provider scope or selection rules, preserve the rules that clear stale selections and reject out-of-scope IDs.
  • When changing sign-in renewal behavior, keep refresh rejection rules aligned with credential renewal and provider ownership checks.
  • When changing run metadata flags such as review state, keep action availability and queue-wait timing aligned.
  • When adding a plugin health feature, ensure metadata permissions and provider health inputs support it through replacement and removal.
  • When changing retry rules, keep transient error categories, retry hints, and request-safety rules aligned with provider actions.
  • When changing provider pipeline conversion, preserve the boundary between plugin data and core-derived monitoring values such as cadence.

Important failure modes

TriggerConsequenceGuard
A provider type is missing from the registry or factoryThe provider cannot be loaded, imported, or usedRegister the type and keep the registry, metadata, and factory mappings aligned.
Metadata advertises an action or feature that the plugin cannot supportThe client can offer an action that fails or exposes unusable dataTreat capability, permission, presentation, and plugin behavior as one contract.
A draft uses a field from another authentication modeStale credentials or invalid connection data can be savedValidate active fields by auth mode and build the stored config from the selected mode only.
A pending run awaiting review is treated as a normal queue waitThe run can appear stuck or trigger a queue alert while it waits for an intended decisionUse the shared review-state fact for both action state and run timing.
A scope change keeps an old resource selectionFetches can monitor the wrong resources or fail with invalid IDsClear saved selections when scope keys change and require a fresh selection when needed.
A sign-in callback has the wrong owner, state, address, or lifetimeThe credential is rejected or assigned to the wrong providerCheck flow state, redirect, provider ownership, and expiry before saving it.
A transient provider error loses its shared error category or retry hintFetches lose retry, rate-limit, or pause behaviorPreserve the shared plugin error category and retry information.
A request is retried after a timeout even though the provider may have received itA trigger or other action can run more than onceRetry only unsent connect failures and do not resend timed-out requests.
A provider update does not replace the loaded instanceFetches continue with old credentials or settingsReplace the live provider, reset fetch state, and advance its generation after a successful update.
A Kubernetes-backed plugin receives an out-of-scope resource IDThe plugin could read or change a resource outside the provider selectionValidate resource names, namespaces, and configured selections before making the request.
A plugin conversion treats a core-derived monitoring value as provider dataMonitoring state can be stale or be mistaken for provider truthLeave values such as cadence unset at the adapter boundary and derive them in core services.

Key files

FileWhy to read it
crates/…/lib.rsShows the public plugin API and registration macro.
crates/…/schema.rsDefines configuration, authentication, and table schemas.
crates/…/presentation.rsDefines provider terms, action copy, status labels, and view copy.
crates/…/health.rsDefines component health and status-page interfaces.
crates/…/sign_in.rsDefines plugin input to sign-in and token renewal.
crates/…/defaults.rsShows how capabilities and provider facts become action state and shared review-state behavior.
crates/…/utils.rsDefines shared retry, result normalization, caching, and partial-result rules used by plugins.
crates/…/draft.rsCoordinates provider draft validation and persistence.
crates/…/auth.rsCoordinates sign-in ownership, credential resolution, and renewal.
crates/…/mutations.rsCoordinates add, update, replacement, refresh, and removal.
crates/…/config.rsShows provider import, export, and configuration-file sync.
crates/…/timing.rsShows how shared run metadata separates queue waiting from intentional review waits.
crates/…/plugin_adapter.rsTranslates plugin results into the core provider domain and leaves core-derived monitoring fields for core services.
crates/…/Cargo.tomlLists the built-in provider plugins that enter the registry.
crates/…/contract.rsChecks shared metadata, action, schema, and table contracts.
crates/…/registry.rsChecks provider registration, metadata identity, and fresh instances.
crates/…/plugin.rsIllustrates one plugin with multiple connection backends and shared provider behavior.
crates/…/metadata.rsIllustrates permission-backed optional features and Kubernetes setup.