Fix lint and unit tests after the 16/edge merge#144
Draft
marceloneppel wants to merge 2 commits into
Draft
Conversation
- deps: declare the runtime packages the charm imports but pyproject was missing (requests, tomli, charmlibs-snap, charmlibs-interfaces-tls-certificates, charm-refresh); regenerate uv.lock - workload(k8s): implement the missing abstract K8sPaths.patroni_conf so the K8s charm can be instantiated - events: observe charm.on.postgresql_pebble_ready (was self.on) and pass the StatusObject .value to add/remove_status_if_present - managers(config): pass str(path) to _change_owner - managers(base)/core: type manager state as CharmState and narrow peer_relation data_interface/unit so ty resolves their attributes - test: declare the status-detail action and load actions.yaml in the unit harness so StatusHandler can observe it - style: apply ruff fix/format, fix a codespell typo, and rename ErrorSettingSystemPassword to SettingSystemPasswordError Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
…tive dep Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
After
16/edgewas merged intorefactor/start-and-install(already on the base branch),lintand the unit tests no longer passed: charm modules imported several undeclared dependencies, the K8s charm failed to instantiate, andtyreported type errors.Solution
This PR is only the follow-up fixes on top of the already-merged base:
postgresqlextra (requests,tomli,charmlibs-snap,charmlibs-interfaces-tls-certificates,charm-refresh,pydantic) and regenerateuv.lockfor them.K8sPaths.patroni_conf, observecharm.on.postgresql_pebble_ready, passStatusObject.valueto the status helpers,str()the path for_change_owner, and declare/load thestatus-detailaction in the unit harness.tydiagnostics (type managerstateasCharmState, narrowpeer_relationtypes) and applyruff/codespell fixes.tox -e lint,unit-vm(42 passed), andunit-k8s(43 passed) all pass.Checklist