Tencent/WeKnora · error

snapshot delete is unavailable

Error message

snapshot delete is unavailable

What it means

Sentinel guard in deleteProviderSnapshot: the sandboxSnapshotReleaser dependency is nil, so there is no client able to delete the provider-side snapshot. This is a wiring/initialization defect, not a data problem — no delete request is even attempted.

Source

Thrown at internal/application/service/tenant_sandbox_config.go:1273

func entityID(entity *types.TenantSandboxConfigEntity) string {
	if entity == nil {
		return ""
	}
	return entity.ID
}

func deleteProviderSnapshot(
	ctx context.Context, releaser sandboxSnapshotReleaser, row *types.TenantSkillSnapshotEntity,
) error {
	if row == nil {
		return nil
	}
	snapshotID := strings.TrimSpace(row.SnapshotID)
	if snapshotID == "" {
		return nil
	}
	if releaser == nil {
		return fmt.Errorf("snapshot delete is unavailable")
	}
	err := releaser.DeleteSnapshot(ctx, snapshotID)
	if err == nil || sandbox.IsRemoteNotFound(err) {
		return nil
	}
	return err
}

func (s *TenantSandboxConfigService) cleanupSkillMetadata(
	ctx context.Context, tenantID uint64, configID string,
) {
	skills, err := s.skills.ListSkillsByConfig(ctx, tenantID, configID)
	if err != nil {
		logger.Warnf(ctx, "[sandbox] list skills for config %s cleanup failed: %v", configID, err)
	}
	var pinned []string
	seen := map[string]struct{}{}
	for _, skill := range skills {

View on GitHub (pinned to 988cbb0330)

Solutions

  1. Ensure the sandbox snapshot releaser is injected when the service is constructed
  2. Skip provider snapshot deletion gracefully when the releaser is intentionally absent
  3. Check service wiring/dependency initialization for the tenant sandbox config service
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at internal/application/service/tenant_sandbox_config.go:1273 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02). Data as JSON: /api/errors/17ee47b0a2b0a0c5. Report an issue: GitHub.