Current Behavior:
Currently, Harness resolves application artifacts by a specific commit/tag, but resolves Git-backed Harness entities (like Services, Environments, and Service Overrides) based on the configured Git branch (e.g., main).
The Problem:
Because Git-backed entities are fetched from the branch HEAD rather than the specific commit being deployed, it breaks atomic deployments. If we deploy an older commit (e.g., during a rollback or a delayed pipeline execution), Harness pairs the older application code with the newest Service Overrides from main.
If the newer configuration is incompatible with the older code (e.g., routing to infrastructure that doesn't exist in the older code's context), it instantly degrades the service or causes a production outage. We have experienced multiple incidents due to this mismatch.
Desired Behavior:
We need the ability to pin Git-backed entities to the exact Git commit SHA that is being deployed.
Ideal Solution: A pipeline configuration option to "Sync Git-backed entities with Artifact Commit SHA." When enabled, Harness would fetch the yaml definitions for Services, Environments, and Overrides exactly as they existed at the commit tied to the application artifact, ensuring complete configuration-as-code parity.