← Back to issue list

test(different-dir-metadata): use pack --project-dir instead of pull

View original Github issue

Metadata

Project
charmcraft
Number
#2694
Type
pull request
State
merged
Author
Copilot
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #2694 (commit dd684338) fixed the failing different-dir-metadata spread test by switching `charmcraft pull` to `charmcraft pack --verbose --project-dir=charm`, plus output and restore checks.

Resolution: closed resolved

Reason: Merged into main as commit dd684338 after @lengau pointed out the initial `pull` approach defeated the test's purpose; the final version uses `charmcraft pack --verbose --project-dir=charm`, asserts the charm file exists, and cleans up in restore. Verified in tests/spread/smoketests/different-dir-metadata/task.yaml.

Evaluated by: mr-cal-bot

No scores available.

Issue body

`charmcraft pull` doesn't accept `--project-dir`, causing the `different-dir-metadata` spread test to fail with `unrecognized arguments: --project-dir=charm`. ## Change Replace `charmcraft pull --verbose --project-dir=charm` with `charmcraft pack --verbose --project-dir=charm`, which correctly supports the `--project-dir` flag and preserves the test's purpose of verifying that a charm with separate metadata files can be packed from a different directory. ```diff - charmcraft pull --verbose --project-dir=charm + charmcraft pack --verbose --project-dir=charm + test -f tester-grpc*.charm ``` A `restore` step is also added to clean up the produced charm file after the test runs.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #2694 (commit dd684338) fixed the failing different-dir-metadata spread test by switching `charmcraft pull` to `charmcraft pack --verbose --project-dir=charm`, plus output and restore checks.
stealth/space-bunny-alpha — closed resolved Merged PR #2694 (commit dd684338) fixed the spread test to use charmcraft pack --project-dir=charm, verify the output, and clean it up.
qwen/qwen3.6-35b-a3b — — Merged PR resolves a failing spread test by replacing charmcraft pull with pack --project-dir. Validates packing charms with separate metadata from a different directory, adds output verification and cleanup. Approved by three reviewers.
qwen3.6-35b-a3b-mtp-q6 — — Merged after replacing charmcraft pull with pack --project-dir to resolve a test failure. The change preserves the test's validation of separate metadata files, adds a post-test cleanup step, and addresses reviewer feedback.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2672 fix: use `charmcraft pack` instead of `charmcraft pull` in different-dir-metadata spread test charmcraft closed Closed unmerged: the charmcraft pull -> pack fix for the different-dir-metadata spread test was superseded by PR #2694, merged as commit dd684338 using `charmcraft pack --verbose --project-dir=charm` plus output/restore checks.
89%
#2493 Packing fails when using a separate metadata.yaml file and `--project-dir` argument charmcraft closed Fixed by PR #2644 (c87eca0d), which loads separate metadata.yaml from the correct project directory. The fix was slated for Charmcraft 4.2.1.
71%
#2785 test(spread): fix different-dir task assertions charmcraft open Maintainer PR (2 files, +6/-5) updating spread different-dir / different-dir-metadata assertions to match where artifacts land with --project-dir, plus restore cleanup. Fixes tests failing on main; CI green, 2 checks pending, 1 review comment unresolved, idle 80 days.
71%
#2804 Fix spread different-dir artifact output handling charmcraft open Maintainer fix for pack artifact relocation: resolves --project-dir/output to absolute paths pre-pack, keeps state-based move and adds a .charm glob fallback; +124/-3 with unit tests. Fast tests pass, 6 CI jobs pending, 73d idle.
70%
#2498 fix: `charmcraft pack --project-dir` with metadata.yaml charmcraft closed Closed unmerged; superseded by #2644, which fixed metadata lookup for --project-dir and shipped in Charmcraft 4.2.1.
70%