Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • S swh-loader-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 32
    • Issues 32
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Platform
  • Development
  • swh-loader-core
  • Issues
  • #4740
Closed
Open
Issue created Jan 02, 2023 by Sentry Integration@swh-sentry-integrationMaintainer

golang: /@latest sometimes returns an empty body

with a 200 status code, instead of a 404 error; which makes get_default_version crash with:

https://sentry.softwareheritage.org/organizations/swh/issues/105676/?referrer=phabricator_plugin

JSONDecodeError: Expecting value: line 1 column 1 (char 0)
(2 additional frame(s) were not displayed)
...
  File "swh/loader/package/utils.py", line 209, in newf
    value = f(self)
  File "swh/loader/package/golang/loader.py", line 73, in get_default_version
    return json.loads(latest)["Version"]
  File "__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None

Failed to get list of versions for https://pkg.go.dev/gitee.com/lyt_sichuan/pulsar-client-go.git

We should report this to pkg.go.dev, and maybe add a workaround on our side (if latest == "": raise NotFound(...))


Migrated from T4740 (view on Phabricator)

Assignee
Assign to
Time tracking