Fix CI D1 migration timing issues for Email and OTP Login E2E tests
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 22/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- github-actions, sql, typescript
Hướng nghiên cứu
Start with the CI workflow that creates the D1 database, runs 020_add_email_plugin.sql and 026_add_otp_login.sql, and deploys the preview, then compare it with the plugin-card lookup the tests depend on. Next, look at tests/e2e/29-email-plugin-settings.spec.ts and tests/e2e/44-otp-login-admin.spec.ts for the test.describe.skip markers. Done means the root cause is recorded, both suites run without the skip, and they pass across repeated CI runs.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Two E2E test suites are currently skipped due to D1 migration timing/propagation issues in CI:
tests/e2e/29-email-plugin-settings.spec.tstests/e2e/44-otp-login-admin.spec.ts
These tests pass locally but fail in CI even after migrations execute successfully.
Background
These tests were skipped in PR #581 to unblock the merge of the component-based plugin settings architecture feature. The tests verify:
-
Email Plugin Settings (
29-email-plugin-settings.spec.ts)- Navigation to email plugin settings from plugins page
- Display of email settings form with all fields (API key, from email, from name, etc.)
- Save settings functionality
- Required field validation
- Test email section display
-
OTP Login Admin (
44-otp-login-admin.spec.ts)- OTP Login plugin settings page loading
- Test email form display
- Email preview section display
- Code settings form display
- Quick links to related settings
- Email configuration status
- Features list display
- Save settings button
- Send test code functionality
Root Cause Investigation
The CI workflow:
- Creates a fresh D1 database for each PR
- Runs migrations (020_add_email_plugin.sql, 026_add_otp_login.sql)
- Deploys to Cloudflare Workers preview
- Runs E2E tests
Migrations execute successfully (confirmed by ✅ markers in CI logs), but the Email plugin card is not visible when tests run. This suggests a timing/propagation delay between:
- D1 migration completion
- Data being available to the Worker
Potential Solutions to Investigate
- Add delay after migrations - Wait for D1 propagation before running tests
- Verify data availability - Add a health check endpoint that confirms plugin data exists
- D1 eventual consistency - Research if D1 has eventual consistency behavior and workarounds
- Worker restart - Check if Worker needs restart/redeploy after migrations
- Database binding timing - Investigate if database bindings need time to propagate
Acceptance Criteria
- Identify root cause of D1 propagation delay
- Implement fix in CI workflow or application code
- Re-enable skipped tests by removing
test.describe.skip - Verify tests pass consistently in CI (run multiple times)
Related
- PR #581 - Original PR where tests were skipped
- Migrations:
020_add_email_plugin.sql,026_add_otp_login.sql
🤖 Generated with Claude Code
- Ngôn ngữ chính
- TypeScript
- Star
- 1.8k
- Fork
- 219
- Merge trung bình
- 2 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 67
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của SonicJs-Org/sonicjs
-
bug(admin/users): server error returns bare alert HTML causing black-shape visual artifactCó thể đã có người làm @lane711 đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
SonicJs-Org/sonicjs#1211 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: api bug priority: P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
SonicJs-Org/sonicjs#1200 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ResendProvider cannot send on Workers: unbound `fetch` stored as an instance property throws "Illegal invocation"Có thể đã có người làm @lane711 đã nhận 23 ngày trước. Đang mởarea: email bug priority: P1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SonicJs-Org/sonicjs#1099 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Email plugin settings are never read: loadDbEmailSettings queries a v2 `plugins` table that does not exist in v3Có thể đã có người làm @lane711 đã nhận 23 ngày trước. Đang mởarea: email bug priority: P1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
SonicJs-Org/sonicjs#1098 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: documentation bug documentation priority: P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SonicJs-Org/sonicjs#1012 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của SonicJs-Org/sonicjs
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
liberation-data/drivine#826 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
【优化】“打开文件列表”,建议对当前文件进行高对比度标注Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
zhitongblog/solomd#623 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
aufwand: klein documentation Einsteiger-Familie freigegeben Haushalts-Admin
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
openwallet-foundation/eudiplo#1600 ·
-
docs(website): add a GitLab CI/CD button next to the GitHub Action button on the homepageCó thể đã có người làm @shryssssss-maker đã nhận hôm nay. Đang mởdocumentation enhancement first-timers-only good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
OWASP/cve-lite-cli#1739 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày