Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: pin terraform versions in CI #4645

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

lukemassa
Copy link
Contributor

what

Add a script to add versions.tf to all test dirs that pin all necessary providers; run the script.

why

Help with CI stability if providers are pinned.

Adding a script means that we can easily bump all versions simultaneously in the future if we need to.

tests

Ran CI.

references

close #4484.

@lukemassa lukemassa requested review from a team as code owners June 10, 2024 02:46
@lukemassa lukemassa requested review from chenrui333, nitrocode and X-Guardian and removed request for a team June 10, 2024 02:46
Copy link
Member

@chenrui333 chenrui333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me.

@chenrui333 chenrui333 merged commit a1f7e98 into runatlantis:main Jun 10, 2024
26 checks passed
@chenrui333
Copy link
Member

            <details><summary>Show Output</summary>
            
            ```
            running "/usr/local/bin/terraform init -input=false" in "/tmp/TestSimpleWorkflow_terraformLockFileModified_.terraform.lock.hcl_triggers_autoplan_1120627109/001/repos/runatlantis/atlantis-tests/2/default": exit status 1
            
            Initializing the backend...
            
            Initializing provider plugins...
            - Reusing previous version of hashicorp/null from the dependency lock file
            ╷
            │ Error: Failed to query available provider packages
            │ 
            │ Could not retrieve the list of available versions for provider
            │ hashicorp/null: locked provider registry.terraform.io/hashicorp/null 3.1.0
            │ does not match configured version constraint 3.2.2; must use terraform init
            │ -upgrade to allow selection of new versions
            ╵

caused some test failure, https://github.com/runatlantis/atlantis/actions/runs/9470306781/job/26091248454

@chenrui333
Copy link
Member

missed lockfile update 😅

provider "registry.terraform.io/hashicorp/null" {
version = "3.1.0"
constraints = "3.1.0"

@chenrui333
Copy link
Member

            <details><summary>Show Output</summary>
            
            ```
            running "/usr/local/bin/terraform init -input=false" in "/tmp/TestSimpleWorkflow_terraformLockFileModified_.terraform.lock.hcl_triggers_autoplan_1120627109/001/repos/runatlantis/atlantis-tests/2/default": exit status 1
            
            Initializing the backend...
            
            Initializing provider plugins...
            - Reusing previous version of hashicorp/null from the dependency lock file
            ╷
            │ Error: Failed to query available provider packages
            │ 
            │ Could not retrieve the list of available versions for provider
            │ hashicorp/null: locked provider registry.terraform.io/hashicorp/null 3.1.0
            │ does not match configured version constraint 3.2.2; must use terraform init
            │ -upgrade to allow selection of new versions
            ╵

caused some test failure, https://github.com/runatlantis/atlantis/actions/runs/9470306781/job/26091248454

this is handled by #4653 along with other fixes

terakoya76 pushed a commit to terakoya76/atlantis that referenced this pull request Dec 31, 2024
kvanzuijlen pushed a commit to kvanzuijlen/atlantis that referenced this pull request Jan 4, 2025
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.

Pin terraform versions in tests
3 participants