Deprecating the `PRE_WRITE` step in the Request Pipeline


#1

Deprecating the PRE_WRITE step

As part of our efforts to streamline the request pipeline, we have decided to deprecate the PRE_WRITE step of the request pipeline. Please migrate all PRE_WRITE functions to operationBefore functions (formerly known as TRANSFORM_ARGUMENT) until 12th November 2017. Until then, all existing PRE_WRITE functions will continue to work. No new PRE_WRITE functions can be created at this point.

Background

  • The PRE_WRITE step commonly lead to confusion, as there was no real distinction between TRANSFORM_ARGUMENT and PRE_WRITE.
  • With no additional capabilities, the PRE_WRITE step introduced a lot of burden on the mental model needed to work with the request pipeline.
  • PRE_WRITE functions saw very little adoption compared to TRANSFORM_ARGUMENT.
  • Furthermore, PRE_WRITE functions promoted a non-ideal programming model to handle multi-step workflows. If you want to guarantee that steps are taken in a certain order, it’s better to persist the current status and follow a state machine pattern.

Migration Path

In most cases, PRE_WRITE functions should be directly transferrable to operationBefore functions (formerly known as TRANSFORM_ARGUMENT). For some cases, migrating to Server-Side Subscription or other asynchronous systems might be a better fit.

If you have any questions whatsover, please bring them up in this thread :slightly_smiling_face:


Function PRE_WRITE deprecated