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

Kpops is broken in the version 2.0.10 #373

Closed
irux opened this issue Oct 18, 2023 · 0 comments · Fixed by #376
Closed

Kpops is broken in the version 2.0.10 #373

irux opened this issue Oct 18, 2023 · 0 comments · Fixed by #376

Comments

@irux
Copy link
Contributor

irux commented Oct 18, 2023

Kpops doesn't work in version 2.0.10 anymore.

it is probably that this PR introduced something that brokes the interaction with helm #363 .

here is the stack trace:

Traceback (most recent call last):
  File "/root/.pyenv/versions/3.10.8/bin/kpops", line 8, in <module>
    sys.exit(app())
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/typer/main.py", line 328, in __call__
    raise e
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/typer/main.py", line 311, in __call__
    return get_command(self)(*args, **kwargs)
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/typer/core.py", line 778, in main
    return _main(
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/typer/core.py", line 216, in _main
    rv = self.invoke(ctx)
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/typer/main.py", line 683, in wrapper
    return callback(**use_params)  # type: ignore
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/kpops/cli/main.py", line 296, in deploy
    component.deploy(dry_run)
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/kpops/components/base_components/kafka_app.py", line 99, in deploy
    super().deploy(dry_run)
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/kpops/components/base_components/kubernetes_app.py", line 149, in deploy
    self.dry_run_handler.print_helm_diff(stdout, self.helm_release_name, log)
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/kpops/component_handlers/helm_wrapper/dry_run_handler.py", line 21, in print_helm_diff
    self._helm.get_manifest(helm_release_name, self.namespace)
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/kpops/component_handlers/helm_wrapper/helm.py", line 177, in get_manifest
    stdout = self.__execute(command=command)
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/kpops/component_handlers/helm_wrapper/helm.py", line 213, in __execute
    process = subprocess.run(
  File "/root/.pyenv/versions/3.10.8/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['helm', 'get', 'manifest', 'account-producer', '--namespace', 'kpops-alejandro']' returned non-zero exit status 
sujuka99 added a commit that referenced this issue Oct 23, 2023
fixes #373 

### Fix

> I am getting this error when I try to use dry-run:
subprocess.CalledProcessError: Command '['helm', 'get', 'manifest',
'account-producer', '--namespace', 'my-namespace']' returned non-zero
exit status 1. why? does he launch it first in dry-run ? when I do that
in my commandline I get
To learn more, consult
https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
Error: release: not found

The [problem came
from](2.0.9...2.0.10#diff-1ca7465daf9238dfe221304df636d96704ebf4935288b854a5c4c6b3ea9e3162R215)
setting `subproces.run(..., check = True)` without handling the raised
exception.


### Preventive measures

I took some imports out of `TYPE_CHECKING` blocks to avoid problems with
`pydantic` as it uses type hints at runtime


### Ruff

Updated to the latest (`0.1.1`) version. Now all fixes deemed unsafe
will not be automatically carried out even if it is possible to do so.
The user can choose to enable the unsafe autofixes with the
`--unsafe-fixes` flag


### Example

While testing I noticed that we could use the namespace env var in some
places in the example, so I did it and had to adjust the tests.
disrupted pushed a commit that referenced this issue Oct 25, 2023
fixes #373

> I am getting this error when I try to use dry-run:
subprocess.CalledProcessError: Command '['helm', 'get', 'manifest',
'account-producer', '--namespace', 'my-namespace']' returned non-zero
exit status 1. why? does he launch it first in dry-run ? when I do that
in my commandline I get
To learn more, consult
https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
Error: release: not found

The [problem came
from](2.0.9...2.0.10#diff-1ca7465daf9238dfe221304df636d96704ebf4935288b854a5c4c6b3ea9e3162R215)
setting `subproces.run(..., check = True)` without handling the raised
exception.

I took some imports out of `TYPE_CHECKING` blocks to avoid problems with
`pydantic` as it uses type hints at runtime

Updated to the latest (`0.1.1`) version. Now all fixes deemed unsafe
will not be automatically carried out even if it is possible to do so.
The user can choose to enable the unsafe autofixes with the
`--unsafe-fixes` flag

While testing I noticed that we could use the namespace env var in some
places in the example, so I did it and had to adjust the tests.
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

Successfully merging a pull request may close this issue.

1 participant