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

fix: freeze dependencies in vault kv requirer #378

Closed
wants to merge 6 commits into from
Closed

Conversation

gruyaume
Copy link
Collaborator

@gruyaume gruyaume commented May 30, 2024

Description

Vault KV requirer was using a bad combination of requirements causing the issue with the logs below in the integration tests. Here we use pip-compile to pin the requirements of this charm.

Logs

unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install Traceback (most recent call last):
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install   File "/var/lib/juju/agents/unit-vault-kv-requirer-0/charm/./src/charm.py", line 10, in <module>
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install     from charms.vault_k8s.v0.vault_kv import (
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install   File "/var/lib/juju/agents/unit-vault-kv-requirer-0/charm/lib/charms/vault_k8s/v0/vault_kv.py", line 124, in <module>
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install     from interface_tester.schema_base import DataBagSchema  # type: ignore[import-untyped]
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install   File "/var/lib/juju/agents/unit-vault-kv-requirer-0/charm/venv/interface_tester/__init__.py", line 5, in <module>
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install     from interface_tester.interface_test import Tester
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install   File "/var/lib/juju/agents/unit-vault-kv-requirer-0/charm/venv/interface_tester/interface_test.py", line 16, in <module>
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install     from scenario import Context, Event, Relation, State, state
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install   File "/var/lib/juju/agents/unit-vault-kv-requirer-0/charm/venv/scenario/__init__.py", line 4, in <module>
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install     from scenario.context import ActionOutput, Context
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install   File "/var/lib/juju/agents/unit-vault-kv-requirer-0/charm/venv/scenario/context.py", line 13, in <module>
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install     from scenario.runtime import Runtime
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install   File "/var/lib/juju/agents/unit-vault-kv-requirer-0/charm/venv/scenario/runtime.py", line 20, in <module>
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install     from scenario.state import DeferredEvent, PeerRelation, StoredState
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install   File "/var/lib/juju/agents/unit-vault-kv-requirer-0/charm/venv/scenario/state.py", line 145, in <module>
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install     class CloudCredential:
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install   File "/var/lib/juju/agents/unit-vault-kv-requirer-0/charm/venv/scenario/state.py", line 160, in CloudCredential
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install     def _to_ops(self) -> ops.CloudCredential:
unit-vault-kv-requirer-0: 13:38:47 WARNING unit.vault-kv-requirer/0.install AttributeError: module 'ops' has no attribute 'CloudCredential'

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that validate the behaviour of the software
  • I validated that new and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@gruyaume gruyaume marked this pull request as ready for review May 30, 2024 18:26
@gruyaume gruyaume requested a review from a team as a code owner May 30, 2024 18:26
@gruyaume gruyaume changed the title fix: bump dependencies in vault kv requirer fix: freeze dependencies in vault kv requirer May 30, 2024
@gruyaume gruyaume marked this pull request as draft May 30, 2024 20:39
@gruyaume gruyaume closed this Jun 3, 2024
@gruyaume gruyaume deleted the dev-bugfix branch August 8, 2024 11:39
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 this pull request may close these issues.

1 participant