DataBiosphere / azul

Metadata indexer and query service used for AnVIL, HCA, LungMAP, and CGP
Apache License 2.0
7 stars 2 forks source link

Dev GitLab deploy stage failed because `terraform -version` output failed to parse #3154

Open jessebrennan opened 3 years ago

jessebrennan commented 3 years ago

This happened only once, and retrying the build succeeded. https://gitlab.dev.singlecell.gi.ucsc.edu/ucsc/azul/-/jobs/22291

terraform init
Initializing the backend...
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.
Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "google" (hashicorp/google) 2.20.3...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.70.0...
- Downloading plugin for provider "template" (hashicorp/template) 2.2.0...
- Downloading plugin for provider "null" (hashicorp/null) 2.1.2...
Warning: registry.terraform.io: This version of Terraform has an outdated GPG key and is unable to verify new provider releases. Please upgrade Terraform to at least 0.12.31 to receive new provider updates. For details see: https://discuss.hashicorp.com/t/hcsec-2021-12-codecov-security-event-and-hashicorp-gpg-key-exposure/23512
Warning: registry.terraform.io: This version of Terraform has an outdated GPG key and is unable to verify new provider releases. Please upgrade Terraform to at least 0.12.31 to receive new provider updates. For details see: https://discuss.hashicorp.com/t/hcsec-2021-12-codecov-security-event-and-hashicorp-gpg-key-exposure/23512
Warning: registry.terraform.io: This version of Terraform has an outdated GPG key and is unable to verify new provider releases. Please upgrade Terraform to at least 0.12.31 to receive new provider updates. For details see: https://discuss.hashicorp.com/t/hcsec-2021-12-codecov-security-event-and-hashicorp-gpg-key-exposure/23512
Warning: registry.terraform.io: This version of Terraform has an outdated GPG key and is unable to verify new provider releases. Please upgrade Terraform to at least 0.12.31 to receive new provider updates. For details see: https://discuss.hashicorp.com/t/hcsec-2021-12-codecov-security-event-and-hashicorp-gpg-key-exposure/23512
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
2021-06-17 00:25:15,551 INFO    MainThread: Running ['terraform', '-version']
2021-06-17 00:25:18,597 INFO    MainThread: Terraform output:
Terraform v0.12.24
+ provider.aws v2.70.0
+ provider.google v2.20.3
+ provider.null v2.1.2
+ provider.template v2.2.0
Traceback (most recent call last):
  File "/builds/ucsc/azul/scripts/terraform_schema.py", line 40, in <module>
    commands[arguments.command]()
  File "/builds/ucsc/azul/scripts/terraform_schema.py", line 22, in check_schema
    if schema.versions != terraform.versions:
  File "/build/.venv/lib/python3.8/site-packages/boltons/cacheutils.py", line 610, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/builds/ucsc/azul/src/azul/terraform.py", line 112, in versions
    versions, footer = output.split('\n\n')
ValueError: not enough values to unpack (expected 2, got 1)
Run 'make update_schema'.
make: *** [Makefile:80: check_schema] Error 1
make: Leaving directory '/builds/ucsc/azul/terraform'
Cleaning up file based variables 00:01
ERROR: Job failed: exit code 1
theathorn commented 3 years ago

@hannes-ucsc "We should make the parsing of Terraform output more resilient"