Skip to content

Optimize: Skip module resolution if Puppetfile matches upstream#243

Open
xorpaul wants to merge 1 commit intomasterfrom
optimize_branch
Open

Optimize: Skip module resolution if Puppetfile matches upstream#243
xorpaul wants to merge 1 commit intomasterfrom
optimize_branch

Conversation

@xorpaul
Copy link
Owner

@xorpaul xorpaul commented Jan 21, 2026

When updating a control repository, if the Puppetfile in the upstream commit is identical to the one currently deployed, we can skip the expensive module resolution and extraction steps.

This change:

  1. Calculates SHA256 checksums of the deployed Puppetfile and the upstream Puppetfile content (retrieved via git show).
  2. Signals a match via the needSyncEnvs map.
  3. Checks this signal in resolvePuppetfile() to bypass module processing unless -force is used.

This significantly speeds up deployments where only control repository content (like manifests or hiera data) changes but module dependencies remain static.

Fixes #233

When updating a control repository, if the Puppetfile in the upstream
commit is identical to the one currently deployed, we can skip the
expensive module resolution and extraction steps.

This change:
1. Calculates SHA256 checksums of the deployed Puppetfile and the
   upstream Puppetfile content (retrieved via git show).
2. Signals a match via the needSyncEnvs map.
3. Checks this signal in resolvePuppetfile() to bypass module processing
   unless -force is used.

This significantly speeds up deployments where only control repository
content (like manifests or hiera data) changes but module dependencies
remain static.

Fixes #233
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

optimize -branch codepath to skip updating modules unless Puppetfile has changed

1 participant