Chapter 25Lesson 04~180 minutes

Plugin Ecosystem, Plugin Dependencies, Update Center, Compatibility, Pinning, Removal, and Plugin Governance: Diagnostics, Failure Modes, Security, and Performance

Diagnose plugin incidents from immutable baseline evidence outward: core/Java compatibility, dependency graph, update-center/advisory state, startup logs, plugin-owned configuration and downstream jobs. Repair the smallest layer possible without blind upgrades, dependency deletion, security weakening or unsafe downgrade assumptions.

DiagnosticsAdvisoriesDependency graphData compatibilityAttack surfaceEvidence

Learning objectives

  • Run the standard evidence-first diagnostic sequence for plugin failures.
  • Distinguish core incompatibility, dependency failure, plugin-owned data failure and job/agent failures.
  • Handle security advisories without suppressing warnings or performing blind fleet upgrades.
  • Explain why plugin rollback may require full-state restore rather than a .jpi downgrade.
  • Measure how plugin sprawl affects attack surface and controller startup/runtime cost.

1. Evidence-first diagnostic sequence

  1. Preserve controller startup log, job/build/queue IDs and first failing stack trace/message.
  2. Record Jenkins core, Java, container/package identity and exact installed plugin manifest.
  3. Record candidate/update-center metadata, dependency graph and minimum-core requirements.
  4. Confirm which plugin extension/job/configuration actually failed before touching agents.
  5. If a build reached queue/agent execution, then inspect labels, Remoting, workspace and tools.
  6. Inspect credentials/network/external systems only when the plugin path reached them.
  7. Compare plugin-owned reports/artifacts/config with the previous known-good build.
  8. Apply the least destructive correction in a clone and rerun only the smallest safe scope.

2. Intentionally broken example: remove a dependency still in use

On a disposable clone, imagine an administrator sees theme-manager.jpi and assumes it is unused because no one configured Theme Manager directly. They delete it while Dark Theme remains enabled. On restart, Jenkins reports a failed dependency and the theme plugin cannot load.

Failed Loading plugin Dark Theme (dark-theme ...)
 - Update required: Theme Manager (...) to be installed and enabled

The original evidence is the startup failure plus the prior plugin manifest. The causal layer is controller/plugin dependency resolution, not the job queue or agent. Least-destructive repair: restore the exact dependency from the known-good manifest in the clone, restart, verify, then decide whether to retire Dark Theme first.

3. Blind upgrades

Failure pattern: an operator clicks “update all,” combining dozens of direct/transitive changes with no captured baseline. A Pipeline later fails, but there is no clear candidate set. Repair the process, not just the immediate plugin: freeze the controller, export the installed manifest, restore the accepted snapshot if needed, then replay updates as small reviewed batches.

4. Stale vulnerable plugin

Security warnings are not optional telemetry. On 2 September 2026 Jenkins published an advisory affecting core and multiple plugins; fixes included Jenkins 2.568.3 and specific plugin versions. When inventory matches an affected range, preserve advisory/version evidence, determine the fixed release and required core, stage the update on a clone, test representative workloads, and schedule a controlled deployment.

Do not “test” security by installing a known vulnerable plugin into an exposed controller. Use metadata/advisory comparison or an isolated offline training environment. Never disable CSRF, authorization, Script Security or TLS to make a plugin work.

5. Why rollback is not just reinstalling an old .hpi

A newer plugin may write new XML fields, serialized classes, credentials/provider data or build actions. Older code may not understand those structures. Required dependencies may also have moved forward. The safe rollback unit is therefore the compatible controller state: core/Java + plugin set + JENKINS_HOME snapshot, with a restore test.

6. Uninstall does not erase plugin-created data

Jenkins documents that uninstall preserves configuration. During boot, unrecognized plugin-defined data may be ignored with warnings; reinstalling the plugin can make those values reappear. Manage Old Data is a separate purge operation. Preserve evidence and backups before purging because that step can make rollback harder.

7. Plugin sprawl: security and performance causality

Every additional plugin can add classes, extension points, transitive libraries, descriptors, periodic tasks, UI endpoints and advisory obligations. Symptoms can include slower startup, larger heap/class metadata, longer plugin preparation, compatibility conflicts and more patch windows. Measure:

  • total enabled plugins and transitive count,
  • controller startup duration and failed/deferred plugins,
  • heap/classloading/CPU before and after large changes,
  • unused/disabled plugins and configuration references,
  • security warnings and maintenance/health status.

Do not “fix” startup pressure by adding build executors to the controller.

8. Causal failure map

Symptom Likely first layer Evidence to preserve Wrong shortcut
Plugin refused: requires newer Jenkins Core/plugin compatibility core version + plugin metadata manually force-copy archive
Failed dependency at startup Plugin graph startup log + manifest delete more plugins
Unknown configuration after uninstall Plugin-owned persisted data snapshot + warning + old data purge immediately
Pipeline step disappears Plugin disabled/failed installed/enabled state + plugin owner retry build repeatedly
Build queued forever Queue/agent capacity queue reason + labels/executors upgrade plugins randomly
External API 401 credential/provider credential ID/scope + response grant controller admin credential

9. Synthetic incompatibility gate

Instead of intentionally installing an incompatible plugin, model the policy gate with synthetic candidate metadata:

{
  "plugin": "lab-example",
  "version": "9.9.9",
  "requiresJenkins": "2.600.1",
  "targetJenkins": "2.568.3"
}
from packaging.version import Version
assert Version("2.568.3") >= Version("2.600.1"), "REJECT: minimum core not met"

The expected assertion failure is the success condition for the gate: incompatible metadata never reaches the controller. In a real workflow, use Update Center/plugin metadata and a version-aware resolver rather than hand-authored JSON.

10. Security-sensitive/disruptive actions

Installing, disabling, uninstalling or downgrading plugins; changing update sites; running Script Console code; restarting/restoring the controller; and purging old plugin data are privileged, potentially disruptive actions. Keep them in disposable clones until a reviewed change plan identifies exact target, snapshot, owner, test set and rollback stop condition.

Next lesson

Checkpoint Lab

Produce an SBOM-like plugin manifest, stage a controlled upgrade, reject an incompatible candidate, restore a snapshot and assemble governance evidence.

Knowledge check

Answer before revealing the explanation.

1. A controller fails to start after a plugin file is removed. What should you inspect first?

2. Why is “downgrade the .jpi” unsafe as an automatic rollback?

3. How should a stale vulnerable plugin be handled?

4. How does plugin sprawl become a security and performance problem?

5. What is the safest retry scope after a failed plugin upgrade?

Official references and version notes

Verified baseline — 17 September 2026. Labs use Jenkins 2.568.3 LTS with Java 21; Jenkins 2.568.3 is tested with Java 21 and 25. The disposable controller image is jenkins/jenkins:2.568.3-lts-jdk21; record its platform-specific digest before execution. Dark Theme is 652.vea_da_dfea_e769 (requires Jenkins 2.528.3) and requires Theme Manager ≥ 327.v780d7096ec29; current Theme Manager is 346.v06cca_64c6a_37 (requires Jenkins 2.504.3). Current upstream Plugin Installation Manager Tool is 2.15.0; verify the exact jenkins-plugin-cli --version bundled in the selected controller image. Re-check all of these before reuse because plugin releases, dependency graphs and advisories change independently.

Keep the academy open

Support free, practical DevOps education.

Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.

Ethereum / ERC-20
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0Send only Ethereum/ERC-20 compatible assets to this address.