Skip to content

Latest commit

 

History

History
1590 lines (933 loc) · 112 KB

CHANGELOG.md

File metadata and controls

1590 lines (933 loc) · 112 KB

CHANGELOG

v0.12.4 (2025-02-26)

Fix

  • fix(CI): ajust package config (4eb1b0b)

  • fix(CI): include poetry package dist correctly (0d2e6e7)

Unknown

  • Merge branch 'main' of github.com:remyz17/odooghost (a239e02)

v0.12.3 (2025-02-26)

Fix

  • fix(CI): update node version and use pnpm (a9ac1bd)

Unknown

  • 0.12.3 [skip ci]

Automatically generated by python-semantic-release (5902da2)

v0.12.2 (2025-02-26)

Fix

  • fix(Dockerfile.j2): use pip with --break-system-packages, following a… (#33) (a3a69a8)

Unknown

  • 0.12.2 [skip ci]

Automatically generated by python-semantic-release (7e730ce)

v0.12.1 (2025-01-22)

Fix

  • fix(stack update): do pull by default (#34) (d0dae32)

Unknown

  • 0.12.1 [skip ci]

Automatically generated by python-semantic-release (a5f28f8)

v0.12.0 (2024-10-16)

Feature

  • feat(config): add support for V18.0 (#32) (fb470d6)

Unknown

  • 0.12.0 [skip ci]

Automatically generated by python-semantic-release (1d5fe76)

v0.11.0 (2024-07-12)

Chore

  • chore(pyproject.toml): add B608 to bandit skips to exclude additional security check (5b9d2a1)

  • chore: Bump dependencies (98f35b1)

Feature

  • feat(services): Add mailhog service (5bfa424)

Fix

  • fix(pyproject.toml): update ruff dependency version to ^0.0.291 to fix a known issue and improve compatibility with other packages (7aa84c4)

Refactor

  • refactor(filters.py): remove unnecessary else block and raise ValueError directly for invalid value for one_off (2441393)

Unknown

  • 0.11.0 [skip ci]

Automatically generated by python-semantic-release (e09cd80)

v0.10.0 (2024-06-23)

Chore

  • chore(ci): Fix workflows (#29) (2e118df)

Feature

  • feat: Deps update (#27) (edbd20f)

Unknown

  • 0.10.0 [skip ci]

Automatically generated by python-semantic-release (72c6c95)

v0.9.0 (2024-06-21)

Chore

Feature

  • feat(web): Allow users to start/stop/restart a stack from the frontend (#24) (b9b56b8)

  • feat: Adds Property to Modify APT Repositories for Archived Linux Distributions (#23) (1de6d3c)

  • feat: Change web base url when restoring database (#22) (7278261)

Unknown

  • 0.9.0 [skip ci]

Automatically generated by python-semantic-release (67a92ee)

v0.8.3 (2024-05-07)

Fix

  • fix(Dockerfile.j2): update conditional statement to check for Odoo version 12.0 instead of 11.0 to ensure correct package repository configuration. (8a472e7)

Unknown

  • 0.8.3 [skip ci]

Automatically generated by python-semantic-release (97abce9)

v0.8.2 (2024-05-01)

Fix

  • fix(cli): looks like ruff want to put a tuple instead of a dict, whis is really weird... (1ed1b0f)

Unknown

  • 0.8.2 [skip ci]

Automatically generated by python-semantic-release (b298163)

v0.8.1 (2024-04-24)

Fix

  • fix(schema_types.py): change logic from checking if all containers are running to checking if any container is running to correctly determine stack state (e719433)

  • fix(package.json): update dependencies versions for @apollo/client, @headlessui/vue, @heroicons/vue, graphql-ws, vue, vue-router, @rushstack/eslint-patch, @vitejs/plugin-vue, @vue/eslint-config-prettier, @vue/test-utils, autoprefixer, eslint, eslint-plugin-vue, jsdom, postcss, prettier, tailwindcss, vite, vitest to latest versions for compatibility and security reasons (f69fed7)

Style

  • style(VActivity.vue): improve code readability by adding loading variable declaration on a separate line feat(VActivity.vue): display event container name in a separate paragraph for better UI presentation (821855d)

  • style(subscription.py): refactor event filtering logic to improve readability and maintainability (764881f)

Unknown

  • 0.8.1 [skip ci]

Automatically generated by python-semantic-release (f867f7f)

  • Merge branch 'main' of github.com:remyz17/odooghost (3902b70)

v0.8.0 (2024-04-24)

Feature

  • feat(root.py): add support for specifying a custom port with the -p/--port option when running a one-off command on a service (9726288)

  • feat(root.py): add support for specifying the number of lines to show from the end of the logs using the --tail option feat(root.py): include the service port configuration for one-off services in the ports mapping to ensure proper port mapping for the service (10561f2)

Refactor

  • refactor(base.py): conditionally pass ports map as None if one_off flag is set to improve flexibility and readability (c1e330a)

Unknown

  • 0.8.0 [skip ci]

Automatically generated by python-semantic-release (d832384)

  • Merge branch 'main' of github.com:remyz17/odooghost (157f685)

v0.7.1 (2024-02-02)

Fix

  • fix(web): wrong JavaScript mimetype on Windows (#20) (d1e1e70)

Unknown

  • 0.7.1 [skip ci]

Automatically generated by python-semantic-release (86f883f)

v0.7.0 (2023-12-19)

Feature

  • feat(cli): Add autocompletion support (#9) (8737a30)

Unknown

  • 0.7.0 [skip ci]

Automatically generated by python-semantic-release (eb2db6f)

v0.6.1 (2023-12-18)

Documentation

  • docs: update links to stack configuration file samples in README and index.md

The links to the stack configuration file samples in the README and index.md files were pointing to incorrect locations. This commit updates the links to point to the correct location, which is the "exemples" directory in the odooghost repository. This change ensures that users can easily find and access the stack configuration file samples for creating their Odoo instances. (09e7884)

Fix

  • fix(template): fixed python dependencies installation. It looks like that installing with --user option doest not work with the Odoo image (9f70420)

Unknown

  • 0.6.1 [skip ci]

Automatically generated by python-semantic-release (6667183)

v0.6.0 (2023-12-16)

Chore

  • chore(counter.js): remove unused counter store file

The counter.js file was deleted as it was no longer being used in the project. This commit removes the file from the codebase to improve code cleanliness and reduce unnecessary files. (abc10cb)

  • chore(schema_types.py): add 'id' field to the Stack class to include the ID of the stack (9bdf3a7)

Feature

  • feat(web): Add docker events mangement through websocket. #16 (89216ff)

  • feat(web): Added container events subscription. This include all stuff for websocker on the client and the server (b7dd8ca)

  • feat(StackView.vue): add fetchPolicy and pollInterval options to useQuery function call to improve data fetching behavior

The changes were made to the StackView.vue file. The useQuery function call was modified to include the fetchPolicy and pollInterval options.

The fetchPolicy option was set to 'cache-and-network' to ensure that the query fetches data from both the cache and the network. This allows for more up-to-date data to be displayed in the view.

The pollInterval option was set to 5000 to specify that the query should be refetched every 5 seconds. This enables the view to automatically update with the latest data without requiring manual refreshes. (86f17e1)

  • feat(web): Add modal support (d166828)

  • feat(sync_to_async.py): add utility functions sync_to_async and sync_to_async_iterator to convert synchronous functions and iterators to asynchronous ones

The sync_to_async function is a decorator that takes a synchronous function as input and returns an asynchronous function. It uses asyncio.get_running_loop().run_in_executor to run the synchronous function in a separate thread and await the result.

The sync_to_async_iterator function is a decorator that takes a synchronous iterator function as input and returns an asynchronous iterator function. It uses the sync_to_async decorator to convert the synchronous iterator function to an asynchronous one. It also handles the conversion of StopIteration to StopAsyncIteration to properly terminate the asynchronous iterator.

These utility functions are useful when working with synchronous code in an asynchronous context, allowing for better integration and interoperability. (3409e3d)

  • feat(stack.py): add id property to Stack class to generate a unique identifier for each stack based on its name (61a4eb6)

Fix

  • fix(VDataView.vue): change error prop type from Boolean to Object to provide more detailed error information (431a55e)

  • fix(pyproject.toml): update uvicorn dependency to include the 'standard' extra to ensure all necessary components are installed (a2ec599)

Refactor

  • refactor(subscription.py): remove unused logger.error() calls (3d1dc8e)

Unknown

  • 0.6.0 [skip ci]

Automatically generated by python-semantic-release (cd2d606)

v0.5.3 (2023-12-15)

Fix

  • fix(release.yaml): move front build before semantic-release because semantic-release run the build so if front is after then it's not included in the wheel (ae42935)

Unknown

  • 0.5.3 [skip ci]

Automatically generated by python-semantic-release (6f61ed9)

v0.5.2 (2023-12-15)

Fix

  • fix(release.yaml): use pnpm setup to the workflow to improve package management performance (c24368c)

Unknown

  • 0.5.2 [skip ci]

Automatically generated by python-semantic-release (f4a10b7)

v0.5.1 (2023-12-15)

Fix

  • fix(release.yaml): change from 'pnpm' to 'npm' (bf2b494)

Unknown

  • 0.5.1 [skip ci]

Automatically generated by python-semantic-release (b277dfe)

v0.5.0 (2023-12-15)

Chore

  • chore(release.yaml): add setup for Node.js version 18 and use pnpm as the package manager for front-end dependencies chore(pyproject.toml): include the odooghost/web/dist directory in the package distribution (50a8abf)

  • chore(web): motly finished first early version of web (729f049)

Feature

  • feat(web): introduce first web interface (a9b5a73)

Unknown

  • 0.5.0 [skip ci]

Automatically generated by python-semantic-release (4493680)

  • Merge remote-tracking branch 'origin/main' into web (eaed300)

v0.4.3 (2023-12-13)

Chore

  • chore(pyproject.toml): update typer dependency to include all extras for improved functionality (b5f7a06)

  • chore(web): Impoved stack item view (5937a7e)

  • chore(README): Use pipx instead of pip (1b779f9)

Feature

  • feat(web): Continue improve web shell (79c3d91)

Fix

  • fix(exec.py):
    • change folder_exists function to return boolean value 'true' instead of 'exists' for better semantics
    • change create_folder function to use 'mkdir -p' command to create folder recursively (fc7ccc9)

Unknown

  • 0.4.3 [skip ci]

Automatically generated by python-semantic-release (366b76a)

v0.4.2 (2023-12-06)

Fix

  • fix(package): Add missing pyaml dependency (a47d8d2)

Unknown

  • 0.4.2 [skip ci]

Automatically generated by python-semantic-release (b15741b)

  • Merge branch 'main' of github.com:remyz16/odooghost (179dba3)

v0.4.1 (2023-12-06)

Chore

  • chore(web): Start implementing web app (fce5226)

  • chore(pyproject.toml): update python dependency version to 3.9 to match project requirements (089dae3)

Fix

  • fix(odoo/init.py): add get_filestore_path function to OdooService module

The get_filestore_path function is added to the OdooService module to provide a convenient way to retrieve the filestore path for the Odoo service. This function will be used to access and manipulate files stored by the Odoo service. (52d2839)

  • fix(db.py): add support for restoring .sql dump files using psql command instead of pg_restore

The previous implementation of the restore_database function only supported restoring dump files with the .dump extension using the pg_restore command. This commit modifies the function to also support restoring .sql dump files using the psql command.

The restore_database function now checks the file extension of the dump file. If it is .sql, it constructs a command using the psql command instead of pg_restore. This ensures that both types of dump files can be restored correctly.

This change improves the flexibility of the restore_database function and allows for a wider range of dump file formats to be restored. (73bfc4d)

Unknown

  • 0.4.1 [skip ci]

Automatically generated by python-semantic-release (51af052)

v0.4.0 (2023-11-30)

Chore

  • chore(pyproject.toml): update exclude_commit_patterns in semantic-release configuration

The exclude_commit_patterns in the semantic-release configuration has been updated to exclude merge commits from being included in the changelog. This change improves the accuracy and readability of the generated changelog. (ba2e384)

  • chore(pyproject.toml): exclude "web" directory from bandit static analysis to improve performance and reduce noise (76d2d76)

  • chore(pyproject.toml): add gitpython and giturlparse as dependencies for the project (5aed5fe)

Feature

  • feat(stack): Add update method and command (cded073)

  • feat(context.py): add update method to update StackConfig file in context (f90c638)

  • feat(stack.py): replace update method with pull method to improve clarity and add support for pulling the stack and its services (49400a8)

  • feat(service.py): add pull method to OdooService class to pull addons before creating the service

The pull method is added to the OdooService class to ensure that the addons are pulled before creating the service. This will ensure that the latest changes in the addons are available when the service is created. (fbd79cc)

  • feat(base.py): add pull method to BaseService class to pull service image

The pull method is added to the BaseService class in order to allow pulling the service image. This method is used to pull the image specified by the base_image_tag property. (17dafee)

  • feat(git.py): add pull method to Git class to allow pulling changes from a remote repository (5b79892)

  • feat(exceptions.py): add new exceptions for handling Git related errors in the Addons module

The new exceptions AddonsGitError and AddonsGitCloneError are added to handle Git related errors that may occur during the execution of the Addons module. These exceptions will provide more specific error handling and improve the overall error handling experience for users. (3804add)

  • feat(git.py): add progress bar using rich library to display git clone progress in a more user-friendly way (1a4b9d9)

  • feat(addons.py): add support for optional addons type and git origin in AddonsConfig model (bb9de5f)

  • feat(git.py): add Git class with clone method to handle cloning a git repository

The Git class is added to handle cloning a git repository. It includes a clone method that takes in the path, url, branch, and depth as parameters. The method uses the gitpython library to clone the repository with the specified parameters. It also includes a ProgressPrinter class that extends the RemoteProgress class to print the progress of the cloning process. If an exception occurs during the cloning process, it is caught and raised with the appropriate error message. (27ce6a8)

Fix

  • fix(Dockerfile.j2): change pip install command to use pip3 and install packages with --user flag to avoid permission issues and remove unnecessary USER odoo statement to improve readability and maintainability (0814a33)

  • fix(root.py): add error handling and raise typer.Exit(code=1) when creating, dropping, pulling, starting, stopping, restarting, streaming logs, executing command, or running command fails (af61c3f)

  • fix(addons.py): add a pull method to pull remote Odoo addons

The AddonsHandler class in addons.py now has a new method called pull which is used to pull remote Odoo addons. This method takes an optional argument depth which specifies the depth of the git pull. The method iterates over the addons and if an addon is of type "remote", it performs a git pull on the addon's path using the specified branch and depth. This allows for easily updating remote addons without having to manually clone the repository again. (61a5f33)

  • fix(addons.py): fix the issue where the addons path is not correctly created if it doesn't exist (c2e1dfa)

  • fix(config): Use pydantic V2 api (2b2c4a7)

Refactor

  • refactor(addons.py): remove unnecessary print statement in _get_addons method, remove unnecessary debug log statement in clone method (d0d3efa)

  • refactor(service): Move odoo service into a subpackage (8ee1a02)

  • refactor(context.py): rename StackConfigManager class to StackContext for better clarity and semantics (ed3a6e6)

Unknown

  • 0.4.0 [skip ci]

Automatically generated by python-semantic-release (7e2c8a1)

  • Merge pull request #8 from remyz17/addons-imp

chore: Improved addons management and Stack command ajustments (51e99b6)

v0.3.1 (2023-11-18)

Chore

  • chore(exemples): Create folder for stack config exemples (13cf882)

Fix

  • fix(config): Cicrular import is fixed after changing imports (fe5a93e)

Refactor

  • refactor: Modified config and addons structure #7 (d898ef7)

  • refactor(addons): move addons manager directly inside config module (38c6607)

  • refactor(config): Move config module into a new config package allowing creation on multiples modules for each purpose. (7174378)

  • refactor(cli/stack): Move config commands to a subcommand (a44e6e2)

Unknown

  • 0.3.1 [skip ci]

Automatically generated by python-semantic-release (477a903)

v0.3.0 (2023-11-17)

Chore

  • chore(misc.py): add is_tarfile() function (c6258d1)

  • chore(.gitignore): add .DS_Store to the list of ignored files to prevent it from being tracked by git (03414b1)

  • chore: bump pydantic version (4c64817)

  • chore: bump deps (ed77503)

Feature

  • feat(data.py): add drop command to drop database and filestore from stack

    • set permissions for filestore in restore function (3b61061)
  • feat(exec.py): add set_permissions function to set permissions and ownership for a given path inside a Docker container (e4d5cbe)

  • feat(data.py): add support for restoring data in Stack (2c897a1)

  • feat(exec.py): add new functions remove_inode and create_folder to handle file system operations (f706994)

  • feat(services): Implement service port map

    • add abstract base class StackServiceConfig to provide common config for stack services
    • add service_port attribute to StackServiceConfig to map local port to container service port
    • extend PostgresStackConfig and OdooStackConfig from StackServiceConfig to inherit common config
    • remove service_port attribute from PostgresStackConfig and OdooStackConfig as it is already defined in StackServiceConfig
    • add _get_ports_map method to BaseService to get ports mapping for container options
    • add ports argument to _get_container_options method in BaseService to include ports mapping in container options (e192238)
  • feat(config.py): add support for mapping local port to container service port in PostgresStackConfig and OdooStackConfig classes

The changes were made to the config.py file. In the PostgresStackConfig and OdooStackConfig classes, a new attribute service_port of type Optional[int] was added. This attribute allows mapping a local port to the container service port.

Additionally, in the DependenciesConfig class, the get_apt_dependencies method was updated to handle both string and list inputs. If the input is a string, it is split by spaces to create a list of apt dependencies.

In the OdooStackConfig class, a validator was added to validate the version attribute as a float. (2a82684)

  • feat(config): Allow v17 (4c6279d)

  • feat(data.py): add dump command to cli to allow dumping one off Stack database and/or its filestore (19dd121)

  • feat(db.py):

    • add enum class DumpFormat to represent different dump formats
    • add functions to check if a database exists, drop a database, create a database, dump a database, and restore a database (bee5c89)
  • feat(misc.py):

    • add function to get current datetime in a specific format
    • add context manager for creating temporary tar.gz files
    • add function to write data to a file in chunks (aca61ad)
  • feat(exec.py): add folder_exists function to check if a folder exists in a container

The folder_exists function is added to the exec.py file. This function takes a Container object and a folder_path string as parameters. It uses the exec_run method of the Container object to execute a command that checks if the specified folder exists. The function returns True if the folder exists and False otherwise. This function is useful for checking the existence of a folder in a container. (7be95a4)

  • feat(container.py): add support for executing commands inside the container using exec_run method (moved from CLI) feat(container.py): add support for putting files or folders into the container using put_archive method (b276b30)

  • feat(cli): Add initiali support for stack data CLI (70fb0c9)

Fix

  • fix(utils/misc.py): refactor temp_tar_gz_file function to handle cases where source_path is a tarfile and add options to ignore_tar and include_root_dir (f1efe27)

  • fix(db.py):

    • add termination of all connections to the database before dropping it to prevent errors and ensure successful deletion
    • fix typo in function name from database_exsits to database_exists for better readability and semantics (25f9098)
  • fix(db.py): fix pg_restore command to correctly handle the jobs parameter and use the root user instead of postgres user

The pg_restore command in the restore_database function was not correctly handling the jobs parameter. The command was using the --jobs flag even when the jobs parameter was set to 0, resulting in an invalid command. The fix modifies the command to only include the --jobs flag when the jobs parameter is greater than 0.

Additionally, the command was using the postgres user to execute the pg_restore command. However, it should be using the root user. The fix updates the user parameter in the exec_run function to "root". (9ee597f)

  • fix(container.py): allow path argument in put_archive method to accept both Path and str types for improved flexibility and usability (be6a812)

  • fix(container):

    • add support for open mode option to specify how to open Odoo in browser
    • fix get_local_port method to handle macOS platform and return localhost instead of 0.0.0.0 (2b3cb15)
  • fix(container.py): fix return type annotation for the get_archive method in the Container class

The return type annotation for the get_archive method in the Container class was incorrect. It was originally annotated as returning a tuple of t.IO and t.Dict[str, t.Any], but it should be annotated as returning a tuple of t.Generator[any, any, None] and t.Dict[str, t.Any]. This fix improves the accuracy of the return type annotation for the method. (b7602ba)

  • fix(exec.py): fix command in folder_exists function to properly check if folder exists (f9d16f7)

  • fix(container.py): import DEFAULT_DATA_CHUNK_SIZE from docker.constants to fix NameError feat(container.py): add get_archive method to retrieve a file or folder from the container using a tar archive (1db2809)

  • fix(root.py): add check for setup state before running subcommands to ensure OdooGhost is properly setup (c99105e)

Refactor

  • refactor(odoo.py): use VOLUME_PATH constant instead of hardcoding "/var/lib/odoo" in Mount target add get_filestore_path function to get the filestore path for a given dbname (8b5f41c)

  • refactor(cli/stack): move data to upper level and use exec_run from Container class (e8a6d74)

  • refactor(addons.py): rename get_copy_addons method to _get_addons for better clarity and consistency (2903a84)

  • refactor(base.py):

    • fix typo in method name fro m drop_image to drop_images for better semantics
    • add support for pulling images with progress stream and getting digest from pull
    • add support for dropping multiple images in drop_images method
    • add support for force option in drop method to force drop containers and volumes (10de0ec)
  • refactor(progress_stream.py): remove unused get_digest_from_push function

The get_digest_from_push function was not being used anywhere in the codebase, so it was removed to improve code cleanliness and maintainability. (82762ba)

Unknown

  • 0.3.0 [skip ci]

Automatically generated by python-semantic-release (e9c86f6)

  • Merge pull request #6 from remyz17/data

feat(cli,services): Add support for dumping, restoring and dropping Stack data in different services (c407eed)

v0.2.1 (2023-10-16)

Fix

  • fix: Remove support for odoo 9.0 and 10.0 and fix support for 11.0 and 12.0 (8dff47a)

  • fix(config.py): remove unsupported Odoo version 9.0 and 10.0 from the list of supported versions in the get_odoo_version method fix(Dockerfile.j2): add a fix for Odoo version 11.0 and 12.0 to update the package sources to use archive.debian.org instead of deb.debian.org and remove the stretch-updates source (bce68d7)

Unknown

  • 0.2.1 [skip ci]

Automatically generated by python-semantic-release (0c62a0c)

v0.2.0 (2023-10-16)

Chore

  • chore(Dockerfile.j2): change ownership of /etc/odoo directory to odoo user to improve security feat(Dockerfile.j2): add support for custom addons path by modifying the odoo.conf file (ac61617)

  • chore(constant.py): add constant LABEL_ONE_OFF to represent the label for one-off containers feat(filters.py): add OneOffFilter enum to represent the different options for filtering one-off containers feat(filters.py): add update_labels method to update labels based on the value of OneOffFilter feat(stack.py): add one_off parameter to labels method to filter one-off containers based on OneOffFilter value feat(stack.py): update filters parameter in get_containers method to include labels from stack and one_off parameter (c17c649)

  • chore(pyproject.toml): add dockerpty package as a dependency for the project's linting tools (7d75810)

  • chore(constant.py): add IS_WINDOWS_PLATFORM constant to check if the platform is Windows (7c9dde2)

Feature

  • feat: Add one off container implementation with new run and exec command (#3) (9697791)

  • feat(root.py): add 'run' command to run a one-off command on a service in the stack (31255de)

  • feat(stack.py): add db and odoo services to the Stack class to improve modularity and encapsulation (689c449)

  • feat(signals.py): add signal handling functions and exceptions for graceful shutdown and hang up fix(signals.py): ignore SIGPIPE signal to prevent raising an exception when encountered (88fd384)

Fix

  • fix(cli/stack/root.py):

    • update method calls to use new service retrieval method in Stack class
    • fixed incorrect typer.Option on exec command (c38c6c5)
  • fix(root.py): import missing modules 'signals', 'ExecOperation', and 'PseudoTerminal' to fix NameError feat(root.py): add 'exec' command to execute a command in a running container (8381ee6)

  • fix(stack.py): remove unused imports and type hints to improve code readability refactor(stack.py): refactor the way services are stored in the Stack class to use a dictionary instead of separate variables feat(stack.py): add methods to retrieve services and get a specific service by name in the Stack class refactor(stack.py): modify create and drop methods in the Stack class to iterate over all services and call their respective create and drop methods refactor(stack.py): rename postgres_service property to db_service in the Stack class to improve semantics (0760069)

  • fix(base.py): add **kw parameter to create method to allow for additional keyword arguments fix(odoo.py): pass **kw parameter to super().create method to allow for additional keyword arguments (499ad6b)

Refactor

  • refactor(misc.py): add support for generating random strings of specified length (85768d6)

  • refactor(services): Add new method _get_container_options which is used for container creation. This allow correctly handling creating of one off container. (c1fcf5e)

  • refactor(odoo.py): rename db_service variable to db_service_config for clarity (844b183)

  • refactor(services/init.py): rename 'postgres' module to 'db' for better clarity and consistency (d6ce681)

  • refactor(db.py): move postgres service to db (6ce987f)

Unknown

  • 0.2.0 [skip ci]

Automatically generated by python-semantic-release (e94644b)

v0.1.6 (2023-10-13)

Fix

  • fix(release.yaml): add verbose option to poetry and remove build option (0f9723f)

Unknown

  • 0.1.6 [skip ci]

Automatically generated by python-semantic-release (33c6aeb)

v0.1.5 (2023-10-13)

Fix

  • fix(release.yaml): Again try to fix publish step (17a81ee)

Unknown

  • 0.1.5 [skip ci]

Automatically generated by python-semantic-release (017c488)

v0.1.4 (2023-10-13)

Fix

  • fix(release.yaml): fixed pypi token environment (bb35bb0)

Unknown

  • 0.1.4 [skip ci]

Automatically generated by python-semantic-release (73457fc)

v0.1.3 (2023-10-13)

Fix

  • fix(release.yaml): try to fix poetry publish command (59e7af7)

Unknown

  • 0.1.3 [skip ci]

Automatically generated by python-semantic-release (547ff39)

v0.1.2 (2023-10-13)

Chore

  • chore(workflow): fixed release workflow (029403e)

  • chore(release.yaml): update Python Semantic Release step to continue on error and add Publish step to handle failure case

The Python Semantic Release step in the release.yaml workflow has been updated to include the continue-on-error: true option. This change allows the workflow to continue even if the semantic-release command fails.

Additionally, a new Publish step has been added to the workflow. This step is only executed if the previous Python Semantic Release step fails. It runs the poetry publish -n command to publish the package to the package index. (7d31a20)

  • chore(orchestrator.yaml): update file references to use correct file extensions

The file references in the orchestrator.yaml file have been updated to use the correct file extensions. The references to test.yml and lint.yml have been changed to test.yaml and lint.yaml respectively. Similarly, the reference to release.yml has been changed to release.yaml. This change ensures that the correct workflow files are used in the respective jobs. (5b891d1)

  • chore(docs.yaml): change trigger from push to release to deploy documentation chore(lint.yaml): remove push trigger and add workflow_call trigger for linting workflow feat(orchestrator.yaml): add orchestrator workflow to call testing, linting, and release pipelines feat(release.yaml): add release workflow to perform semantic release and publish package feat(semantic_pull_request.yaml): add semantic pull request workflow to validate PR title chore(test.yaml): remove push trigger and add workflow_call trigger for testing workflow (dcd3762)

  • chore(pyproject.toml): update homepage URL to the correct GitHub Pages URL chore(pyproject.toml): update commit message template to include [skip ci] to skip CI pipeline for automatic releases chore(pyproject.toml): update build command to only build the package without publishing it (8892b64)

Documentation

  • docs(README.md): update installation instructions to use pip instead of cloning the repository and installing with poetry build(pyproject.toml): update build command to include publishing the package with poetry (16c187b)

Fix

  • fix(config.py): Fixed method typo (efcf250)

Unknown

  • 0.1.2 [skip ci]

Automatically generated by python-semantic-release (6590311)

v0.1.1 (2023-10-13)

Fix

  • fix(pyproject.toml): add "merge" as an allowed tag in the commit message convention to indicate merge commits (3374fcf)

Unknown

  • 0.1.1

Automatically generated by python-semantic-release (aa371ee)

v0.1.0 (2023-10-13)

Chore

  • chore(README.md): add badges for linting, testing, and deploy documentation workflows to provide visibility and status of the project's CI/CD pipelines (e893e18)

  • chore: bump deps (030038d)

  • chore(base.py): change default value of no_cache parameter in build_image() method to True for better performance chore(base.py): change default value of no_cache parameter in build() method to True for better performance chore(base.py): change rm parameter to False and add forcerm=True in build_image() method to prevent removing intermediate containers (70206cd)

  • chore(exemple-stack.yml): rename 'postgres' service to 'db' for better clarity and consistency (c825d5c)

  • chore: bump deps (f0174ec)

  • chore(Dockerfile.j2): refactor pip dependencies installation to use a single command for improved readability and maintainability feat(Dockerfile.j2): add support for copying addons to the container by creating a directory and setting ownership before copying the addons (2d07fc6)

  • chore(stack.py): remove unused ensure_addons method feat(stack.py): add support for ensure_addons parameter in create method to control whether to ensure addons or not during stack creation (f857428)

  • chore(package.json): update dependencies and devDependencies

  • Update pinia dependency from version 2.1.3 to 2.1.6
  • Add new dependencies:
    • @headlessui/vue version 1.7.16
    • @heroicons/vue version 2.0.18
    • @tailwindcss/forms version 0.5.5
  • Update vue dependency from version 3.3.4 to 3.3.4
  • Update vue-router dependency from version 4.2.2 to 4.2.4
  • Update devDependencies:
    • @rushstack/eslint-patch from version 1.2.0 to 1.3.3
    • @vitejs/plugin-vue from version 4.2.3 to 4.3.3
    • @vue/test-utils from version 2.3.2 to 2.4.1
    • autoprefixer from version 10.4.14 to 10.4.15
    • eslint from version 8.39.0 to 8.48.0
    • eslint-plugin-vue from version 9.11.0 to 9.17.0
    • postcss from version 8.4.26 to 8.4.28
    • vite from version 4.3.9 to 4.4.9
    • vitest from version 0.32.0 to 0.32.4

The dependencies and devDependencies were updated to their latest versions to ensure compatibility and take advantage of bug fixes and new features. (08bcadf)

  • chore(jsconfig.json): add jsconfig.json file to configure TypeScript compiler options and path aliases for better module resolution and development experience (fde6751)

  • chore(.editorconfig): update file extensions to include .vue, .js, and .cjs files for consistent indentation style (a23500c)

  • chore(config.py): move ContextConfig from context feat(context.py): add StackConfigManager class to manage stack configurations (d60ab77)

  • chore: update dependencies (f17efa2)

  • chore: replace flake8 with ruff

  • Add ruff configuration with src set to ["odooghost", "tests"], ignore set to ["E501", "E203"], and line-length set to 88 (aa7177d)
  • chore(stack.py): add docstrings to Stack class and its methods for better code documentation (a2d11b5)

  • chore(stack.py): add logging statements to improve visibility during stack creation and dropping feat(stack.py): add optional parameters to the start method for detaching and opening browser (f7b2df0)

  • chore(reference.md): add configuration options for odooghost.context, odooghost.renderer, and odooghost.logger to show root heading docs(init.py): update package description for OdooGhost docs(context.py): add docstrings to Context class and its methods for better code documentation (0016fbb)

  • chore(README.md): update project description and features for clarity and readability (3557823)

  • chore(README.md): fix typo in the word "development" to improve readability and consistency (47ecb73)

  • chore(README.md): update project description and add features section docs(README.md): add installation instructions and contribute section (a3c4ce8)

  • chore(constant.py): refactor constant names for improved readability and consistency feat(constant.py): add new constant LABEL_STACK_SERVICE_TYPE to represent the stack type of odooghost (fc93ec9)

  • chore(odoo.py): change logger.debug to logger.info to provide more informative log message during image building process chore(postgres.py): change logger.debug to logger.warn to indicate that the postgres image is being skipped because it's of remote type (2c0ca86)

  • chore: bump deps (d5209c3)

  • chore(lint.yaml): add linting workflow to the project to ensure code quality and consistency feat(Makefile): add Makefile with formatting and linting targets for code quality and consistency (d7f2a39)

  • chore(Dockerfile.j2): switch to root user to install apt dependencies and switch back to odoo user afterwards (4cffa80)

  • chore(base.py): add logging statement to ensure_base_image method for debugging purposes fix(base.py): fix references to base_image_tag property in ensure_base_image method to ensure correct image is pulled and logged (1e915c1)

  • chore(constant.py): add SRC_DIR constant to store the absolute path of the current file's parent directory feat(constant.py): add LABEL_STACKNAME constant to store the label for the stackname in the application (42d7cbd)

  • chore(pyproject.toml): add Jinja2 dependency to support template rendering in the project (a86eaa9)

  • chore(pyproject.toml): add docker package as a dependency to enable Docker integration chore(pyproject.toml): fix formatting of isort profile key for consistency chore(pyproject.toml): update bandit configuration to exclude "tests" directory from scanning (8d89bf6)

  • chore(pyproject.toml): add pydantic package with dotenv extras to enable environment variable support in the application chore(pyproject.toml): update isort dependency to version 5.12.0 for linting purposes (a23d05a)

  • chore(init.py): add version number 0.1.0 to the package feat(constant.py): add constant APP_DIR to store the path to the application directory for odooghost (4781438)

  • chore: Add base VueJS app (77094c9)

  • chore: add .editorconfig file to enforce consistent coding style across the project add .flake8 file to configure flake8 linter with project-specific settings add .pre-commit-config.yaml file to configure pre-commit hooks for automated checks update pyproject.toml with project metadata and dependencies configure isort, black, flake8, and mypy in pyproject.toml for linting and formatting configure pytest and bandit in pyproject.toml for testing and security analysis (c329830)

  • chore(README.md): add initial README content for OdooGhost project (27b72ac)

  • chore: add initial project files and structure

Add the following files to the project:

  • README.md
  • odooghost/init.py
  • pyproject.toml
  • tests/init.py

This commit sets up the initial project structure and configuration files. The README.md file will be used to provide information about the project. The odooghost/init.py file is the main entry point for the project. The pyproject.toml file is used for project configuration and dependency management using Poetry. The tests/init.py file is added to the project to provide a starting point for writing tests. (d2f4aab)

Ci

Documentation

  • docs(services): Add docstring to config property (1773ef6)

  • docs(reference.md): add odooghost.services section to the reference documentation to provide information about the services module odooghost/services/init.py: rename imported module 'base' instead of 'odoo' to improve clarity and consistency in the codebase (1043d88)

  • docs(index.md): Update project overview and features section to provide a clear description of OdooGhost and its capabilities docs(index.md): Add installation instructions to guide users on how to get started with OdooGhost docs(index.md): Include usage instructions for initial setup and crafting a stack docs(index.md): Add contribute section to encourage community contributions docs(index.md): Include license information for the project docs(tutorials.md): Update tutorials section to provide detailed information on managing Odoo stacks with CLI commands (e3f7120)

  • docs(reference.md): add odooghost.stack and odooghost.renderer sections to the reference documentation to provide information about these features (8742bb9)

  • docs(README.md): update link to stack configuration file samples in the README to point to the correct location feat(exemple-stack.yml): add an example stack configuration file with Odoo and Postgres configurations (fe0a200)

  • docs(README.md): update contribution guidelines to encourage Pull Requests and express appreciation for contributions (4bdc122)

Feature

  • feat(pyproject.toml): configure semantic-release settings for automatic versioning and changelog generation (cf41523)

  • feat(stack.py): add support for force recreate of dangling containers in Stack.create method to provide more flexibility in container creation feat(stack.py): add support for do_pull parameter in Stack.create method to allow pulling of base images to be optional feat(odoo.py): add support for force and do_pull parameters in OdooService.create method to align with changes in BaseService.create method fix(base.py): modify BaseService.create method to handle force recreate of dangling containers and optional pulling of base images fix(root.py): modify create function to pass force and do_pull parameters to Stack.create method and align with changes in OdooService.create method (9b8c7f5)

  • feat(cli): add 'logs' command to stream logs from a stack feat(container.py): add optional parameters to 'stream_logs' method to allow specifying tail and follow options (1fbbc9b)

  • feat(services): add new abstractmethod _get_environment() and use it for container _get_environment This way Odoo service can get informations from DB service and build it's environment (3de4911)

  • feat(config.py): add new methods get_service_hostname() and get_network_name() to StackConfig class for better service and network name handling (ceaf0c0)

  • feat(odooghost/addons.py): add methods to get addons configurations, addons paths, and validate addons paths feat(odooghost/services/base.py): add methods to prepare and clean build context, get service labels, ensure base image, build service image, drop service image, create and drop service volumes, list service containers, create and drop service containers, get service container, start service container, build service, create service, drop service, add properties for base image tag, image tag, and custom image existence, add properties for volume name, container name, container hostname, and build context path (1c94a49)

  • feat(reference.md): add odooghost.context section to provide additional context information (f08daf6)

  • feat(Dockerfile.j2): add support for mounting Python dependency files and installing them using pip feat(Dockerfile.j2): add support for mounting additional addons from the host machine (692e805)

  • feat(misc.py): add function to generate a hash of a given string using MD5 algorithm for data integrity purposes (3aa16e6)

  • feat(renderer.py): improve flexibility of render_dockerfile function by accepting keyword arguments instead of specific arguments (cf1df15)

  • feat(web): add GraphQL API support to the web application

  • Add new files odooghost/web/api/__init__.py and odooghost/web/api/schema.py to define the GraphQL schema and query.
  • Implement a hello query in the GraphQL schema that returns the string "world".
  • Create a new file odooghost/web/application.py to define the web application using Starlette.
  • Import the GraphQL schema from odooghost/web/api/schema.py.
  • Create a Starlette application and add routes for /graphql and /graphql for GraphQL queries and subscriptions.
  • Update pyproject.toml to include the necessary dependencies strawberry-graphql and uvicorn for GraphQL support.

The changes were made to add GraphQL API support to the web application, allowing clients to query and subscribe to data using the GraphQL language. (8d87a6c)

  • feat(addons.py): add new file addons.py to manage addons configuration and copying feat(base.py): add build_context method to prepare and clean build context for building custom images refactor(base.py, odoo.py): move build_image method to build custom image using Dockerfile in build context feat(base.py): add build method to build custom image and clean build context feat(base.py): add build_context_path property to get the path of build context for the service feat(odoo.py): add _prepare_build_context method to prepare build context for Odoo service (c86f77f)

  • feat(context.py): add method get_build_context_path() to return the path to the build context

The method get_build_context_path() is added to the Context class in order to retrieve the path to the build context. This method returns a Path object representing the path to the build context, which is set to "/tmp/odooghost". This change is made to improve the code's readability and maintainability by encapsulating the logic for obtaining the build context path within a dedicated method. (5d1177c)

  • feat(renderer.py): add support for additional keyword arguments in render_dockerfile function

The render_dockerfile function in renderer.py now accepts additional keyword arguments. This allows for more flexibility and customization when generating a custom dockerfile for the Odoo image. (2fd2553)

  • feat(config.py): add support for specifying python dependencies as a list or as files chore(config.py): add validation for addons configuration to ensure that local addons path exists and remote addons have defined branch and origin refactor(exemple-stack.yml): Adapt file looking forward to recent changes in config module (4a544af)

  • feat(alerts): add VErrorAlert, VSuccessAlert, and VWarningAlert components

  • Add VErrorAlert component to display error alerts with a red color scheme.
  • Add VSuccessAlert component to display success alerts with a green color scheme.
  • Add VWarningAlert component to display warning alerts with a yellow color scheme.

These components are reusable and can be used to display different types of alerts throughout the application. They accept title and text props to customize the content of the alerts. The styling of the alerts is defined using Tailwind CSS classes. (72e04ee)

  • feat(web): Add basic application shell (156361a)

  • feat(tailwind.config.cjs): add primary color to the theme to customize the design feat(tailwind.config.cjs): add @tailwindcss/forms plugin to enable form styling (7857e92)

  • feat(web): add favicon and app icons for better branding and user experience feat(web): add site.webmanifest file to configure web app properties like name, icons, and colors (0e5cc5b)

  • feat(stack.py): add _ensure_exists decorator to ensure Stack exists before executing certain methods feat(stack.py): implement support for running stacks fix(stack.py): remove redundant check for Stack existence in drop, start, stop, and restart methods (3d11038)

  • feat(root.py): add support for --detach option to not stream Odoo service logs feat(root.py): add support for --open option to open Odoo in browser after starting the stack feat(root.py): add logic to stream Odoo service logs and stop the stack when KeyboardInterrupt is raised (639738c)

  • feat(container.py): add method get_subnet_ip to retrieve the IP address of the container's subnet feat(container.py): add property networks to retrieve the networks configuration of the container (eba67c6)

  • feat(container.py): add search method to Container class to retrieve containers based on filters and stopped status refactor(services/base.py, stack.py): replace filter and list comprehension with Container.search method to improve code readability and maintainability (e504959)

  • feat(types.py): add Attrs type definition to represent a dictionary with string keys and any values

The Attrs type definition is added to represent a dictionary with string keys and any values. This will be used to store attributes in the codebase. (7c43458)

  • feat(stack.py): update Stack.from_name() to use the new stack configuration retrieval method feat(stack.py): update Stack.list() to use the new stack configuration retrieval method refactor(stack.py): remove unused methods save_config() and reload_config() (82253f7)

  • feat(stack.py): add StackState enum to represent the state of a stack (NONE, PARTIAL, READY) feat(stack.py): implement _check_state method to determine the state of a stack based on its config file feat(stack.py): add state property to Stack class to get the current state of a stack feat(stack.py): implement from_name method to create a Stack instance from a stack name feat(stack.py): implement list method to list all stacks feat(stack.py): implement labels method to get the labels of a stack (0bd7dfa)

  • feat(config.py): add class method 'from_file' to StackConfig to create an instance from a JSON/YAML file feat(exceptions.py): add StackConfigError class to handle errors related to stack configuration files (095f77e)

  • feat(docker.py): add stream_container_logs function to stream container logs to a specified stream (13422ba)

  • feat(stack.py): add support for getting container labels and filtering containers by labels feat(stack.py): implement start, stop, and restart methods for starting, stopping, and restarting containers in the stack (8f0b833)

  • feat(root.py): add start, stop, and restart commands to manage stacks feat(root.py): add support for timeout option to stop and restart commands (e5c8084)

  • feat(types.py): add new file types.py to define custom types Filters and Labels

The types.py file is added to the project to define two custom types: Filters and Labels. These types are defined using the typing module from the Python standard library. The Filters type is a dictionary with string keys and string values, while the Labels type is an alias for the Filters type. These types will be used to provide type hints and improve code readability and maintainability. (dd84d54)

  • feat(exceptions.py): add new custom exceptions for container operations

Add new custom exceptions for container operations to provide more specific error handling and improve code readability. The following exceptions were added:

  • StackContainerGetError: Raised when there is an error retrieving a container.
  • StackContainerNotFound: Raised when a container is not found.
  • StackContainerStartError: Raised when there is an error starting a container. (14df53b)
  • feat(container.py): add Container class to represent a Docker container and provide methods for interacting with it (c84a905)

  • feat(config.py): implement version command to print the config version feat(config.py): implement working_dir command to print the working directory (bec7515)

  • feat(context.py): add ContextConfig class to hold configuration file data feat(context.py): add initialize method to load config data from file on context initialization feat(context.py): add config property to get context config data fix(context.py): fix setup method to call initialize after setting up config data (c09d065)

  • feat(docs): add documentation workflow and files

  • Add a new workflow file docs.yaml to deploy documentation on push to the main branch.
  • Configure the workflow to run on push events to the main branch.
  • Add steps to the workflow to checkout the repository, install poetry, setup Python 3.11, install requirements, configure Git, and build the docs.
  • Add a new Makefile target docs-build to build the documentation using mkdocs.
  • Add a new Makefile target docs-deploy to deploy the documentation using mkdocs gh-deploy.
  • Add a new Makefile target clean-docs to clean the generated documentation files.
  • Add a new file explanation.md to the docs directory, which focuses on providing an understanding-oriented approach to the project documentation.
  • Add a new file how-to-guides.md to the docs directory, which focuses on providing a problem-oriented approach to the project documentation.
  • Add a new file index.md to the docs directory, which serves as the main index page for the project documentation.
  • Add a new file reference.md to the docs directory, which will contain reference information for the project.
  • Add a new file tutorials.md to the docs directory, which focuses on providing a learning-oriented approach to the project documentation.
  • Add a new mkdocs.yml file to configure the documentation site, including the site name, theme, plugins, navigation, repository URL, and directory URL usage.
  • Add dependencies for mkdocs, mkdocs-material, and mkdocstrings to the docs section of the pyproject.toml file. (236b1b2)
  • feat(test.yaml): add GitHub Actions workflow for testing on pull requests and pushes to the main branch chore(.gitignore): ignore pytest-related files feat(Makefile): add targets for running unit tests and generating coverage report feat(test_version.py): add test for checking the project version (9d78dd4)

  • feat: add example-stack.yml configuration file

This commit adds a new file example-stack.yml to the repository. The file includes configuration settings for an example application stack.

The example-stack.yml file includes the following configurations:

  • name: Specifies the name of the example stack.
  • odoo: Specifies the configuration settings for the Odoo application.
    • version: Specifies the version of Odoo to use (16.0).
    • cmdline: Specifies additional command line arguments for Odoo (e.g., "--workers=2").
    • addons: Specifies the list of Odoo addons to install.
      • type: Specifies the type of addon (remote or local).
      • origin: Specifies the origin URL for remote addons.
      • branch: Specifies the branch to use for remote addons.
      • path: Specifies the local path for local addons.
    • dependencies: Specifies the dependencies required by Odoo.
      • apt: Specifies the apt packages to install.
      • python: Specifies the Python packages to install.
  • postgres: Specifies the configuration settings for the PostgreSQL database.
    • type: Specifies the type of database (local or remote).
    • version: Specifies the version of PostgreSQL to use (14).
    • host: Specifies the host for remote database (commented out).
    • user: Specifies the user for remote database (commented out).
    • db: Specifies the database name for remote database (commented out).
    • password: Specifies the password for remote database (commented out).

The example-stack.yml file serves as a template for configuring an example application stack using Odoo and PostgreSQL. (0a5eb7b)

  • feat(stack.py): add support for dropping stack and related data feat(stack.py): add support for dropping volumes when dropping stack fix(root.py): change drop() command signature to accept stack_configs argument to drop multiple stacks fix(root.py): update drop() command description to reflect dropping multiple stacks fix(base.py): add labels_as_list() function to convert labels dictionary to list of strings fix(base.py): implement drop_image() method in BaseService to drop custom image if exists fix(base.py): implement drop_volumes() method in BaseService to drop volume if exists fix(base.py): implement drop_containers() method in BaseService to drop containers with matching labels fix(base.py): implement drop() method in BaseService to drop containers, volumes, and image fix(odoo.py): call super() methods in OdooService to inherit drop_image(), drop_volumes(), drop_containers(), and drop() methods from BaseService fix(postgres.py): call super() methods in PostgresService to inherit drop_image(), drop_volumes(), drop_containers(), and drop() methods from BaseService fix(stack.py): implement drop() method in Stack class to drop Odoo and Postgres services and log the action (540a079)

  • feat(base.py): add drop_image, drop_volumes, drop_container, and drop methods to BaseService fix(base.py): change logger.debug to logger.info in ensure_base_image method for better logging (c296317)

  • feat(base.py): add constructor parameters 'name' and 'stack_name' to BaseService class to improve code readability and reusability feat(base.py): add abstract method '_get_container_labels' to BaseService class to provide container labels for odooghost stack and service type feat(base.py): add abstract methods 'create_volumes', 'create_container', and 'create' to BaseService class to define the steps for creating a service feat(base.py): add properties 'volume_name', 'container_name', and 'container_hostname' to BaseService class to provide consistent naming conventions for volumes and containers (b91262c)

  • feat(exceptions.py): add new custom exceptions for network, volume, and container errors

Added new custom exceptions CommonNetworkEnsureError, StackVolumeCreateError, and StackContainerCreateError to handle specific errors related to network, volume, and container operations respectively. These exceptions will be used to provide more specific error messages and improve error handling in the codebase. (79a018b)

  • feat(constant.py): add COMMON_NETWORK_NAME constant to store the name of the common network used by the application

feat(context.py): add create_common_network() method to create the common network used by the application if it doesn't exist

feat(context.py): add ensure_common_network() method to ensure that the common network used by the application exists, creating it if necessary (eba165d)

  • feat(odoo.py): add stack name to image labels (264b47f)

  • feat(utils): add new module progress_stream and stream to improve stream handling and output formatting

The new module progress_stream provides functions for handling progress events in a stream of JSON objects. It includes functions for writing to a stream, streaming output, printing output events, and extracting digests from pull and push events.

The new module stream provides functions for handling streams of text or bytes. It includes functions for converting byte streams to text streams, splitting a stream into chunks, and splitting a stream into JSON objects.

These new modules were added to improve the handling and formatting of streams in the odooghost project. (c557159)

  • feat(odooghost): add support for configuration file 'config.py' to define stack configurations

feat(odooghost): add support for typing in services

fix(odooghost): fix typo in validate_version method name

fix(odooghost): fix typo in validate_version method name

fix(odooghost): fix typo in validate_name method name

feat(odooghost): add Stack class to manage stack configurations and services

feat(odooghost): implement ls method to list available stacks

feat(odooghost): implement init method to initialize a stack from a configuration file

feat(odooghost): implement _ensure_base_images method to ensure base images are available

feat(odooghost): implement _build_images method to build custom images (b034b10)

  • feat(stack.py): add search class method to Stack class feat(stack.py): add _ensure_base_images method to Stack class to ensure base images are present feat(stack.py): add _build_images method to Stack class to build images (a3b6e47)

  • feat(renderer.py): add new module for rendering custom Dockerfile for Odoo image

feat(Dockerfile.j2): add template for rendering Dockerfile with Odoo version and optional dependencies

The new renderer.py module is added to handle the rendering of a custom Dockerfile for the Odoo image. It uses the Jinja2 template engine to render the Dockerfile based on the provided Odoo version and optional apt and pip dependencies.

The Dockerfile.j2 template is also added, which includes the base image as odoo:{{ odoo_version }}. It also includes conditional blocks to install any specified apt or pip dependencies.

This change allows for more flexibility in customizing the Odoo image by providing a way to easily generate a Dockerfile with specific dependencies. (5d73497)

  • feat(exceptions.py): add StackAlreadyExistsError class to handle the case when a stack already exists (53a076c)

  • feat(root.py): add support for creating multiple stacks at once

The create command in root.py now accepts a list of stack configuration files as an argument. This allows users to create multiple stacks in one command.

Each stack configuration file is processed individually, and the create method of the Stack class is called for each file. This ensures that each stack is created separately.

This change improves the usability of the CLI tool by providing a convenient way to create multiple stacks with a single command. (6ced26c)

  • feat(exceptions.py): add new exception classes StackException, StackImageEnsureError, and StackImagePullError to handle specific errors related to stack operations (68661af)

  • feat(stack.py): add validation for Odoo version in OdooStackConfig add methods for listing and inspecting stacks add methods for managing stack lifecycle (create, drop, update, start, stop, restart) add properties for accessing stack name, Odoo service, and Postgres service add property for checking if stack exists (d7fb32d)

  • feat(services): add new services module with base, odoo, and postgres modules

The new services module is added to the odooghost package. It includes three modules: base, odoo, and postgres.

The base module contains the abstract base class BaseService which defines the common functionality for all services. It includes a method ensure_image() to ensure that the required Docker image is available. The image_tag property is defined as an abstract property.

The odoo module contains the OdooService class which extends BaseService. It takes a config parameter of type stack.OdooStackConfig and sets it as an instance variable. The image_tag property is implemented to return the image tag based on the version specified in the config.

The postgres module contains the PostgresService class which also extends BaseService. It takes a config parameter of type stack.PostgresStackConfig and sets it as an instance variable. It includes an is_remote property to check if the type of the config is "remote". The image_tag property is implemented to return the image tag based on the version specified in the config. (5df2042)

  • feat(cli): add stack subcommands to manage Odoo stacks
  • Add stack/__init__.py to expose the cli object from stack/root.py
  • Add stack/root.py to implement stack subcommands for managing Odoo stacks
  • Add check command to validate stack configurations
  • Add create command to create one or more stacks
  • Add drop command to drop a stack and its related data
  • Add update command to update a stack
  • Add start command to start a stack
  • Add stop command to stop a stack
  • Add restart command to restart a stack
  • Add ls command to list created stacks
  • Add ps command to list running stacks (862fde4)
  • feat(stack.py): add new file stack.py to implement a Stack class for managing stack configurations feat(stack.py): add PostgresStackConfig class to represent the configuration for a Postgres stack feat(stack.py): add DependenciesConfig class to represent the configuration for stack dependencies feat(stack.py): add AddonsConfig class to represent the configuration for addons in a stack feat(stack.py): add OdooStackConfig class to represent the configuration for an Odoo stack feat(stack.py): add StackConfig class to represent the overall stack configuration feat(stack.py): implement Stack class with constructor and from_file method for loading stack configurations from a file (6ba033b)

  • feat(cli): add support for 'version' command to print OdooGhost version fix(cli): improve error handling and logging in 'setup' command feat(cli): add support for 'drop' command to drop OdooGhost environment and related data feat(cli): add support for 'web' command to run OdooGhost webserver feat(cli): add 'stack' subcommands to manage Odoo stacks (6aee7bf)

  • feat(config.py): add version and working_dir commands to the CLI for printing config version and working directory respectively fix(config.py): remove NotImplementedError from version and working_dir commands as they are not yet implemented (32c14d5)

  • feat(logger.py): add InterceptHandler class to convert default logging LogRecord to loguru format feat(logger.py): add setup_cli_logging function to configure logger for CLI feat(pyproject.toml): add loguru dependency to enable loguru logging library in the project fix(pyproject.toml): fix odooghost script entry point to point to the correct module and function (d4896e5)

  • feat(cli): add 'setup' command to initialize OdooGhost environment

  • Added a new command 'setup' to the CLI to initialize the OdooGhost environment.
  • The 'setup' command takes a required argument 'working_dir' which specifies the directory where the OdooGhost environment will be set up.
  • If the specified directory does not exist, it will be created.
  • If the specified directory exists and is not empty, an error message will be displayed.
  • The 'setup' command creates the necessary directories for the OdooGhost environment: 'config.yml', 'data', and 'plugins'.
  • The 'config.yml' file is created with the version and working directory information.
  • If the OdooGhost environment is already set up, an error will be raised.

feat(context): add Context class to manage OdooGhost environment

  • Added a new module 'context.py' to manage the OdooGhost environment.
  • The 'Context' class is responsible for handling the setup state of the OdooGhost environment.
  • The 'Context' class has a 'check_setup_state' method to check if the OdooGhost environment is already set up.
  • The 'Context' class has a 'setup' method to set up the OdooGhost environment.
  • The 'setup' method creates the necessary directories and the 'config.yml' file with version and working directory information.
  • If the OdooGhost environment is already set up, an error will be raised.

feat(exceptions): add custom exceptions for OdooGhost

  • Added a new module 'exceptions.py' to define custom exceptions for OdooGhost.
  • The 'OdooGhostException' class is the base exception class for all OdooGhost exceptions.
  • The 'ContextAlreadySetupError' class is a specific exception that is raised when the OdooGhost environment is already set up. (f25e3e2)
  • feat: add OdooGhost entry point file

Add a new file __main__.py in the odooghost directory to serve as the entry point for the OdooGhost application.

feat: add main module for CLI

Add a new file main.py in the odooghost/cli directory to define the main module for the OdooGhost command-line interface (CLI).

chore: update project version

Update the version of the project in the pyproject.toml file from 0.1.0-alpha1 to 0.1.0.

feat: add typer dependency

Add the typer dependency to the project in the pyproject.toml file with a version constraint of ^0.9.0.

feat: add odooghost script

Add a script entry for odooghost in the pyproject.toml file to run the odooghost.cli.main:cli command as the entry point for the odooghost script. (10fd969)

Fix

  • fix(cli/stack/root.py): pass 'volumes' argument to 'drop' method in Stack class to enable dropping services volumes fix(services/base.py): add 'raise_not_found' parameter to 'get_container' method in BaseService class to control whether to raise an exception when container is not found or not fix(services/base.py): add warning message when trying to create a service container that already exists and force option is not used fix(stack.py): pass 'force' argument to 'create' method in PostgresService and OdooService classes to enable recreating the containers (1ffeb84)

  • fix(base.py): uncomment the line to remove the build context directory to prevent it from accumulating unnecessary files fix(base.py): update the default image option to use the custom image tag if available, otherwise use the base image tag (1da8e0a)

  • fix(odoo.py): add null check for python dependencies before iterating over files to prevent potential error when no files are present (91f8981)

  • fix(config.py): improve name property to remove ".git" suffix from origin URL when type is not "local" fix(config.py): update container_posix_path property to use mode variable instead of hardcoding "copy" (f4913c6)

  • fix(base.py): remove abstractmethod decorator from _prepare_build_context method fix(odoo.py): call super()._prepare_build_context instead of super()._clean_build_context fix(stack.py): change default value of ensure_addons parameter in create method to True (c55dcc5)

  • fix(config.py): add field serializer for 'path' attribute in AddonsConfig class to convert Path object to string representation This was causing JSON serializer to throw exception because it does not know how to serialize pathlib.Path (96d8f1d)

  • fix(context.py): fix typo in variable name '_stack_manager._working_dir' to '_stack_dir' to correctly create the directory (09e91fe)

  • fix(SettingsView.vue, StackView.vue, UsageView.vue): replace placeholder content with VErrorAlert component to indicate that the sections are not implemented yet (e8e5518)

  • fix(root.py): remove unnecessary raise NotImplementedError() and implement ps() function to list running stacks fix(root.py): catch and log StackAlreadyExistsError exception when creating a stack (69b62e4)

  • fix(cli/stack/root.py): add 'wait' parameter to the 'stop' function call in the 'stop' command to allow waiting for containers to stop fix(stack.py): add 'wait' parameter to the 'stop' function to allow waiting for containers to stop (98e08df)

  • fix(root.py): change stack_configs argument to stack_names to follow last Context changes feat(root.py): implement ls command to list created stacks (876bc1a)

  • fix(odoo.py, postgres.py): change method call from _get_container_labels() to labels() to follow recent BaseService changes (1ab0339)

  • fix(context.py): add error handling for non-existent stack config file in get method feat(context.py): add drop method to remove stack from context (ae62974)

  • fix(config.py): add type hinting to string_to_list method in DependenciesConfig class to improve code readability and maintainability fix(config.py): fix typo in validate_version method in OdooStackConfig class fix(config.py): add type hinting to validate_name method in StackConfig class to improve code readability and maintainability (6c7c813)

  • fix(stack.py): import correct function labels_as_list from odooghost.utils.misc instead of odooghost.utils.docker feat(stack.py): add docstrings to StackState enum and its members to improve code documentation feat(stack.py): add docstrings to Stack class methods and properties to improve code documentation feat(stack.py): add repr and eq methods to Stack class for better representation and comparison of Stack instances (b0ef375)

  • fix(container.py): fix passing options argument to _create_container_args function

The options argument was not being passed correctly to the _create_container_args function. This commit fixes the issue by removing the double asterisks before the options argument. (a8c0ed8)

  • fix(stack.py): add check for stack existence before starting, stopping, or restarting to prevent errors when stack does not exist feat(stack.py): add logging messages for stopping and restarting containers to provide better feedback to the user feat(stack.py): add check for no containers to stop or restart and log a warning message to inform the user (32fe8ad)

  • fix: CI was fixed (bc87841)

  • fix(exceptions.py): add StackNotFoundError class to handle cases when a stack is not found fix(stack.py): add check for stack existence before dropping it to prevent errors when trying to drop a non-existent stack feat(stack.py): use Docker API to check if a stack exists instead of listing containers to improve performance (d7bd98b)

  • fix(base.py): handle APIError when creating volumes in BaseService.create_volumes() method to provide more informative error message refactor(postgres.py): delegate volume creation to the parent class in PostgresService.create_volumes() method to avoid code duplication (d2e46ba)

  • fix(odoo.py): change the signature of the build_image method to accept optional parameters rm and no_cache fix(odoo.py): add logic to retrieve the image ID after building the Odoo custom image feat(progress_stream.py): add function get_image_id_from_build to extract the image ID from the build events list (8f6cedd)

  • fix(cli/stack/root.py): catch additional exceptions when creating stack from config file to improve error handling feat(stack.py): add support for ensuring addons during stack creation to provide flexibility (eac0737)

  • fix(odoo.py): add missing import statements for sys, BytesIO, logger, exceptions, renderer, utils, and ctx feat(odoo.py): add support for building custom Odoo image with specified dependencies feat(odoo.py): add property to generate base image tag based on Odoo version feat(odoo.py): add property to generate image tag for custom Odoo image based on stack name and Odoo version feat(odoo.py): add property to check if custom image is available for Odoo service (5756990)

  • fix(postgres.py): add stack_name parameter to PostgresService constructor to improve clarity and usage feat(postgres.py): add ensure_base_image method to PostgresService to handle remote type configuration fix(postgres.py): rename image_tag property to base_image_tag for clarity and consistency (4f424cf)

  • fix(exceptions.py): fix syntax error (86230f9)

  • fix(base.py): change import statement from ImageNotFound to NotFound to match the actual import feat(base.py): add support for pulling the base image if it is not found feat(base.py): add abstract method build_image() to be implemented by subclasses feat(odoo.py): implement build_image() method to build custom image for Odoo service feat(odoo.py): implement has_custom_image property to indicate that Odoo service has a custom image feat(postgres.py): implement build_image() method to build custom image for Postgres service feat(postgres.py): implement has_custom_image property to indicate that Postgres service does not have a custom image (2a9cdff)

  • fix(main.py): call main function directly instead of main.cli() to fix import error feat(main.py): add logger setup before calling main function to enable logging in the CLI feat(cli/init.py): create main function to set up CLI logging and call cli() function feat(cli/config.py): add config subcommands to manage OdooGhost config feat(cli/root.py): add setup command to set up OdooGhost environment (7793c0a)

Refactor

  • refactor(base.py): remove unnecessary code block for handling NotFound exception in BaseService class (991fad2)

  • refactor(config.py): rename 'postgres' attribute to 'db' in StackServicesConfig class for better clarity and semantics refactor(base.py): update 'config' property in BaseService class to access the 'services' attribute in stack_config for improved readability and consistency (bd2dd85)

  • refactor(stack): Stack services are now under services config option (8704973)

  • refactor(root.py): replace specific exception handling with a generic StackException to improve code readability and maintainability (aaa53c6)

  • refactor(addons.py): rename _addons_config to config for better readability (f48ddf3)

  • refactor(odoo.py): extract _get_mounts method to improve readability and maintainability (fd1fac1)

  • refactor(addons.py): extract common logic into a private method _get_addons to improve code readability and maintainability feat(addons.py): add get_mount_addons method to retrieve addons with mode "mount" fix(addons.py): update get_addons_path method to use _get_addons instead of get_copy_addons to include addons with both "copy" and "mount" modes (d3cae2a)

  • refactor: Move AddonsCopy in addons config directly (a93cf09)

  • refactor(odoo.py): simplify logic for copying addons and requirements files feat(odoo.py): add support for custom command line arguments to be passed to the Odoo container (37b5063)

  • refactor(base.py): refactor build_context method to use try-finally block for better exception handling and resource cleanup (79340f7)

  • refactor(config.py): add serialization logic for 'files' field in PythonDependenciesConfig class to convert Path objects to string paths feat(config.py): add utility methods in PythonDependenciesConfig class to get mount path, file hash, and file mount path for pip requirements (6c830d6)

  • refactor(addons.py): replace hashlib.md5 with get_hash function for generating name_hash refactor(addons.py): add get_addons_path method to return a comma-separated string of container_posix_path refactor(addons.py): add has_copy_addons and has_mount_addons properties to check if there are addons with mode "copy" or "mount" fix(addons.py): fix typo in InvalidAddonsPathError message (200bde7)

  • refactor(exceptions.py): move CommonNetworkEnsureError to StackException for consistency and clarity (39b446d)

  • refactor(container.py): simplify get_subnet_ip method to return the first IP address from networks dictionary

The get_subnet_ip method in the Container class was simplified to return the first IP address from the networks dictionary. The previous implementation used a loop to collect all IP addresses and returned the first one if there was only one IP address, otherwise it returned a list of IP addresses. The new implementation directly returns the value of the first IP address from the dictionary. This simplifies the code and improves readability. (9a177a6)

  • refactor(odoo.py): extract labels into a separate method for better code organization and readability (fdfc060)

  • refactor(stack.py): move logger.info statements to appropriate locations for better readability and consistency feat(stack.py): add saving and dropping of stack config to ensure proper management of stack configurations (4ac0a3a)

  • refactor(base.py): change return type of labels() method from dict[str, str] to Labels class for better type safety and readability (4cda872)

  • refactor(base.py): update import statement for labels_as_list function to reflect new module structure

The import statement for the labels_as_list function in the odooghost.utils.docker module has been updated to odooghost.utils.misc module. This change was made to reflect the new module structure and improve code organization. (7ff44ef)

  • refactor(container.py): change get_container_name method to use type hints and improve variable names for better readability refactor(container.py): add type hints to the init method of the Container class refactor(container.py): add type hints to the get_value method of the Container class refactor(container.py): add type hints to the start, stop, kill, restart, and remove methods of the Container class feat(container.py): add stream_logs method to stream logs to a specified stream refactor(container.py): add type hints to the stream_logs method refactor(container.py): add type hints to the stack and service properties of the Container class refactor(container.py): add type hints to the repr method of the Container class refactor(container.py): add type hints to the eq method of the Container class (abee633)

  • refactor(utils): rename docker module to misc module for better clarity and consistency (f7a286c)

  • refactor(base.py): rename _get_container_labels() method to labels() for better clarity and consistency refactor(base.py): use self.labels() method instead of _get_container_labels() method to retrieve container labels refactor(base.py): use self.labels() method instead of _get_container_labels() method to filter containers by labels (1ccc494)

  • refactor(root.py): import Stack class directly from odooghost.stack module for better readability and maintainability fix(root.py): fix incorrect method calls to Stack class by removing unnecessary 'stack.' prefix (a4848d6)

  • refactor(context.py): add support for managing stack configurations in a separate directory feat(context.py): add method to get the path of a stack configuration file based on stack name (f52c81b)

  • refactor(odoo.py, postgres.py): remove unused imports and methods, simplify create_container method (91fe402)

  • refactor(base.py): remove abstractmethod decorator from some methods feat(base.py): add create_container method to create a new container with given options feat(base.py): add start_container method to start the container associated with the service feat(base.py): add get_container method to retrieve the container associated with the service (b7449a8)

  • refactor(utils): move docker related functions to separate module for better organization and maintainability feat(utils/docker.py): add labels_as_list function to convert dictionary of labels to a list of strings (c722923)

  • refactor(logger.py): add return type annotation to the emit method in InterceptHandler class for better code readability and maintainability (e57c95f)

  • refactor(odoo.py): move '_get_container_labels' method to the base class 'BaseService' for code reuse fix(odoo.py): update 'create_container' method to handle APIError and raise a custom exception if container creation fails (2f929d8)

  • refactor(stack.py): remove unused methods _ensure_base_images and _build_images to simplify code and improve readability feat(stack.py): add creation of common network before creating services to ensure proper communication between services (1259077)

  • refactor(postgres.py): Follow last BaseService changes

feat(postgres.py):

  • Add support for creating volumes for the db container
  • Add support for creating the db container with the necessary environment variables and mounts (9c32f32)
  • refactor(odoo.py): follow last BaseService changes (78d9ed6)

  • refactor(context.py): change return type annotation of docker method from docker.Client to "docker.DockerClient" for better type hinting and clarity (65c51e5)

  • refactor(context.py): add docker client property to Context class for better code organization and reusability feat(context.py): add docker import statement to support docker client usage in Context class (135d0ae)

  • refactor(context.py): remove unused variable and unnecessary TODO comment (213053e)

Unknown

  • 0.1.0

Automatically generated by python-semantic-release (7e81854)

  • doc(config.py): add comprehensive comments to improve code readability and documentationn (0d0fafe)

  • Merge pull request #1 from remyz17/stack+configs

feat: implement Stack config managment in context (be16cd4)

  • doc(context.py): improve code readability and add docstrings to methods and classes (d8a325d)

  • Initial commit (235a6c5)