wiki:FRP

The Feature Removal Process (FRP)

Overview

The initial process was drafted in the IRC meeting on 18th Feb 2010. It has since been discussed in detail on the devel mailinglist in the "[PATCH v2] Do not randomize resolving of IP addresses in getaddr()" thread. In the IRC meeting on 22nd July 2010 it was decided to simplify the FRP somewhat by removing the "display a runtime warning" phase.

  1. Ask users if they are depending on a feature considered for deprecation (e.g. using the openvpn-users mailing list)
    • If users complain, discuss the issue and possible solutions with them
    • If there are no complaints, proceed to 2
  2. Make the feature disabled by default, but allow enabling it at compile-time
    • If users complain now, discuss the issue and possible solutions with them
    • If there are no complaints, proceed to 3
  3. Remove the feature entirely from the code
    • If users complain now, discuss the issue and possible solutions with them
    • If there are no complaints, proceed to 4
  4. Finished. The feature was not really important to anyone and is not cluttering the code anymore.

Overview over features undergoing FRP

The Feature Removal Process view found under View Tickets contains a list over all features going through this process.

Moving features "down the ladder"

It is probably easiest move features down the ladder (see steps in above paragraph) is when new stable releases are made. This allows users to be certain that no features they use are removed without a warning and time to react. Assuming a feature is deprecated just after a stable release is made, it will be available for quite a while:

  1. Enabled by default in release + 0
  2. Disabled but available in release + 1
  3. Removed in release + 2

There are ways to speed up the process. We can, for example, have two processes depending on feature type:

  1. Longer process for features we know people depend on, but which need to be removed nevertheless (for whatever reason)
  2. Shorter process for features somebody _might_ use - like the randomization feature discussed earlier

The full FRP with steps 1-3 would suit type 1 features. Type 2 features could skip the "disabled but available" step to save time. It should be relatively easy to spot type 1 features: a mail to the -users mailing list should trigger loud complaints if a feature is widely used. Also, users have plenty of time to react to the warnings.

What to do - code wise

It important that each feature deprecation / removal is documented visibly in the release notes of each stable release.

First phase: Enable the feature on request

  • Remove the feature by using #ifdef's wherever this feature is called or executed in the source code
    • The #ifdef name should start with DEPRECATED_ and then a sensible name for the feature
    • Add a warning (using #warning statements) for compile time warnings when the feature is enabled.
    • Add log messages (using msg()) whenever this feature is called.
      • Make sure that the logging will not be too extensive and happen too often. It should catch attention, but not flood the log.
    • Update deprecated.c and add an appropriate warning, inside a #ifdef block for the feature going through the FRP.
  • Update configure.ac
    • Locate the section for deprecated features, (search for "Deprecated features")
    • Add a new configure argument to enable this feature. The feature should be disabled by default. The argument should start with --enable-depr- and then a sensible and descriptive feature name.
  • Test the change by compiling and smoke testing OpenVPN.
    • When the feature is disabled (the default)
      • No warning about the feature deprecation should be seen at startup
      • No warning or errors when OpenVPN passes the code path where this feature was enabled
      • Verify that the feature really is removed when running OpenVPN and that it behaves as expected
    • When the feature is enabled (through ./configure arguments)
      • A warning should be clearly visible during compilation
      • OpenVPN should provide a warning early at startup about a enabled deprecated feature
      • OpenVPN should create a log entry whenever the feature's code path is hit
      • Verify that the feature indeed still works
  • Commit the patch(es) and submit them to the openvpn-devel mailinglist. The subject must start with [PATCH] followed by FRP2:
    • Example: [PATCH] FRP1: Deprecating feature X by default

Second phase: Complete removal of the feature

  • Remove all code blocks which are encapsulated by the feature's #ifdef blocks from the source code
    • Beware of #else blocks, and make sure they are not removed.
  • Update configure.ac
    • Remove the configure arguments related to the feature
  • Test the change by compiling and smoke testing OpenVPN. Check that:
    • No warning about the feature deprecation should be seen at startup
    • No warning or errors when OpenVPN passes the code path where this feature was enabled
    • Verify that the feature really is removed when running OpenVPN and that it behaves as expected
  • Commit the patch(es) and submit them to the openvpn-devel mailinglist. The subject must start with [PATCH] followed by FRP3:
    • Example: [PATCH] FRP2: Removing deprecated feature X

That's it. Feature is removed.

Last modified 7 years ago Last modified on 08/13/10 22:10:20