This will be useful if we start testing Drupal 6.x and contrib modules and if Drupal 8 requires new environments. The idea being that environments can be enabled/disabled on the fly and possibly have totally different environments per project client.

Comments

boombatower’s picture

Assigned: Unassigned » boombatower
Status: Active » Needs review
StatusFileSize
new14.2 KB

Early patch.

boombatower’s picture

StatusFileSize
new25.33 KB

Updated

boombatower’s picture

StatusFileSize
new31.24 KB

Fully implemented interface and API.

boombatower’s picture

Initial commit of #3.

boombatower’s picture

I don't want to have to block when an environment is currently testing a patch. As such the system needs to keep track of what clients are testing a patch so that it can be sent to as many as possible without blocking.

I'm thinking something simple (only a record when current testing):

environment_status
  test_id: test ID related to status information
  environment_id: environment ID related to status information
  client_id: client ID that test was sent to

The status of each environment can be displayed as another fieldset on the test page.

boombatower’s picture

Once a client requests a test a record is inserted into environment_status, once a result is returned the record is removed.

The query to find eligible tests should ignore them if a result or environment_status record exists.

For simplicity, query all tests that have not already been tested in the client's environment and are "queued". Loop through them and get the relevant environments. If the client is in the list then return the test.

boombatower’s picture

The current test code:

define('PIFR_SERVER_TEST_STATUS_STUB', 1);
define('PIFR_SERVER_TEST_STATUS_QUEUED', 2);
define('PIFR_SERVER_TEST_STATUS_POSTPONED', 3);
define('PIFR_SERVER_TEST_STATUS_SENT', 4);
define('PIFR_SERVER_TEST_STATUS_RESULT', 5);

will need to be changed since there will no longer be a need for the SENT status. Tests will always be QUEUED until they have been tested on all relevant environments or received a fail on a required environment.

boombatower’s picture

Also remove the client_id of the pift_test table since that will be recorded in environment_status.

boombatower’s picture

StatusFileSize
new30.54 KB

Much further integration and such.

boombatower’s picture

StatusFileSize
new50.12 KB

Further abstraction.

boombatower’s picture

StatusFileSize
new55.38 KB

Appears to be pretty much there.

boombatower’s picture

StatusFileSize
new58.17 KB

The majority of things seems to be working....haven't got through everything, but this is complete enough to commit.

boombatower’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.