Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Once a file has been moved to the archive folder it should no longer be modified. In the event that a file is updated in the archive folder there are a could couple of methods for fixing.

Archive files have been modified error

...

  1. On the packaging branch, find the commitID where the archive file was modified.

    1. This commitID should be present in the log in the section PACKAGING ORDER FOR COMMIT FILES.

    2. Image Removed

    In the ddb repo, update the deployPackager.properties file <branch>.sqlScmLastImportID to use the commitID from step 1.

    1. Image Added
      1. If there are changes after the

      step 1
      1. above commitID dependent on changes between the last time Packager successfully packaged

      and the step 1 commitID
      1. , just use the last commitID on the branch.

  2. In the ddb repo, update the deployPackager.properties file <branch>.sqlScmLastImportID to use the commitID from step 1.

    1. The existing <branch>.sqlScmLastImportID in the deployPackager.properties is the last time Packager ran successfully. This should also match the most recent “Datical automatic check-in” message if you are looking at the git commit log.

  3. Run a Packaging job.

  4. You will need to make small changes (eg. add a space) to any SQL files that were modified since the last time Packager ran successfully and the commitID you used in step 2 in order for Packager to pick up the changes and process them.

    1. Commit these small changes to source control.

  5. Run a Packaging job again to pick up the changes from all the SQL files modified in step 4.

Info

Note: This method is not recommended for projects with multiple pipelines that are merged into one branch from another, eg. develop → qa → stress → prod. In this case, each pipeline branch would need to have the sqlScmLastImportID updated after each merge from the lower branch until the problem was resolved across all pipelines.

Method 2: Update the Packager branch to be based on commit prior to archive update

...

  1. On the packaging branch, find the commitID prior to when the archive file was modified.

    1. This commit containing the modified archive file should be present in the log in the section PACKAGING ORDER FOR COMMIT FILES.

    2. Image RemovedImage Added

      Look in SCM commit history or use ‘git log’ to find the commit prior to the archive file commit.

  2. Rename the existing packaging branch to eg. <branch>-archive. Instructions:

    1. Code Block
      git checkout <branch>
      git branch -m <branch>-archive
      git push origin -u <branch>-archive
      git push origin --delete <branch>

  3. Create a new git branch from the commitID found in step 1. Use the original branch name. Instructions:

    1. Code Block
      git checkout <branch>-archive
      git checkout -b <branch> <commit_id_prior_to_commit_where_archive_file_was_modified>
      git push origin -u <branch>

    2. You should not need to update the deployPackager.properties <branch>.sqlScmLastImportID as you do in Method 1. That commitID should still be present in the branch you’ve just created.

  4. Run a Packaging job. It should be successful now where no changes were found to package.

  5. Any SQL file changes made after the commitID will no longer be in the branch. They will needed to be added back. The <branch>-archive branch should be available for reference.

  6. Commit back to source control after adding back the changes and run Packaging job again.