DEV Community

Cover image for How to release changes without a last-minute scramble
Mansur Fattakhov
Mansur Fattakhov

Posted on Originally published at mind.mansur.expert

How to release changes without a last-minute scramble

There is an hour left in the working day. The change is ready, the checks are green, and a short “So, shall we ship it?” appears in the chat. One developer is already getting ready to leave; another remembers a small fix it would be nice to include. The manager asks whether they can promise the new feature to a customer tomorrow. The person who usually handles deployment has not replied yet.

Imagine a small team preparing to let customers change their delivery address before an order is handed over for processing. The address can be changed in the test environment. But which version was tested? What will the warehouse see? Who will stay to check the result after deployment?

To stop these questions coming up at the last minute, the team needs a repeatable release process. Below is a sequence I suggest using as a starting point and adapting to your project. We will follow one hypothetical change through it, from choosing a time to finishing observation.

1. Set release windows and assign a coordinator

First, agree on when the team releases routine changes. Choose a frequency you can sustain. For example, you might start with two windows a week in the first half of the working day. Then adjust the frequency based on preparation time, the volume of changes, and release outcomes.

Every release needs someone responsible for coordination. This person puts together the scope, checks that the participants are ready, and records the deployment decision. Assign in advance the people who will deploy, check the user journey, and observe the system. In a small team, one person may take on several responsibilities. What matters is that they confirm their availability for deployment, verification, and any recovery that may be needed.

This removes two causes of last-minute pressure. The team knows its next opportunity to ship a task, making it easier to defer a change that is not ready. And after the button is pressed, people stay around.

Assess Fridays by the same criteria. If everyone leaves after deployment until Monday, choose another window. For an urgent fix outside the schedule, make separate arrangements for the people needed and time to observe the result.

Outcome of this step: the release time, coordinator, and participants who have confirmed their involvement are known.

2. Fix the scope and acceptance criteria

Before building a candidate, create a short release record. An issue in your tracker or a document linked from the release chat will do. List the tasks, configuration changes, migrations, and affected integrations. For each feature, record the testable behavior you will use to accept the result.

For the address change, the agreement might look like this.

  • Customers can change the address until the order is handed over for processing.
  • The warehouse receives the current address.
  • Editing is disabled once the order has been handed over.
  • Saving an address and starting processing at the same time do not leave the order in an inconsistent state.
  • Orders created before the update continue to be processed.

These criteria define the scope of testing and help uncover disagreements before deployment. If the developer and manager have different understandings of when editing should be disabled, this is where you need to resolve that.

Once the scope is fixed, treat every addition as a change to the release. The coordinator needs to understand what has been added and which checks are now required. Move tasks that are not ready to the next window. If a task has already entered the shared codebase, check that your chosen way of excluding it really does remove its effects from the build.

Outcome of this step: there is an agreed scope and specific criteria the team will use to accept the release.

3. Build and identify a candidate

Build a specific version of the code and save the identifier of the resulting artifact. A release candidate must unambiguously connect the source code, build, and test results. You can identify it with a tag such as v1.8.0-rc.1. For a container, save the image digest.

Deploy this artifact to staging. Once it has passed testing, promote the same build to production. This lets you connect the test results to what users receive. Even rebuilding from the same commit may bring in different dependencies if they are not pinned.

If the code changes, create a new candidate and repeat the checks for the affected behavior, along with the basic application health checks. Keep the earlier results associated with the earlier version.

It is worth enforcing this process in CI. The build produces an artifact, the checks refer to it, and the deployment step accepts its identifier. Check environment configuration and secrets separately: the same image can behave differently under different settings.

Outcome of this step: there is an unambiguously identified build that can be tested and then deployed to production.

4. Test the candidate on staging and record the results

Work through the acceptance criteria from step two. Start with the main user journey, then check the edge cases and failures related to the change. For the delivery address, that means the path from the form to the warehouse, an order already processed, old data, and simultaneous actions by the customer and the processing system.

