Skip to content

Feature: Add a persistent backend to the cloud-init server which uses duckdb via quack/quack #68

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alexlovelltroy
Copy link
Member

This pull request introduces a new storage backend, quackstore, and includes various updates to support this addition. The most significant changes involve modifying the main application logic to handle the new backend, adding the necessary dependencies, and implementing and testing the quackstore functionality.

Main Application Updates:

  • Added quackstore import and new flags for selecting the storage backend and database path in cmd/cloud-init-server/main.go. [1] [2] [3]
  • Updated the main function to initialize the datastore based on the selected backend (memstore or quackstore).

New quackstore Implementation:

  • Implemented quackstore package with methods for managing groups, instances, and cluster defaults, including initialization and schema setup.

Testing Enhancements:

  • Added a test for memstore to ensure it adheres to the standard test suite.
  • Added tests for quackstore to ensure proper functionality and integration.

Model Serialization:

  • Enhanced CloudConfigFile struct to implement custom JSON marshaling and unmarshaling, handling different encoding types (base64 and plain).

- Added QuackStore implementation for managing groups, instances, and cluster defaults using Quack for persistence.
- Introduced unit tests for QuackStore to ensure functionality and data integrity.
- Updated go.mod to include new dependencies and replaced the quack module path.
- Enhanced CloudConfigFile JSON marshaling and unmarshaling for better encoding handling.
- Introduced a new test file for MemStore to validate its functionality.
- Integrated standard test suite from cistore testing package to ensure comprehensive testing.
- Introduced a new command-line flag for selecting the storage backend (mem or quack).
- Default storage backend set to memstore, with a new option for quackstore using a specified database path.
- Updated the datastore initialization logic to handle both memstore and quackstore, including error handling for quackstore initialization.
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