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

remove lockfiles #179

Merged
merged 3 commits into from
Jan 9, 2024
Merged

remove lockfiles #179

merged 3 commits into from
Jan 9, 2024

Conversation

etcart
Copy link
Collaborator

@etcart etcart commented Dec 18, 2023

this pr assumes that lockfiles

  • cumulus/.terraform.lock.hcl
  • data-persistence/.terraform.lock.hcl
  • tf/.terraform.lock.hcl

were added in error
this is because they are not present in previous releases, nor a part of any release notes

and this pr removes them

gjclark
gjclark previously approved these changes Dec 20, 2023
@gjclark gjclark self-requested a review December 20, 2023 18:40
@gjclark
Copy link

gjclark commented Dec 20, 2023

Apologies, please disregard my review.

@mattp0
Copy link
Contributor

mattp0 commented Dec 20, 2023

Hello @etcart
Can you describe the error you are having in more detail? The lock files are a way to ensure a provider version is pinned.
https://developer.hashicorp.com/terraform/language/files/dependency-lock
I do not believe they were added erroneously. Generally the code that is added has been tested.

@mattp0
Copy link
Contributor

mattp0 commented Dec 20, 2023

Here is a bit more context on the lockfiles from a good stack overflow post https://stackoverflow.com/questions/67963719/should-terraform-lock-hcl-be-included-in-the-gitignore-file

@etcart etcart dismissed gjclark’s stale review December 20, 2023 18:50

asked to disregrad

@mattp0
Copy link
Contributor

mattp0 commented Dec 20, 2023

Are you seeing a checksum not matching error?

@etcart
Copy link
Collaborator Author

etcart commented Dec 20, 2023

the error we are getting is

Error: Resource instance managed by newer provider version
The current state of aws_cloudwatch_event_rule.background_job_queue_watcher
was created by a newer provider version than is currently selected. Upgrade
the aws provider to work with this state.

this occuring as we are updating from v17.0.0.2, which does not have lockfiles coming from cirrus-core, to v18.0.0.0, which has lockfiles coming from cirrus-core, but not cirrus-daac.
because we have been on an unlocked version of cirrus, we have deployed with aws provider version 5.31, which now isn't workable when we have to downgrade to aws provider version 5.20

@mattp0
Copy link
Contributor

mattp0 commented Dec 20, 2023

the error we are getting is

Error: Resource instance managed by newer provider version
The current state of aws_cloudwatch_event_rule.background_job_queue_watcher
was created by a newer provider version than is currently selected. Upgrade
the aws provider to work with this state.

this occuring as we are updating from v17.0.0.2, which does not have lockfiles coming from cirrus-core, to v18.0.0.0, which has lockfiles coming from cirrus-core, but not cirrus-daac. because we have been on an unlocked version of cirrus, we have deployed with aws provider version 5.31, which now isn't workable when we have to downgrade to aws provider version 5.20

OK. I think this covers and edge case that maybe we werent expecting. Have you been able to confirm that this branch now deploys? In your CI you should be able to point to this feature branch instead of the release ref.

@etcart
Copy link
Collaborator Author

etcart commented Dec 20, 2023

precisely, by pointing to this branch we're working just fine

@etcart
Copy link
Collaborator Author

etcart commented Dec 20, 2023

if the intention is to lock to aws provider 5.20, shouldn't it be set in the provider.tf file? and also be set in the relevant release of CIRRUS-DAAC as well as CIRRUS-core?

@mattp0 mattp0 mentioned this pull request Dec 20, 2023
Copy link
Contributor

@reweeden reweeden left a comment

Choose a reason for hiding this comment

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

You should add *.lock.hcl to the .gitignore to prevent the files from being added accidentally.

.gitignore Outdated
@@ -21,3 +21,4 @@ workflows
scripts/**/*.log
.container_bash_history
.venv
*.lock.hcl
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing newline at end of file

@etcart etcart merged commit 8632f9b into master Jan 9, 2024
2 checks passed
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.

None yet

5 participants