Homec4science

Allow "harbormaster.createartifact" to decode raw HTTP parameter types of…

Authored by epriestley <git@epriestley.com> on Nov 17 2016, 14:41.

Description

Allow "harbormaster.createartifact" to decode raw HTTP parameter types of artifact properties

Summary:
Ref T11887. This isn't a great fix but makes the method behave properly until I get around to a real fix.

In the longer term, I want to convert all of this pluggable Harbormaster/Drydock stuff (blueprints, artifacts, build plans) to use EditEngine + EditField instead of the weird mishmash of older/custom stuff it currently uses. However, this is a more involved project to execute and I'd like to be in that area of the codebase first so it gets adequate testing.

Until that happens, just put a reasonble-ish mechanism in place to let artifacts correct inbound types. This is the only artifact type and only parameter which needs casting.

Test Plan:

  • Made a curl call to harbormaster.createartifact to create a URI artifact with ?...&ui.external=1.
  • Before patch: type error on ui.external not being a boolean.
  • After patch: artifact created successfully.

Reviewers: chad

Reviewed By: chad

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T11887

Differential Revision: https://secure.phabricator.com/D16887

Details

Committed
epriestley <git@epriestley.com>Nov 17 2016, 17:03
Pushed
aubortJan 31 2017, 17:16
Parents
rPHb02f64f6eecd: Make project token sorting and normalization a little less hacky
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHb4faf2e63ee6: Allow "harbormaster.createartifact" to decode raw HTTP parameter types of… (authored by epriestley <git@epriestley.com>).Nov 17 2016, 17:03