Page MenuHomePhabricator

Add an abstraction for the ce_address table
Closed, ResolvedPublic2 Estimated Story Points

Description

The new ce_address table should have its own abstraction, which is responsible for reads and writes. For now we only really need the "writes" part, since addresses are only read when looking up events, and for performance this should happen in a single query within EventStore. Potential interface:

interface AddressStore {
  /**
   * Given a full address, returns its ID in the ce_address table, creating a new record if necessary.
   */
  public function acquireFullAddressID( string $address ): int;
}

Event Timeline

Change 833105 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Add an abstraction for the ce_address table

https://gerrit.wikimedia.org/r/833105

Daimona set the point value for this task to 2.Sep 21 2022, 4:22 PM

Estimated asynchronously

Change 833105 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add an abstraction for the ce_address table

https://gerrit.wikimedia.org/r/833105

Daimona added a subscriber: vaughnwalters.

@vaughnwalters I think there isn't much for you to test here. Essentially, just make sure that if you create or edit an event, you can add, change, and remove the address without crashes or other obvious bugs. Just a quick test should suffice.

✅ This is functioning correctly. Sending to product sign off.

Enable event, add address and edit address:

enable event add and edit address.gif (1×2 px, 2 MB)

Remove address and add address back in

remove and add back in address.gif (1×2 px, 2 MB)

ifried subscribed.

As shown in the tests done by Vaughn, this work did not lead to crashes or bugs, and there is no other directly user-facing work to test, so I'm marking this work as Done.