BReg: name `relationship` in the Action input refusal message
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 92/100
Hướng nghiên cứu
Bắt đầu trong crates/registry-breg/src/contract.rs tại impl Deserialize for ActionInputSource, nơi điều kiện từ chối và thông báo Invalid::expected được định nghĩa. Cập nhật hai chuỗi thành viên được mong đợi và kiểm tra khẳng định trong crates/registry-breg/tests/field_encryption_contract.rs; nếu cần, hãy thêm hoặc điều chỉnh một test anh em bao phủ thành viên relationship. Hoàn tất nghĩa là văn bản chẩn đoán và quick fix đều nêu relationship, việc xác thực vẫn từ chối thành viên này và các test liên quan đều chạy thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A relationship member on an Action input is refused, which is correct: inputs are ephemeral and
cannot declare an inverse relationship. But the diagnostic and its fix-it list only
validTimeRole, pattern, encrypted and lookup. An author who copied a reference field into
inputs is told to remove four members, none of which is present, and the one that caused the
refusal is never named.
Minimal repro, in a project whose registry.yaml has an Action with a reference input:
actions:
- id: register-facility
# ...
inputs:
- id: operator
type: reference
target: operator
relationship: {inverseName: registeredFacilities}
required: true
classification: internal
bregctl check <project> reports:
error[config.invalid-value] registry.yaml:<line>:<col> /actions/0/inputs/<n>
expected an action input without validTimeRole, pattern, encrypted, or lookup
next: Remove validTimeRole, pattern, encrypted, and lookup from the action input.
Expected:
expected an action input without validTimeRole, pattern, encrypted, lookup, or relationship
next: Remove validTimeRole, pattern, encrypted, lookup, and relationship from the action input.
Likely fix: crates/registry-breg/src/contract.rs, impl Deserialize for ActionInputSource. The
condition already refuses raw.relationship; only the two strings passed to Invalid::expected
need the fifth member. The assertion in crates/registry-breg/tests/field_encryption_contract.rs
(native_proposal_inputs_do_not_accept_persisted_record_encryption_members) matches the current
wording with .contains(...) and needs the same update. A sibling test that sets relationship
on an input would cover the case. Naming only the member actually present would be a better
message still.
The generated authoring schema already refuses relationship on inputs, so this is a
message-only fix.
Seen on main at 2fe7e90b2: the condition and both strings are unchanged.
- Ngôn ngữ chính
- Rust
- Star
- 2
- Fork
- 0
- Merge trung bình
- 10 giờ 32 phút
- Pull request đã merge (30 ngày)
- 256
Chuẩn bị môi trường
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 registrystack/registry-stack
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
registrystack/registry-stack#2168 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
registrystack/registry-stack#2162 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
registrystack/registry-stack#2161 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
registrystack/registry-stack#2160 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:breg criticality:p2 triage:needs-implementation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
registrystack/registry-stack#2121 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của registrystack/registry-stack
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
fritzprix/libr-agent#2165 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:ecosystem bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Chelis-Lang/chelis#3942 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Maintainer thường phản hồi trong vòng 1 ngày
-
review-bot
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày