Book page Change policies on modules and code

This document outlines the policies surrounding changes to modules and themes under the Aegir environment. Please keep to those strict guidelines before changing anything on this server.

This document is a draft and needs improvement. It also needs to be collectively approved and discussed.

Changes to Drupal modules

This applies to any change to contrib modules in a platform.

General

  • Deploy platform-wide modules in sites/all/modules
  • Deploy platform-wide modules sparingly
  • Modules too site-specific should be in the site's own modules directory (sites/sitename/modules)

Upgrades

  • Module upgrades should be performed only on new/dev platforms
  • Upgrades should be applied by using the migrate tasks on relevant sites
  • It is preferable to use a test site to test major changes

Patches

  • Patch development should be done only on new/dev platforms
  • Patches should be sent upstream when possible
  • Patches should be stored in a patch directory in the relevant module
  • If patch is available or submitted upstream, it should be documented in the patch header

Changes to themes

See modules for now.

Changes to Aegir modules

General

  • All Aegir development should happen on the test server.
  • Functional testing should be performed before a bugfix is applied on the production server.
  • Complete functional testing (testing all tasks for a few sites) should be applied before a new functionality is applied on the production server

Major upgrades

To be determined.

Changes to Drupal core

This applies to changes that are need to the Drupal.

General

  • DO NOT PATCH CORE

Upgrades

  • Upgrades should NEVER be done "in place" (ie. by overwriting the files, either with a tarbal, FTP/SCP upload or CVS)
  • A new platform should be created with the new version and a test site be migrated

Patches

  • You should NEVER patch core
  • You should NEVER patch core for bugfixes except on some rare exceptions, in which case you will:
    • patch only bugs reported upstream
    • patch only on the development Drupal 7 platform
    • create and document the patch in the patch directory of the platform
  • You should NEVER patch core for new functionalities
  • You should NEVER patch core for new functionalities, except some rare exceptions, in which case you will:
    • patch only features reported upstream
    • patch on a development Drupal 7 platform
    • create and document the patch in the patch directory of the platform