[GH-ISSUE #51] Unable to clone versioned modules #23

Closed
opened 2026-05-06 12:36:17 +02:00 by BreizhHardware · 11 comments

Originally created by @bengels00 on GitHub (Aug 23, 2023).
Original GitHub issue: https://github.com/patrickchugh/terravision/issues/51

When trying to clone https://module?ref=foo, terravision errors while cloning without appending ?ref=foo to the URL works.
Example:

Loading Sources..
  Downloading External Module: git::https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/terraform-module-cloudwatch-sharing?ref=1.0
    Cloning from Terraform registry source: https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/terraform-module-cloudwatch-sharing?ref=1.0
0it [00:00, ?it/s]
ERROR: Unable to call Git to clone repository! Check git and SSH fingerprints and keys are correct and ensure the URL https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/terraform-module-cloudwatch-sharing?ref=1.0 is reachable via CLI.

Originally created by @bengels00 on GitHub (Aug 23, 2023). Original GitHub issue: https://github.com/patrickchugh/terravision/issues/51 When trying to clone https://module?ref=foo, terravision errors while cloning without appending _?ref=foo_ to the URL works. Example: ``` Loading Sources.. Downloading External Module: git::https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/terraform-module-cloudwatch-sharing?ref=1.0 Cloning from Terraform registry source: https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/terraform-module-cloudwatch-sharing?ref=1.0 0it [00:00, ?it/s] ERROR: Unable to call Git to clone repository! Check git and SSH fingerprints and keys are correct and ensure the URL https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/terraform-module-cloudwatch-sharing?ref=1.0 is reachable via CLI. ```
Author
Owner

@patrickchugh commented on GitHub (Aug 23, 2023):

Thanks this will be fixed soon

<!-- gh-comment-id:1689413643 --> @patrickchugh commented on GitHub (Aug 23, 2023): Thanks this will be fixed soon
Author
Owner

@patrickchugh commented on GitHub (Aug 26, 2023):

@bengels00 Can you git pull the latest code and try again with my latest fix?

<!-- gh-comment-id:1694324954 --> @patrickchugh commented on GitHub (Aug 26, 2023): @bengels00 Can you git pull the latest code and try again with my latest fix?
Author
Owner

@bengels00 commented on GitHub (Aug 26, 2023):

@patrickchugh Getting our modules with ?ref=xyz suffix works now, nice! But now I'm stumbling over the following issue:

[...]
Loading Sources..
  Downloading External Module: github.com/terraform-aws-modules/terraform-aws-vpc?ref=v3.2.0
    Assuming Terraform Enterprise API Server URL: https://github.com/api/registry/v1/modules/

ERROR: No TFE_TOKEN environment variable set. Unable to authorise with Terraform Enterprise Server

(We don't use terraform enterprise at all.)

<!-- gh-comment-id:1694347857 --> @bengels00 commented on GitHub (Aug 26, 2023): @patrickchugh Getting our modules with ?ref=xyz suffix works now, nice! But now I'm stumbling over the following issue: ``` [...] Loading Sources.. Downloading External Module: github.com/terraform-aws-modules/terraform-aws-vpc?ref=v3.2.0 Assuming Terraform Enterprise API Server URL: https://github.com/api/registry/v1/modules/ ERROR: No TFE_TOKEN environment variable set. Unable to authorise with Terraform Enterprise Server ``` (We don't use terraform enterprise at all.)
Author
Owner

@patrickchugh commented on GitHub (Aug 26, 2023):

Updated the code, can you try again?

<!-- gh-comment-id:1694397286 --> @patrickchugh commented on GitHub (Aug 26, 2023): Updated the code, can you try again?
Author
Owner

@patrickchugh commented on GitHub (Aug 26, 2023):

@bengels00 The issue was the missing "http" prefix

<!-- gh-comment-id:1694397364 --> @patrickchugh commented on GitHub (Aug 26, 2023): @bengels00 The issue was the missing "http" prefix
Author
Owner

@bengels00 commented on GitHub (Aug 26, 2023):

@patrickchugh well, module downloading went like a charm, now.
Unfortunately the python process is taking ~100% CPU since more than 20 minutes and has not come to some result

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                                                                                                  
  56324 bj        20   0  500240  54488  14848 R  99.7   0.3  22:44.57 python                       
<!-- gh-comment-id:1694407475 --> @bengels00 commented on GitHub (Aug 26, 2023): @patrickchugh well, module downloading went like a charm, now. Unfortunately the python process is taking ~100% CPU since more than 20 minutes and has not come to some result ``` PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 56324 bj 20 0 500240 54488 14848 R 99.7 0.3 22:44.57 python ```
Author
Owner

@bengels00 commented on GitHub (Aug 26, 2023):

Module downloading is fixed.

<!-- gh-comment-id:1694408096 --> @bengels00 commented on GitHub (Aug 26, 2023): Module downloading is fixed.
Author
Owner

@patrickchugh commented on GitHub (Aug 26, 2023):

It's probably an infinite loop and the logic interpreter has hung. If you can share the Terraform files you are using I can try to fix it ?

<!-- gh-comment-id:1694427831 --> @patrickchugh commented on GitHub (Aug 26, 2023): It's probably an infinite loop and the logic interpreter has hung. If you can share the Terraform files you are using I can try to fix it ?
Author
Owner

@patrickchugh commented on GitHub (Aug 26, 2023):

@bengels00 you can remove any sensitive data if needed or just share the source for the last module it hung on

<!-- gh-comment-id:1694428040 --> @patrickchugh commented on GitHub (Aug 26, 2023): @bengels00 you can remove any sensitive data if needed or just share the source for the last module it hung on
Author
Owner

@bengels00 commented on GitHub (Aug 26, 2023):

@patrickchugh I'd love helping to dig deeper into this, but the tf code is ~6k lines, ~250 resources, multiple times calling sub-modules, with resource names and filenames pointing to the name of our customer, the software they're using etc.
I can't even exactly identify in which module it's hanging. terravision is processing aws_ecs_service._ but that's a resource being created in 6 different module invocations and I don't see which invocation is the affected one. If I'd knew which one it is, I'd clean up the relevant terraform parts from customer references/sensitive data and supply them.

<!-- gh-comment-id:1694501437 --> @bengels00 commented on GitHub (Aug 26, 2023): @patrickchugh I'd love helping to dig deeper into this, but the tf code is ~6k lines, ~250 resources, multiple times calling sub-modules, with resource names and filenames pointing to the name of our customer, the software they're using etc. I can't even exactly identify in which module it's hanging. terravision is processing ```aws_ecs_service._``` but that's a resource being created in 6 different module invocations and I don't see which invocation is the affected one. If I'd knew which one it is, I'd clean up the relevant terraform parts from customer references/sensitive data and supply them.
Author
Owner

@patrickchugh commented on GitHub (Aug 27, 2023):

@bengels00 let me work on a fix that tells you the offending line and resources. Will get back to you soon

<!-- gh-comment-id:1694587647 --> @patrickchugh commented on GitHub (Aug 27, 2023): @bengels00 let me work on a fix that tells you the offending line and resources. Will get back to you soon
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/terravision#23
No description provided.