Skip to content

Taking temporary fix for a defect in core file(s)

Overview

When a defect has been identified in core files after applying a service update or release update, the recommended process is to apply the next service update which includes the fix as well. However, there can be a scenario where the customer needs to apply the fix urgently due to the business urgency. This section explains the steps to follow in such scenario.

Applying the Fix to the customer solution repository

  1. Clone customer-solution repository.
    git clone <cutomization_repo_url>
  2. Change directory to the cloned folder.
    cd customer-solution
  3. Create and checkout a topic branch
    If defect was detected while applying a service update to the build place use the below command to create the topic branch based on master branch
    git checkout -b <topic_branch_name>
    If defect was detected while applying a release update or while applying service update in Release Studio use the below command to create the topic branch based on release-update branch
    git checkout -b <topic_branch_name> origin/release-update
  4. Follow the below steps to commit the original file only if the defect was detected while applying a 22.2 or higher release update or while applying 22.2 or higher service update in Release Studio

    1. Download the core code zip file from Release Studio. The name of the download button will contain the customer-solution repository version.

      download-cs-core-code
      Figure 1.1 - Download Core Code
    2. Unzip it and find the original version of the core file(s) that needs to have the fix.

    3. Create a directory structure similar to that of the above file(s) directory path, inside the cloned customization project folder.

      folder-structure
      Figure 1.2 - Folder Structure
    4. Add a copy of the downloaded file(s) which need to have the fix, to the directory structure created above.

    5. Commit the original version of the files

      git add .

      git commit -m "commit_message"

  5. Copy and replace the original version of the file(s) with the file(s) with having the fix (Make sure that file(s) contain only the required fix and does not include any other changes)

  6. Commit the file(s) with the fix and push changes to the remote branch

    git add .

    git commit -m "commit_message"

    git push origin <topic_branch_name>

  7. Create a Pull Request to merge the changes to the customer-solution repository master/release-update branch

  8. Approve and merge the changes

Note

If the defect was detected while applying a 22.2 or higher release update or while applying 22.2 or higher service update in Release Studio,

After applying a fix to customer solution repository, it is required to verify whether there is a difference between the corresponding file in the baseline delivery tag and the head revision in the release-update branch.

If there are differences, correct version of the file will be picked for the release update delivery.

If no difference found, customer should do a dummy change (e.g.: Adding a new line) and commit and merge. This activity has to be done prior to ordering the sanity. This is to avoid picking files corresponds to release update version instead of the files with the fix when creating the delivery. Please follow below steps in such scenario,

  1. Checkout to the release-update branch and update the local git repository

    git checkout release-update

    git pull

  2. Get the list of changed files

    git diff --name-only --diff-filter=ACMR <delivery tag> "./changed-files-list.txt" (e.g.: git diff --name-only --diff-filter=ACMR del-ifs-cloud-22.1.4-ncocu02-2.9.0-20230619T040143Z-OK > "./changed-files-list.txt")

  3. Open the changed-files-list.txt file and check whether all the files commited for fixing the defect in core are listed.

  4. If any file is not listed checkout to the topic branch. (If the previous topic branch is deleted, create a new topic branch and chekout to that topic branch)

    git checkout <topic_branch_name>

  5. Open each file that is not listed, in a text editor and add a new line

  6. Commit the file(s) with the fix and push changes to the remote branch

    git add .

    git commit -m "commit_message"

    git push origin <topic_branch_name>

  7. Create a Pull Request to merge the changes to the customer-solution repository release-update branch

  8. Approve and merge the changes