Skip to content

[Provider] - Internal server error when creating a new provider from GitHub #93

@matheusfenolio

Description

@matheusfenolio

Hello!

Trying to create a new provider from my private repository. I was able to list, and check against the GPG key, but now I'm getting 'Internal Server error'.

Terrareg version: 4.2.0
Environment: Docker
Github authentication: Token

terrareg  | /app/terrareg/database.py:887: SAWarning: nested transaction already deassociated from connection
terrareg  |   nested.rollback()
terrareg  | [2025-12-18 16:16:04,801] ERROR in app: Exception on /github/repositories/959332637/publish-provider [POST]
terrareg  | Traceback (most recent call last):
terrareg  |   File "/app/.venv/lib/python3.12/site-packages/flask/app.py", line 1823, in full_dispatch_request
terrareg  |     rv = self.dispatch_request()
terrareg  |          ^^^^^^^^^^^^^^^^^^^^^^^
terrareg  |   File "/app/.venv/lib/python3.12/site-packages/flask/app.py", line 1799, in dispatch_request
terrareg  |     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
terrareg  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
terrareg  |   File "/app/.venv/lib/python3.12/site-packages/flask_restful/__init__.py", line 467, in wrapper
terrareg  |     resp = resource(*args, **kwargs)
terrareg  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
terrareg  |   File "/app/.venv/lib/python3.12/site-packages/flask/views.py", line 107, in view
terrareg  |     return current_app.ensure_sync(self.dispatch_request)(**kwargs)
terrareg  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
terrareg  |   File "/app/.venv/lib/python3.12/site-packages/flask_restful/__init__.py", line 582, in dispatch_request
terrareg  |     resp = meth(*args, **kwargs)
terrareg  |            ^^^^^^^^^^^^^^^^^^^^^
terrareg  |   File "/app/terrareg/auth_wrapper.py", line 48, in wrapper
terrareg  |     return func(*args, **kwargs)
terrareg  |            ^^^^^^^^^^^^^^^^^^^^^
terrareg  |   File "/app/terrareg/server/error_catching_resource.py", line 52, in post
terrareg  |     return self._post(*args, **kwargs)
terrareg  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
terrareg  |   File "/app/terrareg/server/api/github/github_repository_publish_provider.py", line 108, in _post
terrareg  |     versions = provider.refresh_versions(limit=1)
terrareg  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
terrareg  |   File "/app/terrareg/provider_model.py", line 395, in refresh_versions
terrareg  |     provider_extractor.process_version()
terrareg  |   File "/app/terrareg/provider_extractor.py", line 114, in process_version
terrareg  |     self.extract_documentation()
terrareg  |   File "/app/terrareg/provider_extractor.py", line 179, in extract_documentation
terrareg  |     with self._obtain_source_code() as source_dir:
terrareg  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^
terrareg  |   File "/usr/local/lib/python3.12/contextlib.py", line 137, in __enter__
terrareg  |     return next(self.gen)
terrareg  |            ^^^^^^^^^^^^^^
terrareg  |   File "/app/terrareg/provider_extractor.py", line 149, in _obtain_source_code
terrareg  |     os.rename(
terrareg  | FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpqvq2e0qt/matheus/matheus-org-terraform-provider-matheus-92aba16' -> '/tmp/tmpqvq2e0qt/matheus/terraform-provider-matheus'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions