← Back to issue list

Include git revisions for `source-type: git` parts in `manifest.yaml`

View original Github issue

Metadata

Project
snapcraft
Number
#5490
Type
issue
State
open
Author
MggMuggins
Labels
Status: Triaged Type: Enhancement
Created
Updated
Closed

Current evaluation

Request to record git commit hashes of source-type: git parts in manifest.yaml and build logs. Triaged and acknowledged by a maintainer with a proposed 3-repo implementation plan; feature not yet implemented.

Suggested action: keep open

Reason: The issue is labelled 'Status: Triaged' and maintainer @mr-cal acknowledged it on 2025-05-21 with a concrete 3-layer approach (snapcraft -> craft-application -> craft-parts plus state-manager machinery) and an internal ticket SNAPCRAFT-1134. I verified the Manifest model in snapcraft/models/manifest.py still has no per-part git commit field and no commits implement it, so the request remains valid and unimplemented despite ~15 months of inactivity.

Impact: 45 Quick Win: 13.5 Staleness: 70 Complexity: 70 Confidence: 85 Support Request: 5

Issue body

### What needs to get done The `source-commit` tag should be included in `manifest.yaml` for `source-type: git` parts where `snapcraft.yaml` only specified tags/branches (or no tag/branch at all). At the moment, it is the responsibility of the packager to ensure that the version specified in `snapcraft.yaml` can be tracked back to a commit; while this may be reasonably expected for most software deployed in production, it's [not guaranteed](https://github.com/canonical/microceph/blob/84b63149e55b801f77ef1237f9af91c97b5e5ebc/snap/snapcraft.yaml#L283). Since the source commit hash for the part is (presumably) known by snapcraft at build time, it should be inserted into the manifest. Additionally, that commit hash should be included in the build log. ### Why it needs to get done For snap build `part`s with `source-type: git` that don't specify a revision, the `manifest.yaml` included in the snap artifact does not include the git revision that was checked out as part of the build. As a snap user/administrator/support engineer, I need the ability to find the exact revision of source code that's included in a deployed snap. For example, MicroCeph's `manifest.yaml` does not include a git revision for the dqlite and raft shared libraries ([`snapcraft.yaml`](https://github.com/canonical/microceph/blob/84b63149e55b801f77ef1237f9af91c97b5e5ebc/snap/snapcraft.yaml#L283)). It is currently impossible to know based on the snap revision which version of dqlite is being used in customer environments. We are engaging with MicroCeph separately to improve that specific case.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 45
Quick Win: 13.5
Staleness: 70
Complexity: 70
Confidence: 85
Support Request: 5
keep open Request to record git commit hashes of source-type: git parts in manifest.yaml and build logs. Triaged and acknowledged by a maintainer with a proposed 3-repo implementation plan; feature not yet implemented.
qwen/qwen3.6-35b-a3b
Staleness: 80
Complexity: 60
Confidence: 90
Support Request: 10
keep open Enhancement to automatically include git commit hashes in manifest.yaml for git-sourced parts. Triaged and acknowledged by a maintainer with a proposed multi-repo implementation approach. Currently awaiting development.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 65
Confidence: 85
Support Request: 10
keep open Enhancement request to automatically include git commit hashes in manifest.yaml for git-sourced parts when only tags or branches are specified. Currently triaged with maintainer buy-in.
qwen3.6-35b-a3b-mtp-q6
Staleness: 65
Complexity: 60
Confidence: 85
Support Request: 10
keep open Auto-include git commit hashes for git-sourced parts in manifest.yaml and build logs. Triaged enhancement. Maintainer approved but implementation requires architectural updates to snapcraft and craft-parts. Waiting for assignment.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.