fix bug creating layer records on non-tagged pushes

This commit is contained in:
Evan Jarrett
2026-01-05 12:08:04 -06:00
parent 487fc8a47e
commit a448e8257b
3 changed files with 630 additions and 3 deletions
+3 -1
View File
@@ -224,7 +224,9 @@ func (s *ManifestStore) Put(ctx context.Context, manifest distribution.Manifest,
// Notify hold about manifest push (for layer tracking, Bluesky posts, and stats)
// Do this asynchronously to avoid blocking the push
if tag != "" && s.ctx.ServiceToken != "" && s.ctx.Handle != "" {
// Note: We notify even for tagless pushes (e.g., buildx platform manifests) to create layer records
// Bluesky posts are only created for tagged pushes (handled by hold service)
if s.ctx.ServiceToken != "" && s.ctx.Handle != "" {
go func() {
defer func() {
if r := recover(); r != nil {
+3 -2
View File
@@ -350,8 +350,9 @@ func (h *XRPCHandler) HandleNotifyManifest(w http.ResponseWriter, r *http.Reques
}
}
// Create Bluesky post if enabled
if postsEnabled {
// Create Bluesky post if enabled and tag is present
// Skip posts for tagless pushes (e.g., buildx platform manifests pushed by digest)
if postsEnabled && req.Tag != "" {
// Resolve handle from DID (cached, 24-hour TTL)
_, userHandle, _, resolveErr := atproto.ResolveIdentity(ctx, req.UserDID)
if resolveErr != nil {