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

using gcloud getting unexpected key_type for create_stack #303

Open
JasonL888 opened this issue Jan 13, 2025 · 0 comments
Open

using gcloud getting unexpected key_type for create_stack #303

JasonL888 opened this issue Jan 13, 2025 · 0 comments

Comments

@JasonL888
Copy link

steps to reproduce

  • install hastexo 8.2.0
  • only 1 provider (gcloud) in config.yml
  • in studio,
    • enable hastexo
    • add hastexo xblock to course unit
    • attempt to preview

error

  • getting exception
2025-01-13 15:08:29 2025-01-13 07:08:29,751 ERROR 14 [celery.app.trace] [user None] [ip None] trace.py:267 - Task hastexo.tasks.launch_stack_task[772ed4a3-6670-4046-bfd6-8e3195e2d6ae] raised unexpected: TypeError("GcloudProvider.create_stack() got an unexpected keyword argument 'key_type'")
2025-01-13 15:08:29 Traceback (most recent call last):
2025-01-13 15:08:29   File "/openedx/venv/lib/python3.11/site-packages/celery/app/trace.py", line 453, in trace_task
2025-01-13 15:08:29     R = retval = fun(*args, **kwargs)
2025-01-13 15:08:29                  ^^^^^^^^^^^^^^^^^^^^
2025-01-13 15:08:29   File "/openedx/venv/lib/python3.11/site-packages/celery/app/trace.py", line 736, in __protected_call__
2025-01-13 15:08:29     return self.run(*args, **kwargs)
2025-01-13 15:08:29            ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-13 15:08:29   File "/openedx/venv/lib/python3.11/site-packages/hastexo/tasks.py", line 254, in run
2025-01-13 15:08:29     stack_data = self.launch_stack(stack.provider)
2025-01-13 15:08:29                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-13 15:08:29   File "/openedx/venv/lib/python3.11/site-packages/hastexo/tasks.py", line 308, in launch_stack
2025-01-13 15:08:29     stack_data = self.try_all_providers()
2025-01-13 15:08:29                  ^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-13 15:08:29   File "/openedx/venv/lib/python3.11/site-packages/hastexo/tasks.py", line 355, in try_all_providers
2025-01-13 15:08:29     stack_data = self.try_provider(provider)
2025-01-13 15:08:29                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-13 15:08:29   File "/openedx/venv/lib/python3.11/site-packages/hastexo/tasks.py", line 461, in try_provider
2025-01-13 15:08:29     provider_stack = provider.create_stack(
2025-01-13 15:08:29                      ^^^^^^^^^^^^^^^^^^^^^^
2025-01-13 15:08:29 TypeError: GcloudProvider.create_stack() got an unexpected keyword argument 'key_type'

preliminary analysis

  • seems tasks.py always call provider.create_stack with key_type lines 460-464
                    logger.info("Creating stack [%s]." % self.stack_name)
                    provider_stack = provider.create_stack(
                        self.stack_name,
                        self.stack_run,
                        key_type=self.stack_key_type)
  • but Gcloud provider in provider.py line 666 doesn't have that argument
    def create_stack(self, name, run):
  • perhaps fix would be to add an unused key_type argument ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant