← Back to issue list

Add the ability for plugins to mark their build step as clean or dirty

View original Github issue

Metadata

Project
craft-parts
Number
#1315
Type
issue
State
open
Author
lengau
Labels
Status: Triaged Type: Enhancement
Created
Updated
Closed
—

Current evaluation

Triaged enhancement to let plugins classify an otherwise-current build as clean or dirty, enabling UPDATE instead of unconditional SKIP; no implementation is present in the current codebase.

Suggested action: keep open

Reason: The maintainer-authored request is explicitly triaged and proposes a concrete Plugin API, while the current sequencer still sends an otherwise-current BUILD to ActionType.SKIP and Plugin has no build_is_dirty method. The existing ActionType.UPDATE path and related snapcraft#447 support the need, but the unresolved question about returning ActionType means API semantics and state integration still require design.

Evaluated by: mr-cal-bot

Impact: 45 Quick Win: 15 Complexity: 58 Confidence: 91 Actionability: 78

Issue body

### What needs to get done Add a `Plugin` method something like this: ```python def build_is_dirty(self) -> bool | None: """Check whether the build is dirty. :returns: True if the plugin knows the build is dirty, False if it knows it's clean, or None if unknown. """ return None ``` ### Why it needs to get done We got a request to be able to do an update rather than a skip. Question for @cmatsuoka - Do we possibly make this something that returns the requested ActionType instead? Still defaults to None, but if the plugin knows what ActionType it wants for the build step it can request that.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 45
Quick Win: 15
Complexity: 58
Confidence: 91
Actionability: 78
keep open Triaged enhancement to let plugins classify an otherwise-current build as clean or dirty, enabling UPDATE instead of unconditional SKIP; no implementation is present in the current codebase.
qwen/qwen3.6-35b-a3b
Impact: 35
Quick Win: 16
Complexity: 40
Confidence: 80
Actionability: 75
keep open Enhancement to add build_is_dirty method to Plugin base class for build step state tracking
qwen/qwen3.8-27b
Impact: 35
Quick Win: 16
Staleness: 68
Complexity: 55
Confidence: 82
Support Request: 0
keep open Enhancement to add a Plugin method (build_is_dirty or an ActionType request) so plugins can mark their build step clean/dirty and trigger an update instead of a skip. Triaged, unimplemented, design question to cmatsuoka unanswered.
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 65
Confidence: 85
Support Request: 10
close stale Enhancement to allow plugins to report build step state as clean, dirty, or unknown. Triaged but inactive for nearly a year with no implementation progress or resolution.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 45
Confidence: 65
Support Request: 10
keep open Enhancement to add a plugin method for marking build steps as clean or dirty, allowing updates instead of skips. Triaged by maintainer but inactive for ~9.5 months with no implementation progress.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#447 (confidence 96%)

    The merged Snapcraft change adds dirty build-step detection and is the motivating use case for allowing an update rather than a skip.

Related issues

Issue Project State Summary Similarity
#447 Detect dirty build step. snapcraft merged Merged PR #447 (commit 6224553ae): build step now detects YAML changes affecting a part's plugin build attributes and errors asking the user to clean, advancing LP bug #1477904. Unlike strip/stage, build is not auto-cleaned.
72%