Skip to content

Commit

Permalink
3.0.0
Browse files Browse the repository at this point in the history
### BREAKING CHANGES:
* Dropped Python<3.8.
* Dropped API v2 and v3.
* Execution template, template option, periodic task models and API changed a lot. See documentation for more info.
* Hosts and groups count removed from ``/stats/``. Execution and inventory plugins count added instead.
* All API paths containing ``module`` or `playbook` now named ``ansible_module`` or ``ansible_playbook`` accordingly.
* Old ``ci_template`` variable values are not compatible with new which require template option ids. Need to change manually.
* Paths end with ``../set_owner/`` now handles ``PATCH`` method instead of ``POST``. Same for ``/project/{id}/sync/``, ``/history/{id}/cancel/``.
* Import inventory actions now called ``import_inventory``.
* ``plugins`` section renamed to ``execution.plugin`` in ``settings.ini``.
* Database migrations are **potentially dangerous**, it's recommended to make backup before.
* Inventory model now has ``plugin`` field which is required in API.
* Remove ``import_inventory_from_file`` action.
* Rework ``import_inventory`` action.
* Remove ``master_project`` from ``Host``, ``Group`` and ``Inventory`` and remove ``InventoryItems`` abstract model itself.
* Execution plugins now must provide ``compatible_inventory_plugins`` setting. If not provided this is understood that execution plugin is incompatible with any inventory.
* Execution plugins now should be imported from ``polemarch.plugins.execution`` module instead of ``polemarch.plugins``.
* Execution plugin's ``get_execution_data`` now returns command and env vars only. For ``raw_inventory`` there is ``get_raw_inventory`` method.

### Changelog:
* Feature(backend): Send history output to multiple places.
* Feature(backend): Create ``POLEMARCH_DB``, ``ANSIBLE_STRING`` and ``ANSIBLE_FILE`` plugins which are handle inventory data structure and processing. Plugins may work with state or db and may support import or not.
* Feature(backend): Hide hosts db stuff for state handled plugins and state action for db handled plugins.
* Feature(backend): Option ``compatible_inventory_plugins`` is dictionary of field names and tuple of plugin names.
* Feature(backend): Make ``get_pre_commands`` hook for execution plugins.
* Feature(backend): Allow to save multiple commands in history instance.
* Feature(backend): Create ``DynamicPluginField`` to allow inventory plugin have ``to_representation``, ``to_internal`` etc.
* Feature(frontend): Add inventory plugins counter to dashboard.
* Feature(frontend): Support ``filters`` by ``InventoryAutoCompletionField`` field and filter supported plugins in execute actions.
* Feature(frontend): Display execution args as fields in history page.
* Fix(backend): Deleting template options when inventory removes doesn't work with postgres.
* Fix(backend): Always save revision to history instead of branch.
* Fix(backend): Make ``import_inventory`` action atomic.
* Fix(backend): ``import_inventory`` creates state for inventory if it's state managed.
* Fix(backend): Remove patch method from inventory state edit action because it resets data if no data sent.
* Fix(docs): RTD build with new Python version.
* Chore(backend): Test execution plugins.
* Chore(backend): Bump vstutils version to 5.4.0.
* Chore(frontend): Update frontend dependencies.
* Chore(docs): Update execution plugins doc according to changes.
* Chore(docs): Update information with latest changes of vstutils.
* Refactor(backend): Rewrite all views using ``create_view``, ``@SimpleAction``, ``@Action``, ``@EmptyAction`` where possible.
* Refactor(backend): Refactor plugin executions so ``CELERY_TASK_SERIALIZER='json'`` now can be used.
* Refactor(backend): Create ``ExecutionTemplate`` (instead of `Template`), ``ExecutionTemplateOption`` (instead of ``TemplateOption``),
``TemplatePeriodicTask`` (instead of ``PeriodicTask``) models.
* Refactor(backend): Add support for parsing new template format in ``.polemarch.yaml``, make old format deprecated.
* Refactor(backend): Remove unnecessary frontend code, such as setting ``hideNotRequired = true``, as it can be done now on backend.
* Refactor(backend): Removed ``set_inventory_field`` openapi hook.
* Refactor(backend): Move inventory rendering logic to plugins.
* Refactor(backend): Move inventory import logic to plugins.
* Refactor(backend): Move history and execution plugins to ``polemarch.plugins`` package.
* Refactoring(backend): Execute and template option create actions now validates all fields related to ``Inventory`` instead of just ``inventory`` field.
* Docs: Update GUI workflow docs screenshots.
* Docs: Add manual for creating inventory plugins.
* Docs: Add GUI workflow docs for ``ANSIBLE_STRING`` and ``ANSIBLE_FILE`` inventories.
* Service: Use ``django.core.cache.backends.redis.RedisCache`` instead of ``django_redis.cache.RedisCache``.

See merge request polemarch/ce!303
  • Loading branch information
onegreyonewhite committed Mar 22, 2023
2 parents 51b5713 + b9f862b commit cef8d38
Show file tree
Hide file tree
Showing 141 changed files with 15,594 additions and 11,140 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ py311-coverage:
variables:
TOX_ENVS: "$CI_BUILD_NAME"

py36-install:
py38-install:
<<: *branch_tests
variables:
TOX_ENVS: "$CI_BUILD_NAME"
Expand Down
26 changes: 26 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
nodejs: "16"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
formats:
- pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: requirements-doc.txt
2 changes: 1 addition & 1 deletion doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This is an example of api schema, but you can find actual schema on Polemarch ho
.. _structure:

Structure
-----------------------
---------

In Polemarch we have some entities that can be nested to another entities. Below examples of such entities:

Expand Down
Loading

0 comments on commit cef8d38

Please sign in to comment.