Comparing main...dk_fix_empty_changes · innogames/serveradmin · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: innogames/serveradmin
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: innogames/serveradmin
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dk_fix_empty_changes
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 7 files changed
  • 1 contributor

Commits on Oct 20, 2026

  1. Configuration menu
    Copy the full SHA
    e542d38 View commit details
    Browse the repository at this point in the history
  2. fix(serverdb): drop no-op attribute changes before applying a commit

    Clients committing values where nothing changed such as for example
    memory: 8912 => 8192 have created and entry in the history.
    
    The adminapi client was nice enough to filter these out but others such
    as the Powershell one or the Puppet (Ruby) one not.
    
    We should not rely on the client to send us valid data even if this is
    not security relevant. There is now a check in place to check for noop
    changes and filter them out server side.
    kofrezo committed Oct 20, 2026
    Configuration menu
    Copy the full SHA
    def7650 View commit details
    Browse the repository at this point in the history
  3. feat(serverdb): add cleanup_noop_changes management command

    Add a Django command to clean up the no-op changes caused before this
    fix. They provide no value to the history and can safely be dropped.
    
    A fix preveting with the no-op changes caused by type mismatch
    e.g. memory: "8" => 8 (string, integer) will follow.
    kofrezo committed Oct 20, 2026
    Configuration menu
    Copy the full SHA
    b7199e1 View commit details
    Browse the repository at this point in the history
  4. fix(serverdb): cast committed values to the attribute type

    Clients may send numbers and booleans as strings. The committer passed
    them on untyped, so memory: 8192 => "8192" was treated as a change,
    logged with the string in the changelog and, for booleans, the string
    "false" was stored as true because the boolean model only checks
    truthiness. This is the source of 2.17 million bogus changelog entries
    that the no-op filter could not catch.
    
    Cast the values of update, new and multi changes to the attribute type
    right after validation, before the no-op filter, storage and logging.
    Only number and boolean attributes need it, other types are stored from
    their string form anyway. Invalid strings now fail early with a
    ValidationError naming the attribute instead of in the model's
    full_clean.
    kofrezo committed Oct 20, 2026
    Configuration menu
    Copy the full SHA
    b4189c3 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2026

  1. fix(serverdb): do not log deleting an attribute that is not set

    Clearing an unset attribute in the servershell sends a delete action
    with old = null. Validation accepts it because the stored value is null
    as well, nothing gets deleted, but a ChangeCommit and a Change row were
    still written.
    kofrezo committed Oct 21, 2026
    Configuration menu
    Copy the full SHA
    e85ccbf View commit details
    Browse the repository at this point in the history
Loading