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

Issue building modules #2097

Closed
wyardley opened this issue Sep 14, 2024 · 1 comment
Closed

Issue building modules #2097

wyardley opened this issue Sep 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@wyardley
Copy link
Contributor

wyardley commented Sep 14, 2024

TL;DR

I started getting the following error on OS X when running make build or make docker_generate_modules`

Since it's all in Docker (I think from https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit?), debugging this or getting any more information on what's going wrong is a little challenging.

Edit: I eventually made the problem go away by removing the repo and re-cloning. However, git status hadn't shown any unexpected files present 🤷

Expected behavior

No response

Observed behavior

docker run --rm -it \
                -v "/Users/wby/git/terraform-google-kubernetes-engine":/workspace \
                gcr.io/cloud-foundation-cicd/cft/developer-tools:1.22 \
                /bin/bash -c 'source /usr/local/bin/task_helper_functions.sh && generate_modules'
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Traceback (most recent call last):
  File "/usr/local/bin/generate_modules.py", line 80, in <module>
    main(sys.argv)
  File "/usr/local/bin/generate_modules.py", line 53, in main
    template = env.get_template(template_file)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/jinja2/environment.py", line 1013, in get_template
    return self._load_template(name, globals)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/jinja2/environment.py", line 972, in _load_template
    template = self.loader.load(self, name, self.make_globals(globals))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/jinja2/loaders.py", line 126, in load
    source, filename, uptodate = self.get_source(environment, name)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/jinja2/loaders.py", line 210, in get_source
    contents = f.read()
               ^^^^^^^^
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xda in position 17: invalid continuation byte
Running terraform fmt

Terraform Configuration

Terraform Version

Additional information

The platform warning has been ongoing for a bit - not sure if a PR to add an explicit --platform=linux/amd64 would break things for users on any other platforms.

@wyardley wyardley added the bug Something isn't working label Sep 14, 2024
@wyardley
Copy link
Contributor Author

@apeabody just FYI. I'm closing this since I did manage to resolve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant