Skip to content

[MISC] Miscellaneous cleanups#256

Merged
astrojuanlu merged 11 commits into8.4/edgefrom
juanlu/misc-cleanups
Apr 22, 2026
Merged

[MISC] Miscellaneous cleanups#256
astrojuanlu merged 11 commits into8.4/edgefrom
juanlu/misc-cleanups

Conversation

@astrojuanlu
Copy link
Copy Markdown
Contributor

Issue

Ended up accumulating lots of cleanups in #87, so I decided to send a separate pull request:

Note: This does not include adapting to the new backup helpers, because it turns out those need a writable temporary directory. Instead of introducing some interim hack, I prefer to do both adaptation + separation of storage in a single PR.

Main changes:

  • Fix backup methods in VM and K8s child classes so that they have a compatible signature with the parent class
  • Fix type hints of TLS handling code (see also [MISC] Fix tls_ca_chain type object-storage-integrator#170)
  • Visually separate TLS handling in backups code
    • This introduces some repeated error handling, with the benefit of improved readability
  • Make Ceph backup test amenable for local development
  • Improved support for ty
    • Including some ty configurations in pyproject.toml but also some actual typing improvements
  • Minor improvements in observability, metadata, typos

Solution

Checklist

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

@github-actions github-actions Bot added the Libraries: Out of sync The charm libs used are out-of-sync label Apr 21, 2026
@astrojuanlu
Copy link
Copy Markdown
Contributor Author

Upgrade tests failing with

unit-mysql-0: 21:20:34 INFO unit.mysql/0.juju-log charm_refresh:Refresh incompatible because new version of MySQL ('8.4') and/or charm (CharmVersion('8.4/1.22.0.post13.dev0+6d221716')) is not compatible with previous version of MySQL ('8.4') and/or charm (CharmVersion('8.4/1.15.0'))

The rest seem just flaky or slow, I'll restart them a few more times.

Copy link
Copy Markdown
Contributor

@paulomach paulomach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing polemic, better optic

Copy link
Copy Markdown
Contributor

@sinclert-canonical sinclert-canonical left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see we are not fully decoupling the generation of the CA chain location from the creation of the backup temporal directory, as discussed online. I assume there is a good reason for this, because last time we spoke we were on the same page about splitting them.

The proposed approach is alright to me.


The same comments left for the K8s implementation, also apply to the VM one.

Comment thread kubernetes/lib/charms/mysql/v0/backups.py
Comment thread kubernetes/lib/charms/mysql/v0/mysql.py
Comment thread kubernetes/pyproject.toml Outdated
@astrojuanlu
Copy link
Copy Markdown
Contributor Author

I see we are not fully decoupling the generation of the CA chain location from the creation of the backup temporal directory, as discussed online. I assume there is a good reason for this, because last time we spoke we were on the same page about splitting them.

Yes. On one hand, the CA chain file creation is already split:

def create_ca_pem_file(

And on the other hand, I was misguided - I thought the CA chain file creation was the exception, but it wasn't: executing the wrapper as root was. More rationale in the description of #257, happy to elaborate more or explain synchronously if needed.

@astrojuanlu
Copy link
Copy Markdown
Contributor Author

Tests were passing before, so I'm merging and rebasing #257.

@astrojuanlu astrojuanlu merged commit fff5301 into 8.4/edge Apr 22, 2026
21 checks passed
@astrojuanlu astrojuanlu deleted the juanlu/misc-cleanups branch April 22, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Libraries: Out of sync The charm libs used are out-of-sync not bug or enhancement PR is not 'bug' or 'enhancement'. For release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants