Skip to main content

Automatically create Sync PRs after Prod release

The Gearset Pipeline allows you to configure it to automatically create Sync PRs after each release to Prod. Find out where to find the setting and how it works.

Mateusz Kochanowicz avatar
Written by Mateusz Kochanowicz
Updated yesterday

Gearset allows the Pipeline administrators to enable the auto creation of Sync PRs. These are typically created after a Prod release takes place.

This setting isn't configurable during Pipeline creation. You get access to it later on, after the Pipeline had been created.

For an existing Pipeline, you'd find this option on your Pipelines page.

Before enabling this feature

We recommend enabling this setting after having made sure that all of your Pipeline environments are fully in sync.

For more information, check our documentation on how to keep your Pipeline environment branches in sync.

How to enable the feature

Click the cog icon -> Edit pipeline details... -> enable: Automatically create Sync PRs after a production release.

Quick preview on how to find it on the Pipelines page:

Once you have enabled this feature, it is an expected behavior that you will not be able to manually create Sync PRs in the Pipeline - whether directly from Prod or from any other CI job (green) environment. That's because Gearset will automatically handle that for your Pipeline.

So the button "Create Sync PRs" setting will appear as greyed out.

When do automatic Sync PRs get created in my Pipeline?

These would normally happen after:

  • You have merged a new PR or a Release into your Prod environment.

  • You have merged a quick fix from a Hotfix (or any other) environment which is linked directly to the Prod environment in the Pipeline (as on example below).

Handling updates to open Sync PRs after subsequent Prod release

We understand that for fast-moving teams working with Gearset Pipelines and deploying frequently to Production, you'd want to know what happens in a scenario where there are subsequent changes introduced to Main/Master branch after a Sync PR had been automatically created but not merged yet.

An example workflow may look as below:

  • Release package was merged into Prod environment (Main/Master)

  • Sync PR(s) were automatically created against all lower Pipeline environments

  • Sync PR(s) have not been manually merged into lower environments

  • Another Release or PR is merged into Prod environment (Main/Master)

  • Gearset then automatically updates all existing Sync PR(s) with the new commits that were merged into Prod with the above Release/PR

  • Sync PR gets re-validated against the lower environments and, once successful, is ready to be merged

Other considerations with automatic Sync PRs in place

While Gearset still allows you to continue using the Pipeline with the manual creation of Sync PRs after each Prod release, we understand many teams wanted this process to become automated in Gearset Pipelines.
​
This however may bring some other behaviors which may not always be intended by teams using Pipelines, and therefore should be considered before you switch to this workflow, such as:

  • When automated, Sync PR(s) in the Pipeline could be syncing legitimate commits back, rather than only aligning commit Git history in lower environments, which means they may trigger deployments to lower Pipeline environments (orgs).

Feedback

If you have any questions on this new feature, or if there's any use case for which the answer we've not covered in this documentation, let us know in the In-app chat.

Did this answer your question?