Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions actions/deploy-config-render-drift/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,16 @@ main() {
continue
fi

if cmp -s "${rendered_path}" "${committed_path}"; then
# Functional drift check: compare canonicalised YAML so formatting, key
# order, and comments do not register as drift, but real content changes
# do. This replaces exact byte matching without losing drift detection.
if diff -q \
<(yq -P 'sort_keys(..)' "${rendered_path}") \
<(yq -P 'sort_keys(..)' "${committed_path}") >/dev/null 2>&1; then
printf 'MATCH %s=%s\n' "${adapter}" "${TARGET_PATHS[$target_index]}"
else
printf 'DIFF %s=%s\n' "${adapter}" "${TARGET_PATHS[$target_index]}"
annotation error "deploy-config-schema render ${adapter} drifted from ${TARGET_PATHS[$target_index]}"
annotation error "deploy-config-schema render ${adapter} drifted from ${TARGET_PATHS[$target_index]} (semantic YAML comparison)"
drift_found=1
fi
done
Expand Down