Skip to main content
Version: 7.5.x

Consuming Support Fixes

The following guide describes how you can consume official support fixes for your current version of Self-Managed Commerce.

To view the latest fixes for your version of Self-Managed Commerce, view the Changelog section of the Release Notes.

note

The following instructions assume that your Git repository was created by cloning from the Self-Managed Commerce code repository. If your repository was created from a downloaded zip copy of the source, or if you are not sure if your team repository was cloned from the Elastic Path repository, see the Troubleshooting section.

Consuming all Fixes​

You can consume all of the latest fixes from your current Self-Managed Commerce version into your development branch.

  1. In the base folder of your customized ep-commerce source code, switch to master and pull the latest code.

    git checkout master
    git pull origin master
  2. Create a feature branch.

    git checkout -b [FIX_BRANCH]
    note

    Ensure that you replace [FIX_BRANCH] with a name that makes sense.

  3. Check to see if you have a Git remote named upstream pointing to the Elastic Path release repository. If you do not have this remote, run the following command:

    git remote add upstream git@code.elasticpath.com:ep-commerce/ep-commerce.git
  4. Fetch the latest upstream repository and merge.

    git fetch upstream
    git merge upstream/release/[EP_VERSION].x
    note

    Ensure that you replace [COMMIT_SHA] with the commit SHA of the fix that you want to consume.

  5. Address any merge conflicts, run all regression tests, and then push the changes back to your repository.

    git push origin [FIX_BRANCH]
  6. Use your source code control interface, such as GitHub, to create a pull request from the fix branch to master.

  7. Merge the pull request.

  8. Build and deploy the updated source code to your environments.

Cherry-Picking a Single Fix​

You can select a specific fix with the COMMIT_SHA number to consume in your development branch.

  1. In the base folder of your customized ep-commerce source code, switch to master and pull the latest code.

    git checkout master
    git pull origin master
  2. Create a feature branch.

    git checkout -b [FIX_BRANCH]
    note

    Ensure that you replace [FIX_BRANCH] with a name that makes sense for the fix you are consuming.

  3. Check to see if you have a Git remote named upstream pointing to the Elastic Path release repository. If you do not have this remote, run the following command:

    git remote add upstream git@code.elasticpath.com:ep-commerce/ep-commerce.git
  4. Fetch the latest release repository. Cherry-pick the fix into your feature branch.

    git fetch upstream
    git cherry-pick [COMMIT_SHA]
    note

    Ensure that you replace [COMMIT_SHA] with the commit SHA of the fix that you want to consume.

  5. Address any merge conflicts, run all regression tests, and then push the changes back to your repository.

    git push origin [FIX_BRANCH]
  6. Use your source code control interface, such as GitHub, to create a pull request from the fix branch to master.

  7. Merge the pull request.

  8. Build and deploy the updated source code to your environments.

Applying a Single Fix as a Patch​

You can apply specific fix as a patch into your development branch.

  1. Download the patch from code.elasticpath.com by browsing to the commit and adding .diff into the end of the URL.

  2. In the base folder of your customized ep-commerce source code, switch to master and pull the latest code.

    git checkout master
    git pull origin master
  3. Create a feature branch.

    git checkout -b [FIX_BRANCH]
    note

    Ensure that you replace [FIX_BRANCH] with a name that makes sense for the fix you are consuming.

  4. Apply the patch.

    patch -p1 < [PATCH_PATH]
    note

    Ensure that you replace [PATCH_PATH] with the local path of your downloaded patch.

  5. Address any merge conflicts, run all regression tests, and then push the changes back to your repository.

    git push origin [FIX_BRANCH]
  6. Use your source code control interface, such as GitHub, to create a pull request from the fix branch to master.

  7. Merge the pull request.

  8. Build and deploy the updated source code to your environments.

Troubleshooting​

If you are unsure if your team repository was cloned from code.elasticpath.com, use the following steps to help determine the origins. The steps guide you through an exercise to find a common Git ancestor with the official Elastic Path source repository. Based on the results, you an decide to follow the cherry-pick or consuming all patches approach.

  1. In the base folder of your customized ep-commerce source code, run the following command in your terminal:

    git log | grep 0ad7d866de02fd8f580a564845b8498d069a1706

    If the command returns the following result, follow the Cherry-pick instructions:

    commit 0ad7d866de02fd8f580a564845b8498d069a1706

    If the command returns no results, follow the Patch instructions.