Record the result and testing method next to each criterion. Link automated checks to the run report, and manual checks to the version, environment, and observed result. If a check could not be performed, record why and how that affects the release decision. In the article on testing before a release, we discussed how to choose these scenarios in more detail.

Note any significant differences between staging and production separately. If the warehouse is replaced by a stub in the test environment, a successful check confirms only part of the path. Before release, you need to determine how to verify the real integration and limit the consequences of a possible error.

A critical criterion that fails, or remains untested without an acceptable way to limit the risk, blocks the release. The coordinator sends it back for further preparation.

Outcome of this step: the acceptance criteria have been checked, limitations are known, and blocking problems have been resolved.

5. Prepare to stop and recover

Before deployment, record the signs that will make the team stop and what it will do next. Every action needs an assigned person with access to the system.

In our example, a mismatch between the address in the order and the one held by the warehouse would be a reason to stop enabling the feature. The first action might be to disable editing, provided that option has been prepared and tested. Orders that have already been changed will need a separate reconciliation.

If you plan to roll back, identify the previous build and make sure it is compatible with the data and configuration after the update. For a migration, determine the sequence in advance. For example, first add a compatible field, then switch the application to using it, and remove the old one in a separate release once the transition is complete.

Irreversible actions need their own plan. Restoring the old application will not, by itself, correct an address already sent to the warehouse. The team must know how to find affected orders and who will contact the warehouse to make corrections.

Outcome of this step: the stop conditions are known, an available recovery method has been tested, and the work needed to address the consequences for data is understood.

6. Make the decision and deploy

Before starting, the coordinator checks readiness. The scope and candidate match what was tested, there are no blocking bugs, the configuration is prepared, the recovery plan is feasible, and the participants are available. The coordinator then records the decision to begin the release in the shared record or chat.

Deploy through the agreed deployment process. Record the version and start time. If migrations or a sequence of updates to several components are needed, follow the prepared order and check the result of each stage.

Use a gradual rollout where it is technically supported. For example, first enable the new feature for a limited group of users, check the result, and then expand access. Bear in mind that a migration of a shared database may affect the entire system at once; its consequences need to be assessed separately.

If a stop condition from the previous step is met, halt further rollout and follow the recovery plan. Record the actions with timestamps. These records will also help with a postmortem.

Outcome of this step: the intended version has been deployed, the deployment has been documented, and production verification can begin.

7. Confirm that it works in production

After deployment, check the application version, its health, and the user journey. Prepare the verification method in advance, taking into account real consequences for payments, notifications, and the warehouse.

For our change, you need to confirm that the address is saved and reaches the order processing system. At the same time, watch for errors, latency, and the queue of messages exchanged with the warehouse. Compare these with the state before deployment and the agreed acceptable values.

Define the observation period and the events that must occur during it in advance. Its length depends on traffic and the nature of the change. If nobody has changed an address in five minutes, the absence of errors tells you little about the new feature. Wait for representative events or perform a controlled check. For deferred processing, schedule a separate check after it starts and keep someone responsible until the result is available.

Outcome of this step: the feature has been verified in production, the observation period is complete, and deferred checks have either been completed or explicitly remain under observation.

8. Close the release and improve the process

Close the release once the agreed checks are complete, including deferred checks if they are part of the completion criteria. Keep the version, times, results, and problems found in the release record. Tell the team and manager exactly what is available to users and what limitations remain.

If recovery was needed, record the actual state of the system and the scope of the next attempt. Turn the improvements you identify into tasks with assignees and deadlines. For example, add a migration compatibility check or automate reconciliation of the address with the warehouse.

After several releases, look at where the team loses time, how many changes have to be rolled back, and how long recovery takes. Use these observations to adjust release frequency and size. A lengthy manual check of the same scenario gives you a concrete candidate for automation.

With this process, the team reaches “So, shall we ship it?” with answers already prepared. The tested version is known, people are available, and the actions to take if something goes wrong have been agreed. All the coordinator has left to do is check readiness and start the release.

And the small fix you decided to defer today will make it to the next window. It is already on the calendar.

Top comments (0)