← Back to issue list

Store library update: spread test not working

View original Github issue

Metadata

Project
charmcraft
Number
#1209
Type
issue
State
closed
Author
lengau
Labels
—
Created
Updated
Closed

Current evaluation

Store publish-lib spread test failed because the API JSON had a different structure than jq expected. Fixed by merged PR #1213 ("tests: fix API json structure", commit e18eab3a), which corrected the test's JSON assertions.

Resolution: closed resolved

Reason: Maintainer @sergiusens closed the issue with the comment "Fixed by #1213", and PR canonical/charmcraft#1213 ("tests: fix API json structure") was merged at commit e18eab3a, updating the spread test to match the actual publish-lib JSON output.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description The JSON structure being returned isn't what we expect from jq. https://github.com/canonical/charmcraft/actions/runs/5833026341/job/15823820781?pr=1207 ### To Reproduce Run the store tests in CI ### Environment CI ### charmcraft.yaml ```shell N/A ``` ### Relevant log output ```shell + cd charm + charmcraft create-lib lib_1e5a75daa5dd4663969fcb85d65ec990 Creating library lib_1e5a75daa5dd4663969fcb85d65ec990. Library charms.gh_ci_charmcraft_charm.v0.lib_1e5a75daa5dd4663969fcb85d65ec990 created with id 153d73cadfbf42f9aeab1828ea57b423. Consider 'git add lib/charms/gh_ci_charmcraft_charm/v0/lib_1e5a75daa5dd4663969fcb85d65ec990.py'. + test -f lib/charms/gh_ci_charmcraft_charm/v0/lib_1e5a75daa5dd4663969fcb85d65ec990.py ++ charmcraft publish-lib charms.gh_ci_charmcraft_charm.v0.lib_1e5a75daa5dd4663969fcb85d65ec990 --format=json + publish_result='[ { "charm_name": "gh-ci-charmcraft-charm", "library_name": "lib_1e5a75daa5dd4663969fcb85d65ec990", "library_id": "153d73cadfbf42f9aeab1828ea57b423", "api": 0, "published": { "patch": 1, "content_hash": "e14df9311c8735062ba406e6f7a6b844eae4c4f75a1d6476cdc09ec6086d4210" } } ]' ++ jq '.[0].published.api' ++ echo '[' '{' '"charm_name":' '"gh-ci-charmcraft-charm",' '"library_name":' '"lib_1e5a75daa5dd4663969fcb85d65ec990",' '"library_id":' '"153d73cadfbf42f9aeab1828ea57b423",' '"api":' 0, '"published":' '{' '"patch":' 1, '"content_hash":' '"e14df9311c8735062ba406e6f7a6b844eae4c4f75a1d6476cdc09ec6086d4210"' '}' '}' ']' + published_api=null ++ jq '.[0].published.patch' ++ echo '[' '{' '"charm_name":' '"gh-ci-charmcraft-charm",' '"library_name":' '"lib_1e5a75daa5dd4663969fcb85d65ec990",' '"library_id":' '"153d73cadfbf42f9aeab1828ea57b423",' '"api":' 0, '"published":' '{' '"patch":' 1, '"content_hash":' '"e14df9311c8735062ba406e6f7a6b844eae4c4f75a1d6476cdc09ec6086d4210"' '}' '}' ']' + published_patch=1 + test null = 0 ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Store publish-lib spread test failed because the API JSON had a different structure than jq expected. Fixed by merged PR #1213 ("tests: fix API json structure", commit e18eab3a), which corrected the test's JSON assertions.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #1213 (commit e18eab3a), which corrected the API JSON structure expected by the store publish-lib spread test.
qwen3.6-35b-a3b-mtp-q6 — — CI spread test failed due to unexpected JSON output from charmcraft publish-lib breaking jq parsing. Resolved and closed after the fix was merged in pull request #1213.
qwen/qwen3.6-35b-a3b — — Fixed and merged via PR #1213. The CI spread test failure caused by unexpected JSON structure from charmcraft publish-lib was resolved by correcting the library response format.
qwen/qwen3.6-35b-a3b — — CI spread tests failed due to unexpected JSON output from charmcraft publish-lib breaking jq parsing. The bug was resolved and closed after being fixed by pull request #1213.
qwen3.6-35b-a3b-mtp-q6 — — CI spread test failure from incorrect jq parsing of charmcraft publish-lib JSON output was resolved. Closed after being fixed in pull request #1213.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/charmcraft#1213 (confidence 95%)

    Merged PR titled 'tests: fix API json structure' (commit e18eab3a); cited by the closing maintainer comment on #1209.

Related issues

Issue Project State Summary Similarity
#1213 tests: fix API json structure charmcraft merged Merged PR #1213 (commit e18eab3a), correcting the test API JSON structure so the publish-lib spread test works and closes #1209.
77%
#1429 spread: charm upload and release store test is flaky when the store is busy charmcraft closed Fixed in merged PR #1460 (commit fd5bd6ba), which reduced timing sensitivity in store upload and release Spread tests.
71%