Making WordPress.org

Opened 12 months ago

Last modified 11 months ago

#4993 new enhancement

Create a set of test data for local meta development

Reported by: dingo_d Owned by:
Milestone: Priority: high
Component: General Keywords: needs-patch 2nd-opinion


The themes team is blocked in part by missing data they can test on locally.
You can set up the environment in VVV, but when you go to http://wordpressorg.test/themes/, and log in the admin, there are not themes packages.

One either needs to deduce from the code what data to add in a certain database (I think that the theme's data is stored in wporg_35_ tables), or create patches without data and hope for the best.

An example provided to me so that I can test was (I removed the real data)

INSERT INTO `wporg_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`)
	(12345, 139098664, '2018-04-18 04:00:13', '2017-04-18 04:00:13', 'Theme description.', 'Theme name', '', 'publish', 'closed', 'closed', '', 'theme-slug', '', '', '2019-08-12 10:48:04', '2019-08-12 10:48:04', '', 0, 'https://wordpress.org/themes/theme-name/', 0, 'repopackage', '', 0);
INSERT INTO `wporg_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`)
	(loads of values go here);

Which is my theme on .org.

Besides that I think I missed the locales table when setting it up on VVV, so Otto added an SQL for necessary tables

CREATE TABLE `wporg_locales` (
  `locale_id` int(11) NOT NULL,
  `locale` varchar(20) NOT NULL DEFAULT '',
  `subdomain` varchar(20) NOT NULL DEFAULT '',
  `latest_release` varchar(16) DEFAULT NULL

This was just for the themes, because it's what I focus on mostly, but I think other parts of .org experience the same issues.

We need to see what data is needed, and create a sample dump or include it in the VVV or any meta setup (maybe a wpcli script that will import it in the relevant tables)

Change History (3)

#1 @valentinbora
11 months ago

I’d personally vote for WP CLI provisioning, not even a dump, just code to do it

This ticket was mentioned in Slack in #meta by valentinbora. View the logs.

11 months ago

#3 @dufresnesteven
11 months ago

I have gone through some of the missing DB configurations (and some outdated VVV configs) to get more acquainted with the setup and also just to have something that doesn't 'look' broken out of the box.

Its here: https://github.com/StevenDufresne/meta-environment.

It doesn't solve your problem though. It addresses more of the higher level issues.

With all that being said, from what I know now, I think the state driven approach that we currently take will continue to fall out of date and remain opaque.

Along with @valentinbora's vote on going with wp-cli, I would also vote that we move to a migration driven approach, whether that necessarily needs to be using wp-cli, not sure. Makes sense though....

Note: See TracTickets for help on using tickets.