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

chore: migrate uncompressed resources data #863

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

DmitriyMV
Copy link
Member

@DmitriyMV DmitriyMV commented Jan 22, 2025

Abusing generics to compress uncompressed data in *omni.ConfigPatch, *omni.ClusterMachineConfig, *omni.RedactedClusterMachineConfig and *omni.ClusterMachineConfigPatches.

Fixes #853

@DmitriyMV DmitriyMV force-pushed the compress-uncompressed branch 2 times, most recently from bcb4fc1 to ee1cde9 Compare January 22, 2025 17:39
smira
smira previously approved these changes Jan 22, 2025
Copy link
Member

@smira smira left a comment

Choose a reason for hiding this comment

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

I guess we should have a test for it

@smira smira dismissed their stale review January 22, 2025 18:29

approved to early

@DmitriyMV DmitriyMV force-pushed the compress-uncompressed branch from ee1cde9 to d053989 Compare January 23, 2025 02:08
Copy link
Member

@utkuozdemir utkuozdemir left a comment

Choose a reason for hiding this comment

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

I wouldn't do it using generics for the sake of readability, but no big deal :)
I also suggest adding some tests. After that, ✅

@DmitriyMV
Copy link
Member Author

I wouldn't do it using generics for the sake of readability, but no big deal :)

I wanted to preserve type safety so it was either duplicating code for different types or use generics. I tried to simplify the end result as much as I could

@DmitriyMV DmitriyMV force-pushed the compress-uncompressed branch 2 times, most recently from 1a2d462 to 71aedb0 Compare January 27, 2025 13:16
@DmitriyMV
Copy link
Member Author

@smira @Unix4ever should be good to go

@DmitriyMV DmitriyMV force-pushed the compress-uncompressed branch from 71aedb0 to 6d88df6 Compare January 27, 2025 13:39
@smira smira mentioned this pull request Jan 27, 2025
@DmitriyMV DmitriyMV force-pushed the compress-uncompressed branch 4 times, most recently from f327f21 to a774ea0 Compare January 27, 2025 14:25
@Unix4ever
Copy link
Member

Now the clusterInfo fails 🤦

@DmitriyMV DmitriyMV force-pushed the compress-uncompressed branch from a774ea0 to f08b52d Compare January 27, 2025 15:34
Abusing generics to compress uncompressed data in `*omni.ConfigPatch`, `*omni.ClusterMachineConfig`, `*omni.RedactedClusterMachineConfig` and `*omni.ClusterMachineConfigPatches`.

Fixes siderolabs#853

Signed-off-by: Dmitriy Matrenichev <[email protected]>
@DmitriyMV DmitriyMV force-pushed the compress-uncompressed branch from f08b52d to e2e5f08 Compare January 27, 2025 15:38
@Unix4ever
Copy link
Member

/m

@DmitriyMV DmitriyMV merged commit e2e5f08 into siderolabs:main Jan 27, 2025
22 checks passed
@DmitriyMV DmitriyMV deleted the compress-uncompressed branch January 27, 2025 17:20
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.

DB migration to re-compress resources containing machine configuration (and patches)
5 participants