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

Backport of init: detect and report invalid submodules into v1.9 #35848

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

github-actions[bot]
Copy link
Contributor

Backport

This PR is auto-generated from #35839 to be assessed for backporting due to the inclusion of the label 1.9-backport.

🚨

Warning automatic cherry-pick of commits failed. If the first commit failed,
you will see a blank no-op commit below. If at least one commit succeeded, you
will see the cherry-picked commits up to, not including, the commit where
the merge conflict occurred.

The person who merged in the original PR is:
@liamcervante
This person should manually cherry-pick the original PR into a new backport PR,
and close this one when the manual backport PR is merged in.

merge conflict error: unable to process merge commit: "2a2410d1bcc04c5e977308e0826bbb39f3739534", automatic backport requires rebase workflow

The below text is copied from the body of the original PR.


This PR updates terraform init so that if a module source is requesting a subdirectory within a registry module, where the registry module itself does exist and is successfully downloaded but the subdirectory is missing, Terraform correctly highlights the missing subdirectory as the problem rather than a generic "This is a bug in Terraform" message.

Before

╷
│ Error: Unreadable module directory
│ 
│ The directory .terraform/modules/karpenter_fg_profile/modules/fargate_profile could not be read. This is a bug in Terraform and should be reported.
╵

After

╷
│ Error: Unreadable module subdirectory
│ 
│ The directory .terraform/modules/karpenter_fg_profile/modules/fargate_profile does not exist. The target submodule modules/fargate_profile does not exist within the target module.
╵

Fixes #35836

Target Release

1.9.x

Draft CHANGELOG entry

BUG FIXES

  • terraform init: Highlight missing subdirectories of registry modules in error message.

Overview of commits

@liamcervante
Copy link
Member

This cherry-pick is actually fine - it only failed the merge that was needed to make unrelated tests pass. These tests were never merged to this branch.

@liamcervante liamcervante marked this pull request as ready for review October 14, 2024 08:40
@liamcervante liamcervante merged commit 3831a08 into v1.9 Oct 16, 2024
6 checks passed
@liamcervante liamcervante deleted the backport/liamcervante/35836/namely-inspired-buck branch October 16, 2024 06:48
Copy link
Contributor Author

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

Copy link
Contributor Author

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant