schemas create --dry-run doesn't validate anything, just echoes input back
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
- 65/100
Hướng nghiên cứu
Look at the schemas create command implementation, likely in a commands/ or schemas/ directory. Compare it with schemas update --dry-run to see how the API validation is called. The fix involves ensuring the dry-run path performs the same validation as the real execution. Run the failing test cases from the issue description to verify the fix.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version: hubspot 0.14.0 (build 1162, commit unknown)
Command run:
$ echo '{}' | hubspot schemas create --dry-run
$ echo '{"name":"test_object_xyz"}' | hubspot schemas create --dry-run
Expected result: given schemas create (without --dry-run) rejects both of these bodies with a 400 validation error (Some required fields were not set: [name, labels], then [labels]), the --dry-run equivalent should surface the same validation problem rather than reporting success.
Actual result: --dry-run reports ok: true for both, regardless of body content, simply echoing back whatever was piped in:
$ echo '{}' | hubspot schemas create --dry-run
{"ok":true,"executed":false,"dry_run":true,"data":{}}
$ echo '{"name":"test_object_xyz"}' | hubspot schemas create --dry-run
{"ok":true,"executed":false,"dry_run":true,"data":{"name":"test_object_xyz"}}
$ echo '{}' | hubspot schemas create
{"ok":false,"error":{"status":400,"message":"Invalid input JSON on line 1, column 2. Some required fields were not set: [name, labels]"}}
For comparison, schemas update --dry-run genuinely calls the API - it returns portal-specific data (state_snapshot, digest, the actual portal ID), so this isn't true of every --dry-run in the CLI, just schemas create (and possibly other create commands - not exhaustively tested).
Why this matters: the README's own beta warning recommends using --dry-run before mutations as the safety practice for a tool that can modify live CRM data. For schemas create, a passing dry-run gives no assurance the real call will succeed.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 7
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 HubSpot/agent-cli
-
properties get/list/batch-read appear unable to retrieve sensitive or highly-sensitive propertiesĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
schemas update: confirm step (--digest/--confirm) returns ok:true but never persists the changeĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Tất cả issue của HubSpot/agent-cli
Issue tương tự
-
area: server enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
scs0209/laya-guard#52 ·
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 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: armbian-firstlogin: preset Wi-Fi key with " or \ breaks netplan configCó thể đã có người làm @jfcabral đã nhận hôm nay. Đang mởBug Good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
armbian/build#10995 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
jbacalso24/mimry#185 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
friction
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
kentcdodds/kody#3706 ·
Maintainer thường phản hồi trong vòng 1 ngày