bregctl test: a journey cannot wait for automatic application after submit

Đang mở
#2,721 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
postgresql, rust

Hướng nghiên cứu

Start with crates/registry-breg/src/fixtures/proposals.rs for supported journey operations and assertion fields, then read the schema-test runtime in crates/registry-breg/src/fixtures.rs and the journey guide at docs/site/src/content/docs/configure/breg-journeys.mdx. First determine whether the rehearsal starts an application worker; the issue notes this is unconfirmed. Done means a bounded journey wait can observe applicationStatus: applied, read the changed record, report a named timeout diagnostic, and is documented with a runnable product example.

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

Mô tả

Problem

An Action whose Proposal has no review and automatic application is applied by the built-in executor after Submit. A journey in tests/journeys.yaml has no way to wait for that application, so it cannot assert what the Action applied. A get step after Submit races the executor, and the journey format has no polling or wait step.

Evidence

All line numbers are on origin/main at 36d25ef652.

  • crates/registry-breg/src/fixtures/proposals.rs:10 to :22: the journey Proposal operations are Start, Get, Edit, Submit, Revise, Rebase, Retry, Cancel, Apply, GetReviewContext and GetReviewStatus. There is no wait, poll or "until" operation.
  • crates/registry-breg/src/fixtures/proposals.rs:187: Proposal steps may assert only state, submissionVersion, effectDigest and applicationStatus. Any other field is refused as JourneyShapeRefused.
  • rg -i "poll|sleep|wait|eventually|until" over crates/registry-breg/src/fixtures.rs, crates/registry-breg/src/fixtures/ and docs/site/src/content/docs/configure/breg-journeys.mdx finds no wait semantics.
  • crates/registry-breg/src/fixtures.rs:3837 to :3840: the schema-test runtime says no review worker runs in the rehearsal. I found no application worker started there either, but I did not run a journey to confirm that a Submit leaves applicationStatus queued.
  • docs/site/src/content/docs/configure/breg-proposals.mdx:402: automatic application is performed by the built-in executor after approval.
  • docs/site/src/content/docs/configure/breg-journeys.mdx:122 to :126: the page describes the bregctl test run and does not mention automatic application.

Proposed change

Pick the simplest of these and record the choice:

  1. Run the application executor in the schema-test runtime and add a bounded wait expectation on a Get step (for example expect: {applicationStatus: applied} with a step timeout), so the journey can then get the changed record.
  2. Or apply synchronously inside the rehearsal for automatic Actions, so the response to Submit already carries applicationStatus: applied.

Option 2 is smaller but tests a different path from production. Option 1 keeps the production path.

Acceptance

  • A journey can start and submit a review-free Proposal, then assert applicationStatus: applied and read the changed record.
  • The wait is bounded and fails with a named diagnostic on timeout.
  • The journeys page documents the behaviour with a runnable example, and the example journey for such an Action is added to a product example.

Not included

The second half of the original request, that a failed schema test leaves no receipt and the single-use test database costs a fresh database per retry, is not drafted. The code does say "recreate the disposable database before retrying" for execution and database errors (crates/registry-bregctl/src/lib.rs:6858, :6882, :6896), and bregctl dev rebuilds the database on each run (crates/registry-bregctl/src/dev/mod.rs:2869). I could not confirm that a rerun on a used database is refused, because the candidate checks (crates/registry-breg/src/fixtures.rs:5722 to :5742) compare the registry state, not prior journey data. It needs a real run against PostgreSQL.

Ngôn ngữ chính
Rust
Star
2
Fork
0
Merge trung bình
9 giờ 48 phút
Pull request đã merge (30 ngày)
151

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

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 registrystack/registry-stack

Tất cả issue của registrystack/registry-stack

Issue tương tự

Thêm issue về Rust

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.