Skip to content

Streamlining Gitflow Releases with Multiple Environments: A Guide to Managing Feature Adjustments Across Dev, QA, Preprod & Prod for Web Applications

In our organization using the git flow model across different environments (dev, qa, pre-production (preprod), and production(Prod)), developers often face challenges when business requests require alterations to features already deployed in release branches. Here’s a streamlined approach on managing such scenarios without compromising code quality or deployment integrity:

Revisiting Release Process with Multiple Environments

Once the development team finalizes their changes within dev, they branch off into what we refer as ‘release’. This is then tested in our testing phase, where it gets deployed to QA (qa) environment. Following successful acceptance here, similar deployment moves onwards to preproduction (preprod) and finally lands at production once all stages are complete:

dev -> release branch --> qa testbed ---> preprod stage ---> prod env  
                           |                ^    
                          Revert/Modify               |            
                              by business request  here   
                            (if necessary)         v     
                        ----------------------      

In case of urgent modifications, if the change is relatively minor and well-covered in automated tests or manual reviews have been performed: cherry picking could be an option. However, it can become complex very quickly with larger changes which may require more comprehensive retesting before deploying to preprod branch followed by production (Prod).

Handling Feature Adjustments Across Environments

Should there arise a need for removing or adding features in the released code that has already made its way into preproduction but not yet prod, here are some steps:

  1. Promote Testing Process - Any changes must pass through dev -> qa, and then to your testing phase within each environment consecutively before reaching production (prod). This maintains the integrity of all environments in alignment with our quality assurance standards—an essential pillar for a safe deployment strategy.
      dev (original) --release--> qa testbed ------> preprod --> prod 
                       |        ^     Revert/Modify -> Testing Phase             here        
            +--retest----+               v             
           /                \---------------------------  
          V                 Developer’s modifications are validated, if not they loop back to dev. This ensures that all adjustments meet the quality standards before deployment further downstream in our pipeline (Referencing Levi's suggestion of feature branches and squashing merges) [Link](https://devops.stackexchange.com/a/18605).
    
  2. Root Cause Analysis - Understanding why changes need to be revised is critical, as this could indicate potential issues in the original development process or testing phase that should not become a recurring occurrence (more on how these root causes can inform future preventive measures.)
  3. Invest Time for Root-Cause Improvement - Once you understand why certain changes are needed to be reverted, it’s pivotal towards improving the initial development phase and reducing such situations in subsequent releases—thereby avoiding a repeat of these exceptional cases while maintaining code quality across all environments.
       Root cause analysis: Ensure that your team understand why this change was requested, thus minimizing similar occurrences for future iterations (Improved coding standards/code review practices)
    
  4. Reversion - When necessary changes are made in release, these must go through the promotion process as mentioned above—this ensures all environments reflect latest codebase and maintain system integrity, keeping our software robust even when we have to pivot quickly based on business requirements or user feedbacks after deployment into preproduction/prod.
       After revalidation (testing), update dev branch -> merge back changes for further iterations in development phase until the feature is finalized and ready-to-release stable enough, then go through release->qa cycle again before deploying to PreProd & Prod environments respectively:  
           Dev --> Release(QA) testbed ---> preprod ---> prod 
                    |                ^     Revert/Modify               here        
             +--retest------+              v           
          Developer’n'codebase revision cycle for finalization.
    

This methodical way to handle changes ensures smooth operation, high quality and safe environment transitions that maintain system integrity at all stages of development—from dev through preproduction till production (prod). Remember, the key is not just about resolving issues but also understanding their root causes for a safer future deployment strategy.


Previous Post
Including Large Files in a Helm ConfigMap
Next Post
Understanding Flux and the GitOps Toolkit A Compa