← Back to issue list

The parser shouldn't fail on an origin error

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1624019
Type
issue
State
closed
Author
~joetalbott
Labels
—
Created
Updated
Closed

Current evaluation

Origin fetch errors no longer crash the parser, fixing Launchpad #1624019 via canonical/snapcraft#1045 (commit 66ddbf12e).

Resolution: closed resolved

Reason: Canonical snapcraft PR #1045 was merged as commit 66ddbf12e, adding handling for parser and network errors so failed origin fetches are reported instead of terminating the parser.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Thu Sep 15 15:00:07 UTC 2016 2.16 10.55.32.140 From https://github.com/dplanella/qt5conf * branch HEAD -> FETCH_HEAD From https://github.com/kyrofa/qt4conf * branch HEAD -> FETCH_HEAD From https://github.com/dplanella/gtkconf * branch HEAD -> FETCH_HEAD From https://github.com/sergiusens/curl * branch HEAD -> FETCH_HEAD From https://github.com/sergiusens/mqtt-paho * branch HEAD -> FETCH_HEAD From https://github.com/sergiusens/mqtt-paho * branch HEAD -> FETCH_HEAD From https://github.com/Winael/ffmpeg * branch HEAD -> FETCH_HEAD From https://github.com/ubuntu/snapcraft-desktop-helpers * branch HEAD -> FETCH_HEAD fatal: unable to access 'https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/tpm/': The requested URL returned error: 503 Traceback (most recent call last): File "/usr/bin/snapcraft-parser", line 29, in <module> wiki_errors = snapcraft.internal.parser.main() File "/usr/lib/python3/dist-packages/snapcraft/internal/parser.py", line 88, in main return run(args) File "/usr/lib/python3/dist-packages/snapcraft/internal/parser.py", line 286, in run data = _process_index(output) File "/usr/lib/python3/dist-packages/snapcraft/internal/parser.py", line 252, in _process_index _process_wiki_entry(entry, master_parts_list) File "/usr/lib/python3/dist-packages/snapcraft/internal/parser.py", line 230, in _process_wiki_entry parts_list, after_parts = _process_entry(data) File "/usr/lib/python3/dist-packages/snapcraft/internal/parser.py", line 193, in _process_entry sources.get(origin_dir, None, options) File "/usr/lib/python3/dist-packages/snapcraft/internal/sources.py", line 393, in get handler.pull() File "/usr/lib/python3/dist-packages/snapcraft/internal/sources.py", line 176, in pull refspec]) File "/usr/lib/python3.5/subprocess.py", line 581, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['git', '-C', '/tmp/httpsgit.launchpad.netsnappy-hwe-teamsnappy-hwe-snapsgittpm', 'pull', '--recurse-submodules=yes', 'https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/tpm', 'HEAD']' returned non-zero exit status 1 part-count 31 1473951704.285711

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Origin fetch errors no longer crash the parser, fixing Launchpad #1624019 via canonical/snapcraft#1045 (commit 66ddbf12e).
stealth/space-bunny-alpha — closed resolved Fixed by canonical/snapcraft#1045 (commit 66ddbf12e), which handled parser and network errors instead of crashing when an origin fetch failed.
stealth/space-bunny-alpha — closed resolved Git pull failures were handled in snapcraft#2292 (commit 1bb56d427), preventing an uncaught CalledProcessError from aborting the parser.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The parser crashes on git origin or network errors instead of handling them gracefully. No fix was implemented, and the report was abandoned after years of inactivity.
qwen/qwen3.6-35b-a3b — — Abandoned. The parser crashed on a git origin 503 error, but no fix was implemented or discussed.
qwen/qwen3.6-35b-a3b — — Closed due to inactivity. The reported parser crash on git origin errors was abandoned without resolution or code changes.
qwen3.6-35b-a3b-mtp-q6 — — Abandoned. Closed without resolution or discussion. The parser continues to crash on git origin errors instead of handling them gracefully.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/snapcraft#1045 (confidence 99%)

    Merged commit 66ddbf12e implemented graceful handling of origin and network failures.

Related issues

Issue Project State Summary Similarity
#1665007 The parser needs to support origins with snap/snapcraft.yaml snapcraft (launchpad) closed Parser now finds the origin's snapcraft.yaml via the project loader, adding snap/snapcraft.yaml support. Fixed upstream by merged PR snapcore/snapcraft#1141 (commit ef34c2d3d), which closed LP bug #1665007.
75%
#745 Actually return a non-zero error code on errors. snapcraft merged Merged as commit b90d53d39, making snapcraft-parser exit with status 1 on errors; status 2 for origin errors was deferred.
73%