Skip to content

fix: has_published_binaries logic and no-binaries copy error#124

Closed
rtibbles wants to merge 1 commit into
mainfrom
fix/copy-no-binaries-handling
Closed

fix: has_published_binaries logic and no-binaries copy error#124
rtibbles wants to merge 1 commit into
mainfrom
fix/copy-no-binaries-handling

Conversation

@rtibbles

@rtibbles rtibbles commented Apr 1, 2026

Copy link
Copy Markdown
Member

Summary

Two fixes for the copy_to_other_distributions failure:

  • has_published_binaries: not builds returned True when no builds were found via API, treating "no builds" as "has binaries" and queuing the copy regardless. Fixed to require builds to exist AND be successful.
  • perform_queued_copies: Handle Launchpad's "has no binaries to be copied" error gracefully as a warning instead of crashing.

References

  • Fixes: lazr.restfulclient.errors.BadRequest: kolibri-server 0.5.1-0ubuntu1 in noble (source has no binaries to be copied)

Reviewer guidance

The has_published_binaries fix is the primary change — prevents copies from being queued when the API doesn't return build info. The error handler is defense-in-depth.

AI usage

Claude Code identified the inverted boolean logic and the unhandled Launchpad error from CI logs.

- has_published_binaries: 'not builds' returned True when no builds
  existed, incorrectly treating "no builds" as "has binaries". Fix to
  require builds to exist AND be successful.
- perform_queued_copies: handle "has no binaries to be copied" error
  from Launchpad gracefully instead of crashing. This is a race
  condition safety net for when binaries aren't yet published after
  a successful build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant