Include normalized defaults in checksum calculation for Ci::JobDefinition

Problem

Currently, we generate the checksum for Ci::JobDefinition before setting normalized column default values (like interruptible). This could be problematic if we decide to change a column default value in the future.

In such a scenario, we could have a new job pointing to a job_definition with a matching checksum but an old (incorrect) default value.

Proposal

Generate the checksum after setting default values and include those defaults in the hash used for checksum generation. This ensures we capture the exact state of all attributes, making the checksum more reliable for deduplication.

Implementation approach

  • Apply normalized defaults (like interruptible) before checksum generation
  • Include these defaults in the checksum calculation
  • Gate the new behavior by partition ID and feature flag for GitLab.com
  • Self-managed instances use the new approach immediately
Edited by 🤖 GitLab Bot 🤖