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

schemas create --dry-run doesn't validate anything, just echoes input back

Đang mở
#8 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
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ệ
cli, shell
Lĩnh vực
cli, testing

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

  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 HubSpot/agent-cli

Tất cả issue của HubSpot/agent-cli

Issue tương tự

Thêm issue về CLI

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.