@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Mark questionable column nullability for later

Summary:
Ref T1191. Ref T6203. While generating expected schemata, I ran into these columns which seem to have sketchy nullability.

- Mark most of them for later resolution (T6203). They work fine today and don't need to block T1191. Changing them can break the application, so we can't autofix them.
- Forgive a couple of them that are sort-of reasonable or going to get wiped out.

Test Plan: Saw 94 remaining warnings.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: hach-que, epriestley

Maniphest Tasks: T1191, T6203

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

+111 -26
+1 -1
src/applications/config/schema/PhabricatorConfigStorageSchema.php
··· 171 171 case self::ISSUE_MISSING: 172 172 case self::ISSUE_SURPLUS: 173 173 case self::ISSUE_SUBFAIL: 174 + case self::ISSUE_NULLABLE: 174 175 return self::STATUS_FAIL; 175 176 case self::ISSUE_SUBWARN: 176 177 case self::ISSUE_COLUMNTYPE: 177 - case self::ISSUE_NULLABLE: 178 178 return self::STATUS_WARN; 179 179 case self::ISSUE_SUBNOTE: 180 180 case self::ISSUE_CHARSET:
+8
src/applications/differential/storage/DifferentialChangeset.php
··· 36 36 'fileType' => 'uint32', 37 37 'addLines' => 'uint32', 38 38 'delLines' => 'uint32', 39 + 40 + // T6203/NULLABILITY 41 + // These should all be non-nullable, and store reasonable default 42 + // JSON values if empty. 43 + 'awayPaths' => 'text?', 44 + 'metadata' => 'text?', 45 + 'oldProperties' => 'text?', 46 + 'newProperties' => 'text?', 39 47 ), 40 48 self::CONFIG_KEY_SCHEMA => array( 41 49 'diffID' => array(
+6 -2
src/applications/differential/storage/DifferentialDiff.php
··· 57 57 'branch' => 'text255?', 58 58 'bookmark' => 'text255?', 59 59 'arcanistProjectPHID' => 'phid?', 60 - 'creationMethod' => 'text255', 61 - 'description' => 'text255', 62 60 'repositoryUUID' => 'text64?', 61 + 62 + // T6203/NULLABILITY 63 + // These should be non-null; all diffs should have a creation method 64 + // and the description should just be empty. 65 + 'creationMethod' => 'text255?', 66 + 'description' => 'text255?', 63 67 ), 64 68 self::CONFIG_KEY_SCHEMA => array( 65 69 'revisionID' => array(
+1 -1
src/applications/differential/storage/DifferentialRevision.php
··· 84 84 'lastReviewerPHID' => 'phid?', 85 85 'lineCount' => 'uint32?', 86 86 'mailKey' => 'bytes40', 87 - 'branchName' => 'text255', 87 + 'branchName' => 'text255?', 88 88 'arcanistProjectPHID' => 'phid?', 89 89 'repositoryPHID' => 'phid?', 90 90 ),
+1 -1
src/applications/harbormaster/storage/HarbormasterObject.php
··· 8 8 return array( 9 9 self::CONFIG_AUX_PHID => true, 10 10 self::CONFIG_COLUMN_SCHEMA => array( 11 - 'name' => 'text255', 11 + 'name' => 'text255?', 12 12 ), 13 13 ) + parent::getConfiguration(); 14 14 }
+5 -1
src/applications/harbormaster/storage/HarbormasterSchemaSpec.php
··· 27 27 'id' => 'id', 28 28 'logID' => 'id', 29 29 'encoding' => 'text32', 30 - 'size' => 'uint32', 30 + 31 + // T6203/NULLABILITY 32 + // Both the type and nullability of this column are crazily wrong. 33 + 'size' => 'uint32?', 34 + 31 35 'chunk' => 'bytes', 32 36 ), 33 37 array(
+7 -3
src/applications/harbormaster/storage/build/HarbormasterBuildLog.php
··· 31 31 return array( 32 32 self::CONFIG_AUX_PHID => true, 33 33 self::CONFIG_COLUMN_SCHEMA => array( 34 - 'logSource' => 'text255', 35 - 'logType' => 'text255', 36 - 'duration' => 'uint32', 34 + // T6203/NULLABILITY 35 + // It seems like these should be non-nullable? All logs should have a 36 + // source, etc. 37 + 'logSource' => 'text255?', 38 + 'logType' => 'text255?', 39 + 'duration' => 'uint32?', 40 + 37 41 'live' => 'bool', 38 42 ), 39 43 self::CONFIG_KEY_SCHEMA => array(
+4 -1
src/applications/harbormaster/storage/build/HarbormasterBuildTarget.php
··· 103 103 self::CONFIG_COLUMN_SCHEMA => array( 104 104 'className' => 'text255', 105 105 'targetStatus' => 'text64', 106 - 'name' => 'text255', 107 106 'dateStarted' => 'epoch?', 108 107 'dateCompleted' => 'epoch?', 109 108 'buildGeneration' => 'uint32', 109 + 110 + // T6203/NULLABILITY 111 + // This should not be nullable. 112 + 'name' => 'text255?', 110 113 ), 111 114 self::CONFIG_KEY_SCHEMA => array( 112 115 'key_build' => array(
+6 -1
src/applications/harbormaster/storage/configuration/HarbormasterBuildStep.php
··· 29 29 self::CONFIG_COLUMN_SCHEMA => array( 30 30 'className' => 'text255', 31 31 'sequence' => 'uint32', 32 - 'name' => 'text255', 33 32 'description' => 'text', 33 + 34 + // T6203/NULLABILITY 35 + // This should not be nullable. Current `null` values indicate steps 36 + // which predated editable names. These should be backfilled with 37 + // default names, then the code for handling `null` shoudl be removed. 38 + 'name' => 'text255?', 34 39 ), 35 40 self::CONFIG_KEY_SCHEMA => array( 36 41 'key_plan' => array(
+4 -1
src/applications/herald/storage/HeraldRule.php
··· 36 36 'contentType' => 'text255', 37 37 'mustMatchAll' => 'bool', 38 38 'configVersion' => 'uint32', 39 - 'repetitionPolicy' => 'uint32', 40 39 'ruleType' => 'text255', 41 40 'isDisabled' => 'uint32', 42 41 'triggerObjectPHID' => 'phid?', 42 + 43 + // T6203/NULLABILITY 44 + // This should not be nullable. 45 + 'repetitionPolicy' => 'uint32?', 43 46 ), 44 47 self::CONFIG_KEY_SCHEMA => array( 45 48 'key_phid' => null,
+5
src/applications/maniphest/storage/ManiphestTask.php
··· 78 78 'ownerOrdering' => 'text64?', 79 79 'originalEmailSource' => 'text255?', 80 80 'subpriority' => 'double', 81 + 82 + // T6203/NULLABILITY 83 + // This should not be nullable. It's going away soon anyway. 84 + 'ccPHIDs' => 'text?', 85 + 81 86 ), 82 87 self::CONFIG_KEY_SCHEMA => array( 83 88 'key_phid' => null,
+4 -1
src/applications/metamta/storage/PhabricatorMetaMTAMail.php
··· 34 34 ), 35 35 self::CONFIG_COLUMN_SCHEMA => array( 36 36 'status' => 'text255', 37 - 'message' => 'text', 38 37 'relatedPHID' => 'phid?', 38 + 39 + // T6203/NULLABILITY 40 + // This should just be empty if there's no body. 41 + 'message' => 'text?', 39 42 ), 40 43 self::CONFIG_KEY_SCHEMA => array( 41 44 'status' => array(
+4
src/applications/paste/storage/PhabricatorPaste.php
··· 48 48 'language' => 'text64', 49 49 'mailKey' => 'bytes20', 50 50 'parentPHID' => 'phid?', 51 + 52 + // T6203/NULLABILITY 53 + // Pastes should always have a view policy. 54 + 'viewPolicy' => 'policy?', 51 55 ), 52 56 self::CONFIG_KEY_SCHEMA => array( 53 57 'parentPHID' => array(
+6 -1
src/applications/phame/storage/PhameBlog.php
··· 31 31 'name' => 'text64', 32 32 'description' => 'text', 33 33 'domain' => 'text255?', 34 - 'joinPolicy' => 'policy', 34 + 35 + // T6203/NULLABILITY 36 + // These policies should always be non-null. 37 + 'joinPolicy' => 'policy?', 38 + 'editPolicy' => 'policy?', 39 + 'viewPolicy' => 'policy?', 35 40 ), 36 41 self::CONFIG_KEY_SCHEMA => array( 37 42 'key_phid' => null,
+10 -2
src/applications/phame/storage/PhamePost.php
··· 91 91 self::CONFIG_COLUMN_SCHEMA => array( 92 92 'title' => 'text255', 93 93 'phameTitle' => 'text64', 94 - 'body' => 'text', 95 94 'visibility' => 'uint32', 96 - 'datePublished' => 'epoch?', 95 + 96 + // T6203/NULLABILITY 97 + // These seem like they should always be non-null? 98 + 'blogPHID' => 'phid?', 99 + 'body' => 'text?', 100 + 'configData' => 'text?', 101 + 102 + // T6203/NULLABILITY 103 + // This one probably should be nullable? 104 + 'datePublished' => 'epoch', 97 105 ), 98 106 self::CONFIG_KEY_SCHEMA => array( 99 107 'key_phid' => null,
+4 -1
src/applications/phriction/storage/PhrictionContent.php
··· 35 35 'title' => 'text', 36 36 'slug' => 'text128', 37 37 'content' => 'text', 38 - 'description' => 'text', 39 38 'changeType' => 'uint32', 40 39 'changeRef' => 'uint32?', 40 + 41 + // T6203/NULLABILITY 42 + // This should just be empty if not provided? 43 + 'description' => 'text?', 41 44 ), 42 45 self::CONFIG_KEY_SCHEMA => array( 43 46 'documentID' => array(
+4 -1
src/applications/ponder/storage/PonderAnswer.php
··· 70 70 self::CONFIG_COLUMN_SCHEMA => array( 71 71 'voteCount' => 'sint32', 72 72 'content' => 'text', 73 - 'contentSource' => 'text', 73 + 74 + // T6203/NULLABILITY 75 + // This should always exist. 76 + 'contentSource' => 'text?', 74 77 ), 75 78 self::CONFIG_KEY_SCHEMA => array( 76 79 'key_phid' => null,
+4 -1
src/applications/ponder/storage/PonderQuestion.php
··· 38 38 'voteCount' => 'sint32', 39 39 'status' => 'uint32', 40 40 'content' => 'text', 41 - 'contentSource' => 'text', 42 41 'heat' => 'double', 43 42 'answerCount' => 'uint32', 44 43 'mailKey' => 'bytes20', 44 + 45 + // T6203/NULLABILITY 46 + // This should always exist. 47 + 'contentSource' => 'text?', 45 48 ), 46 49 self::CONFIG_KEY_SCHEMA => array( 47 50 'key_phid' => null,
+6 -1
src/applications/project/storage/PhabricatorProject.php
··· 125 125 'name' => 'text255', 126 126 'status' => 'text32', 127 127 'phrictionSlug' => 'text128?', 128 - 'joinPolicy' => 'policy', 129 128 'isMembershipLocked' => 'bool', 130 129 'profileImagePHID' => 'phid?', 131 130 'icon' => 'text32', 132 131 'color' => 'text32', 132 + 133 + // T6203/NULLABILITY 134 + // These are definitely wrong and should always exist. 135 + 'editPolicy' => 'policy?', 136 + 'viewPolicy' => 'policy?', 137 + 'joinPolicy' => 'policy?', 133 138 ), 134 139 self::CONFIG_KEY_SCHEMA => array( 135 140 'key_phid' => null,
+4 -2
src/applications/releeph/storage/ReleephRequest.php
··· 155 155 ), 156 156 self::CONFIG_COLUMN_SCHEMA => array( 157 157 'requestCommitPHID' => 'phid?', 158 - 'commitIdentifier' => 'text40', 159 - 'pickStatus' => 'uint32', 158 + 'commitIdentifier' => 'text40?', 159 + 'commitPHID' => 'phid?', 160 + 'pickStatus' => 'uint32?', 160 161 'inBranch' => 'bool', 161 162 'mailKey' => 'bytes20', 163 + 'userIntents' => 'text?', 162 164 ), 163 165 self::CONFIG_KEY_SCHEMA => array( 164 166 'key_phid' => null,
+4 -1
src/applications/repository/storage/PhabricatorRepositoryRefCursor.php
··· 30 30 self::CONFIG_COLUMN_SCHEMA => array( 31 31 'refType' => 'text32', 32 32 'refNameHash' => 'bytes12', 33 - 'refNameEncoding' => 'text16', 34 33 'commitIdentifier' => 'text40', 34 + 35 + // T6203/NULLABILITY 36 + // This probably should not be nullable; refNameRaw is not nullable. 37 + 'refNameEncoding' => 'text16?', 35 38 ), 36 39 self::CONFIG_KEY_SCHEMA => array( 37 40 'key_cursor' => array(
+6 -3
src/applications/settings/storage/PhabricatorUserSSHKey.php
··· 12 12 public function getConfiguration() { 13 13 return array( 14 14 self::CONFIG_COLUMN_SCHEMA => array( 15 - 'name' => 'text255', 16 - 'keyType' => 'text255', 17 - 'keyBody' => 'text', 18 15 'keyHash' => 'bytes32', 19 16 'keyComment' => 'text255?', 17 + 18 + // T6203/NULLABILITY 19 + // These seem like they should not be nullable. 20 + 'name' => 'text255?', 21 + 'keyType' => 'text255?', 22 + 'keyBody' => 'text?', 20 23 ), 21 24 self::CONFIG_KEY_SCHEMA => array( 22 25 'userPHID' => array(
+7
src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php
··· 36 36 ), 37 37 ); 38 38 39 + $config[self::CONFIG_COLUMN_SCHEMA] = array( 40 + // T6203/NULLABILITY 41 + // This isn't nullable in the archive table, so at a minimum these 42 + // should be the same. 43 + 'dataID' => 'uint32?', 44 + ) + $parent[self::CONFIG_COLUMN_SCHEMA]; 45 + 39 46 return $config + $parent; 40 47 } 41 48