schemas create --dry-run doesn't validate anything, just echoes input back
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 65/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 7
- Forks
- 2
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus HubSpot/agent-cli
-
properties get/list/batch-read appear unable to retrieve sensitive or highly-sensitive propertiesOffen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
-
schemas update: confirm step (--digest/--confirm) returns ok:true but never persists the changeOffen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 65/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
Alle Issues in HubSpot/agent-cli
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
code-yeongyu/oh-my-openagent#10172 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
nodejs/node#66743 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
OWASP/cve-lite-cli#1335 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
Windows: main-screen mouse tracking requires WT_SESSION, so it never enables inside herdr panesOffen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 66/100
code-yeongyu/senpi#3353 ·
Maintainer antworten meist innerhalb von 1 Tag