Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Kea Kea
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 514
    • Issues 514
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 48
    • Merge requests 48
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • KeaKea
  • Merge requests
  • !1507

Merged
Created Nov 24, 2021 by Andrei Pavel@andrei🐧Maintainer

Resolve "CI job to detect that dhcpdb_create scripts and upgrade scripts are in sync"

  • Overview 13
  • Commits 1
  • Changes 2

Closes #2205 (closed).

Multiple ways to run the script. When run without parameters, the logic is:

  1. Look at all the changed files in src/share/database/scripts.
  2. If it is a dhcpdb_create script.
    1. Then compare it with the latest upgrade script, but only the common sections.
  3. If it is an upgrade script.
    1. Then compare it with dhcpdb_create, but only the common sections.

The common sections are decided based on the python difflib's library.

Please ask me to regenerate the CI image before you review. It needs python3 installed as you may have noticed in the CI results.

Disclaimers:

  • line numbers cannot be easily shown because of how python difflib works
  • you might be tempted to test by adding something to the end of a dhcpdb_create script. This will not work because that is outside of the common sections. Add to a common section instead.
Edited Jan 21, 2022 by Andrei Pavel
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: 2205-ci-job-to-detect-that-dhcpdb_create-scripts-and-upgrade-scripts-are-in-sync