In his DevxDay 2021 talk, Jacob talked about preview environments and why they are crucial for making the software development process more inclusive, and why Kubernetes is the perfect platform for preview environments to gain the massive adoption they deserve. I hope you enjoy it.

So, what is a preview environment?

In this context, a preview environment is a full deployment of your app deployed in conjunction with a pull request. With Okteto’s preview environments, you get a different preview environment for each pull request, available at its own sharable URL. Everyone can see code changes before merging to production. Once the review is complete, all resources are cleaned up and then merged.

Preview Environment in GitHub

Traditional code review

Traditionally, code reviews focus on code differences and ensuring that the code is correctly designed for the system. We typically look for complicated code and a way to simplify. Does it match code style guidelines. We're also making sure it's not prone to bugs or future problems. Review checks that code provides behavior that functions as intended and makes sure that tests validate that expected behavior. We still need this process but there are often major complexities within this process.

Reviewing with Preview Environments

With preview environments, you now have a readily available hands-on environment. Readily available unlocks the ability to review without having to pull down code and redeploy. It also requires no extra resources, friction, or barrier to entry for reviews. With less complexity, more focus is now on visual changes to the application. We're now able to see how code impacts elements like the UI, log outputs, all the way to reviewing automated documentations. It also unlocks the ability to focus on the functionality of the product right inside of the branch.

The review workflow

With all of these aspects uncovered, you can now unlock many more contributors within your organization to take part in the review process. Now we can invite everyone to the party, from designers to content creators to product managers.

Some immediate benefits

  • Ownership: now that more people can participate as stakeholders and contributors, more people are enabled and feel a sense of impact and ownership. Increased ownership often results in stronger products and highly functional teams.

  • Critical timing of feedback: the current iterative workflow of code review and feedback can become cumbersome, especially once something has been reviewed and merged. This can lead to shortcuts and people being left out of the review process. We collect more information at the review stage with preview environments, combining code review and visual integration review, all before the critical merge.

The old process The typical code review flow

The new process Code review flow when using preview environments

So, what do you think about preview environments? Ready to give them a try?

Try it with GitHub

Try it with GitLab