Skip to content

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

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 by Andrei Pavel

Merge request reports