Repository navigation
[stack] Take a pinned version without resolving it - #1
Closed
benlangfeld wants to merge 1 commit into
Closed
benlangfeld wants to merge 1 commit into
benlangfeld wants to merge 1 commit into
Conversation
determine_version fetches the release index as its first statement and loads the module a few lines later, both before anything has looked at what the version actually needs. When the version is pinned exactly there is nothing to resolve, and loading the module means parsing every file in it. Decide it from what can be read cheaply instead. Only files mentioning required_version, backend or cloud can say whether the version is pinned, so parsing those answers it - on a real 245 file module that is 1.7s rather than 32s, and the release index is not fetched at all. The order sources are considered in is unchanged, which is what the gating is for. A remote or cloud backend means the workspace version outranks the pin, so the shortcut is skipped and the usual resolution runs. An exact required_version otherwise wins, as it already would. Only when the module requires nothing does the environment get a say, and then only if no version file is present, since those outrank it too. Constraints are untouched - a range still needs the available versions, so it still fetches them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review view for dflook/terraform-github-actions#446, showing only its own changes.
GitHub requires a pull request's base branch to exist in the base repository, so a fork's PR cannot be based on another of that fork's branches. Upstream, dflook#446 is therefore opened against
mainand its diff includes #444, which it builds on.This PR is the same head branch based on the dflook#444 branch, so the diff here is the increment alone — 4 files, +255, no changes to
terraform/module.pyorterraform_backend/.Not for merging. It exists so the incremental change can be read and commented on; discussion belongs on dflook#446. It closes itself once dflook#444 merges upstream and dflook#446 is rebased, at which point the upstream diff becomes this one.