Skip to content

BUG: OBS go_modules service fails due to missing go.sum entries #115

@mantarimay

Description

@mantarimay

Building the project in Open Build Service (OBS) using obs-service-go_modules fails because the released source archive contains an incomplete go.sum file.
As a result, go mod vendor fails, and the OBS service crashes with a misleading Python AttributeError, which hides the real Go error.


To Reproduce

Steps to reproduce the behavior:

  1. Use the matcha-0.13.4 source archive
  2. Build it in openSUSE Open Build Service (OBS)
  3. Enable the obs-service-go_modules source service
  4. OBS automatically runs:
    go mod download
    go mod vendor
  5. The build fails with multiple missing go.sum entries, and finally ends with a Python traceback

Expected behavior

  • The project should build successfully with go mod vendor using a complete go.sum, or

  • The failure should be reported clearly without crashing the OBS service

Actual behavior

  • go mod vendor fails with multiple errors such as:
missing go.sum entry for module providing package github.com/charmbracelet/bubbletea
  • After that, OBS crashes with:
AttributeError: 'NoneType' object has no attribute 'strip'

This makes debugging harder because the real cause of the failure is masked.

Logs

go: github.com/floatpane/matcha imports
github.com/charmbracelet/bubbletea: missing go.sum entry for module providing package github.com/charmbracelet/bubbletea
...
Traceback (most recent call last):
  File "/usr/lib/obs/service//go_modules", line 423, in main
  File "/usr/lib/obs/service//go_modules", line 369, in main
    cp = cmd_go_mod(["vendor"], go_mod_dir)
  File "/usr/lib/obs/service//go_modules", line 212, in cmd_go_mod
    log.error(cp.stderr.strip())
AttributeError: 'NoneType' object has no attribute 'strip'

Environment (please complete the following information):

  • OS: openSUSE (Open Build Service)
  • Go Version: OBS default (1.21 at time of build)

Additional context

  • The root cause appears to be an incomplete go.sum in the matcha-0.13.4 release.

  • Running go mod tidy locally resolves the issue.

  • The Python traceback comes from obs-service-go_modules trying to call .strip() on a None stderr, which hides the real Go error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions