cassandra-medusa icon indicating copy to clipboard operation
cassandra-medusa copied to clipboard

Make node_backup and cluster_backup classes pojo-like

Open rzvoncek opened this issue 1 year ago • 0 comments

Project board link

There's a rather ugly way we treat attributes of those classes. For example

    @manifest.setter
    def manifest(self, manifest):
        self.cached_manifest = None
        self._storage.storage_driver.upload_blob_from_string(self.manifest_path, manifest)

Elsewhere in the code, we then just do manifest = something, which is nice, but it's also not obvious this is a call to the storage backend. Now that we are more aware of the backend connection and try to manage it nicely, it becomes obvjous that these hidden interactions are not nice. Mostly, because they prevent us from closing the connections cleanly.

For the refactoring week, I'd like to go see if we can actually move away form this entirely. It'll give us a cleaner and more maintainable code.

┆Issue is synchronized with this Jira Story by Unito ┆Issue Number: MED-24

rzvoncek avatar Sep 18 '23 09:09 rzvoncek