← Back to issue list

fix(remote): deduplicate artifact names in remote-build success message

View original Github issue

Metadata

Project
craft-application
Number
#1094
Type
pull request
State
open
Author
kirtisingh05
Labels
—
Created
Updated
Closed
—

Current evaluation

One-line dedup of artifact filenames in the remote-build success message (sorted set over path names), plus a regression test and changelog entry. Fixes #1093. Lint check fails, 2 review comments unresolved; author says it masks the root cause and is reworking a build-request-ID filter.

Suggested action: keep open

Reason: The author explicitly conceded in the latest comment (2026-06-25) that 'this is masking the root cause rather than fixing it' — get_builds() returns all historical builds for the recipe, not just the current invocation — and states they are 'working on filtering by build request ID... Will update the PR once I've traced the right fix with @mr-cal's input on the Launchpad API.' Combined with the failing `lint / files` check and 2 unresolved review comments, the current set-comprehension workaround (sorted({path.name for path in artifacts}) in craft_application/commands/remote.py) is not landable as-is; keeping it open matches the declared in-progress work rather than closing it as stale (last activity only 33 days ago).

Evaluated by: mr-cal-bot

Impact: 22 Quick Win: 4 Complexity: 10 Confidence: 88 Actionability: 20

Issue body

- [x] Have you followed the guidelines for contributing? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `make lint && make test`? - [x] Have you added an entry to the changelog (`docs/reference/changelog.rst`)? --- ## Summary When `remote-build` is run multiple times, Launchpad returns historical builds with different URLs but the same output filenames. Since `artifact_downloads` keys on URL, duplicates slip through into `.values()`, causing the success message to list the same snap multiple times. ## Fix Deduplicate artifact names using a set comprehension before sorting: artifact_names = sorted({path.name for path in artifacts}) ## Test Added a regression test that mocks `fetch_artifacts` to return duplicate filenames and asserts each artifact appears only once in the success message. Fixes #1093 Related: canonical/snapcraft#6230

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 22
Quick Win: 4
Complexity: 10
Confidence: 88
Actionability: 20
keep open One-line dedup of artifact filenames in the remote-build success message (sorted set over path names), plus a regression test and changelog entry. Fixes #1093. Lint check fails, 2 review comments unresolved; author says it masks the root cause and is reworking a build-request-ID filter.
stealth/space-bunny-alpha
Impact: 35
Quick Win: 7
Complexity: 20
Confidence: 96
Actionability: 25
keep open Deduplicates artifact names in remote-build success messages with a regression test and changelog entry. Tests pass, but lint fails; the author acknowledged masking the root cause and is pursuing build-request filtering.
qwen3.6-35b-a3b-mtp-q6
Impact: 35
Quick Win: 19
Staleness: 45
Complexity: 45
Confidence: 75
keep open Fixes duplicate artifact names in remote-build success message by deduplicating via set comprehension. Author acknowledges current approach masks root cause and is working on filtering by build request ID instead.
qwen/qwen3.6-35b-a3b
Staleness: 45
Complexity: 20
Confidence: 85
keep open Deduplicates artifact names in remote-build success message. Currently a temporary workaround; author is implementing a proper fix by filtering historical builds via request ID and will update the PR shortly.
qwen3.6-35b-a3b-mtp-q6
Staleness: 15
Complexity: 30
Confidence: 85
keep open Deduplicates artifact names in remote-build success message using a set comprehension. Author acknowledges this masks the root cause and is implementing a proper fix filtering by build request ID. Currently under active development.

Update history

Date Change
updated

Related work

  • Related To: canonical/craft-application#1093 (confidence 95%)

    The tracking issue this PR claims to fix; still open with 'root cause remains under review', and issue notes characterize PR #1094 as a workaround rather than a complete fix.

  • Related To: canonical/snapcraft#6230 (confidence 90%)

    Explicitly cited in the PR body as related; closed as a duplicate of craft-application#1093, which is where the duplicate-artifact display logic lives.

Related issues

Issue Project State Summary Similarity
#1093 remote-build success message lists duplicate artifact names craft-application open remote-build success message repeats artifact filenames because artifact URLs from all prior Launchpad builds are collected; still unfixed at HEAD, with open PR #1094 as a dedup workaround and mr-cal researching build-id filtering.
78%
#5715 test: update remote-build artifact name snapcraft merged Merged in commit 9d29d0a2b: updated the remote-build spread test's expected artifact filename to correct an overlooked test mismatch.
72%