fix(fetch): 修复钉钉来源身份与取件失败监控
build / build (push) Successful in 1m17s

This commit is contained in:
姚章浩
2026-10-27 14:36:24 +08:00
parent 1b09f7d35b
commit 74aef1e373
8 changed files with 211 additions and 9 deletions
@@ -22,12 +22,13 @@ func loadArtifactFetchManifest(ctx context.Context, db interface {
var manifest artifactfetch.Manifest
var fetchState string
err := db.QueryRow(ctx, `SELECT connection.source_type,connection.name,intent.relative_path,intent.name,
intent.size_bytes,intent.modified_at,intent.locator_hash,intent.fetch_state
intent.size_bytes,intent.modified_at,intent.locator_hash,intent.fetch_state,
CASE WHEN connection.source_type='dingtalk' THEN connection.base_url ELSE '' END
FROM catalog_import_intents intent
JOIN source_connections connection ON connection.id=intent.source_connection_id
WHERE intent.source_connection_id=$1 AND intent.node_id=$2`, connectionID, nodeID).
Scan(&manifest.SourceType, &manifest.SourceName, &manifest.RelativePath, &manifest.Name,
&manifest.SizeBytes, &manifest.ModifiedAt, &manifest.LocatorHash, &fetchState)
&manifest.SizeBytes, &manifest.ModifiedAt, &manifest.LocatorHash, &fetchState, &manifest.SourceRoot)
if errors.Is(err, pgx.ErrNoRows) {
return artifactfetch.Manifest{}, artifactfetch.ErrManifestGone
}