Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[ci-maintainer] Import reference architectures fails daily: record.assets keeps stale .svg entries after raster-SVG→PNG conversion

Đã đóng
#331 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript
Lĩnh vực
ci-cd, tooling

Hướng nghiên cứu

Start in scripts/import-architectures.mjs at importArchitecture() and sanitizeArchitectureAssets(), then inspect scripts/validate-architectures.mjs and run npm run validate:architectures. Done means the architecture record and rewritten markdown match the files under static/img/architectures// after conversion, with validation passing and no stale SVG references.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

agent/ci-maintainer ci hive/hosted-available-lke648397-260827-5n31

CI Issue

Import reference architectures has failed every scheduled run since 2026-09-15 (runs 34921842204, 35048610804, 35175044427, 35300028894, 35416042974). The failure is deterministic, not upstream flakiness.

Evidence

Run 35416042974 (2026-09-19), step npm run validate:architectures:

2 error(s) in architecture catalog:
  [error] swisscom-cloud-native-telco: missing asset /img/architectures/swisscom-cloud-native-telco/swisscom-cloud-native-telco-automation-architecture-overview.svg
  [error] zeiss: missing asset /img/architectures/zeiss/solutionArchitecture.svg

The preceding import step logged successful conversions:

Converted raster-embedded SVG to PNG: img/architectures/swisscom-cloud-native-telco/swisscom-cloud-native-telco-automation-architecture-overview.png
Converted raster-embedded SVG to PNG: img/architectures/zeiss/solutionArchitecture.png

Root cause

In scripts/import-architectures.mjs, importArchitecture():

  1. The image-copy loop pushes each copied file into record.assets — including .svg paths (line ~100).
  2. sanitizeArchitectureAssets() then converts raster-embedded SVGs to PNG with rsvg-convert and deletes the .svg (line ~256-261).
  3. Nothing updates record.assets or the markdown body afterward, so the catalog record still lists the deleted .svg and the rewritten doc still references /img/architectures/<id>/<name>.svg, which does not exist.

scripts/validate-architectures.mjs (line 17) then fails the run on the missing .svg assets. The workflow exits before it can open its update PR, so the daily import is fully blocked. (The same stale-reference bug also breaks the image in the rendered doc, though validation fails first.)

Recommendation

In importArchitecture(), after sanitizeArchitectureAssets():

  • Rebuild record.assets from the on-disk contents of static/img/architectures/<id>/ instead of trusting the copy-time list, so converted (or rejected) files are reflected accurately.
  • Detect svg→png conversions (svg gone, same-basename .png present) and rewrite /img/architectures/<id>/<name>.svg references to .png in the cleaned markdown body before writing docs/architectures/<id>.md.

This is a scripts-only fix — no workflow changes required.


Filed by ci-maintainer agent (ACMM L4/L5 — hold-gated mode)

🐝 Hive Agent: ci-maintainer | Instance: hosted-available-lke648397-260827-5n31 | SHA: unknown

— hive: agent=ci-maintainer backend=copilot model=kimi-k3

Ngôn ngữ chính
JavaScript
Star
0
Fork
2
Merge trung bình
10 giờ 13 phút
Pull request đã merge (30 ngày)
597

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cncf/endusers

Tất cả issue của cncf/endusers

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.