Skip to content

Commit e917493

Browse files
2.1
##### Changelog: * Optimization: Improve performance for worker's initialization and memory usage. * Feature: Clone/download project directly from source on `repo_sync_on_run` enabled. * Feature: Set `ANSIBLE_CONFIG` env variable in project. * Feature: Provide setup `max_content_length` in config for TAR downloading. * Fix: Reimplement `repo_sync_on_run_timeout`. * Fix: Bug with updating execution template from host list inventory to FK inventory. * Chore: Bump `requests` lib version to `2.27.1`. * Chore: Bump `vstutils` to `5.0.13`. Closes: vstconsulting/polemarch#117 Closes: vstconsulting/polemarch#124 See merge request polemarch/ce!276
2 parents fada05e + 28e98aa commit e917493

32 files changed

+949
-412
lines changed

.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ omit =
2727
*celery_beat_scheduler.py
2828

2929
[report]
30+
fail_under = 100
3031
show_missing = True
3132
exclude_lines =
3233
pragma: no cover

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ release_pypi:
142142
variables:
143143
TOX_ARGS: ""
144144
script:
145-
- tox -e build $TOX_ARGS
145+
- tox -c tox_build.ini $TOX_ARGS -e py37-build,py37-wheel
146146
- twine upload -u ${PYPI_UPLOAD_NAME} -p ${PYPI_UPLOAD_PASSWORD} $(find dist/*.{tar.gz,whl})
147147
artifacts:
148148
name: "release-packages-${CI_BUILD_REF_NAME}.${CI_BUILD_ID}"

doc/api_schema.yaml

Lines changed: 7 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ info:
2424
url: https://gitlab.com/vstconsulting/polemarch.git
2525
Request:
2626
- name: Question
27-
url: https://gitlab.com/vstconsulting/polemarch/issues/new?issuable_template%5D=Ask&issue%5Btitle%5D=Ask%20about%20version%202.0.0
27+
url: https://gitlab.com/vstconsulting/polemarch/issues/new?issuable_template%5D=Ask&issue%5Btitle%5D=Ask%20about%20version%202.0.1
2828
- name: Bug report
29-
url: https://gitlab.com/vstconsulting/polemarch/issues/new?issuable_template%5D=Bug&issue%5Btitle%5D=Bug%20in%20version%202.0.0
29+
url: https://gitlab.com/vstconsulting/polemarch/issues/new?issuable_template%5D=Bug&issue%5Btitle%5D=Bug%20in%20version%202.0.1
3030
- name: Feature request
3131
url: https://gitlab.com/vstconsulting/polemarch/issues/new?issuable_template%5D=Feature%20request&issue%5Btitle%5D=
3232
x-menu:
@@ -66,9 +66,9 @@ info:
6666
logout_url: /account/logout/
6767
login_url: /account/login/
6868
x-versions:
69-
application: 2.0.0
70-
library: 2.0.0
71-
vstutils: 5.0.11
69+
application: 2.0.1
70+
library: 2.0.1
71+
vstutils: 5.0.13
7272
django: 3.2.15
7373
djangorestframework: 3.13.1
7474
drf_yasg: 1.21.3
@@ -10671,6 +10671,7 @@ definitions:
1067110671
- ansible_port
1067210672
- ansible_user
1067310673
- ansible_connection
10674+
- ansible_password
1067410675
- ansible_ssh_pass
1067510676
- ansible_ssh_private_key_file
1067610677
- ansible_ssh_common_args
@@ -10683,6 +10684,7 @@ definitions:
1068310684
- ansible_become_method
1068410685
- ansible_become_user
1068510686
- ansible_become_pass
10687+
- ansible_become_password
1068610688
- ansible_become_exe
1068710689
- ansible_become_flags
1068810690
- ansible_shell_type
@@ -11825,10 +11827,6 @@ definitions:
1182511827
vars:
1182611828
type: object
1182711829
properties:
11828-
args:
11829-
title: Args
11830-
description: host pattern
11831-
type: string
1183211830
background:
1183311831
title: Background
1183411832
description: run asynchronously, failing after X seconds (default=N/A)
@@ -11866,12 +11864,6 @@ definitions:
1186611864
title: Forks
1186711865
description: specify number of parallel processes to use (default=5)
1186811866
type: integer
11869-
inventory:
11870-
title: Inventory
11871-
description: specify inventory host path or comma separated
11872-
host list. --inventory-file is deprecated
11873-
type: string
11874-
format: inventory
1187511867
limit:
1187611868
title: Limit
1187711869
description: further limit selected hosts to an additional pattern
@@ -11954,9 +11946,6 @@ definitions:
1195411946
debugging)
1195511947
type: integer
1195611948
maximum: 4
11957-
group:
11958-
title: Group
11959-
type: string
1196011949
Task:
1196111950
required:
1196211951
- playbook
@@ -12020,12 +12009,6 @@ definitions:
1202012009
title: Forks
1202112010
description: specify number of parallel processes to use (default=5)
1202212011
type: integer
12023-
inventory:
12024-
title: Inventory
12025-
description: specify inventory host path or comma separated
12026-
host list. --inventory-file is deprecated
12027-
type: string
12028-
format: inventory
1202912012
limit:
1203012013
title: Limit
1203112014
description: further limit selected hosts to an additional pattern
@@ -12189,10 +12172,6 @@ definitions:
1218912172
vars:
1219012173
type: object
1219112174
properties:
12192-
args:
12193-
title: Args
12194-
description: host pattern
12195-
type: string
1219612175
background:
1219712176
title: Background
1219812177
description: run asynchronously, failing after X seconds (default=N/A)
@@ -12230,12 +12209,6 @@ definitions:
1223012209
title: Forks
1223112210
description: specify number of parallel processes to use (default=5)
1223212211
type: integer
12233-
inventory:
12234-
title: Inventory
12235-
description: specify inventory host path or comma separated
12236-
host list. --inventory-file is deprecated
12237-
type: string
12238-
format: inventory
1223912212
limit:
1224012213
title: Limit
1224112214
description: further limit selected hosts to an additional pattern
@@ -12318,9 +12291,6 @@ definitions:
1231812291
debugging)
1231912292
type: integer
1232012293
maximum: 4
12321-
group:
12322-
title: Group
12323-
type: string
1232412294
Task:
1232512295
required:
1232612296
- playbook
@@ -12384,12 +12354,6 @@ definitions:
1238412354
title: Forks
1238512355
description: specify number of parallel processes to use (default=5)
1238612356
type: integer
12387-
inventory:
12388-
title: Inventory
12389-
description: specify inventory host path or comma separated
12390-
host list. --inventory-file is deprecated
12391-
type: string
12392-
format: inventory
1239312357
limit:
1239412358
title: Limit
1239512359
description: further limit selected hosts to an additional pattern
@@ -12587,10 +12551,6 @@ definitions:
1258712551
vars:
1258812552
type: object
1258912553
properties:
12590-
args:
12591-
title: Args
12592-
description: host pattern
12593-
type: string
1259412554
background:
1259512555
title: Background
1259612556
description: run asynchronously, failing after X seconds (default=N/A)
@@ -12628,12 +12588,6 @@ definitions:
1262812588
title: Forks
1262912589
description: specify number of parallel processes to use (default=5)
1263012590
type: integer
12631-
inventory:
12632-
title: Inventory
12633-
description: specify inventory host path or comma separated
12634-
host list. --inventory-file is deprecated
12635-
type: string
12636-
format: inventory
1263712591
limit:
1263812592
title: Limit
1263912593
description: further limit selected hosts to an additional pattern
@@ -12716,9 +12670,6 @@ definitions:
1271612670
debugging)
1271712671
type: integer
1271812672
maximum: 4
12719-
group:
12720-
title: Group
12721-
type: string
1272212673
Task:
1272312674
required:
1272412675
- playbook
@@ -12782,12 +12733,6 @@ definitions:
1278212733
title: Forks
1278312734
description: specify number of parallel processes to use (default=5)
1278412735
type: integer
12785-
inventory:
12786-
title: Inventory
12787-
description: specify inventory host path or comma separated
12788-
host list. --inventory-file is deprecated
12789-
type: string
12790-
format: inventory
1279112736
limit:
1279212737
title: Limit
1279312738
description: further limit selected hosts to an additional pattern
@@ -12939,10 +12884,6 @@ definitions:
1293912884
vars:
1294012885
type: object
1294112886
properties:
12942-
args:
12943-
title: Args
12944-
description: host pattern
12945-
type: string
1294612887
background:
1294712888
title: Background
1294812889
description: run asynchronously, failing after X seconds (default=N/A)
@@ -12980,12 +12921,6 @@ definitions:
1298012921
title: Forks
1298112922
description: specify number of parallel processes to use (default=5)
1298212923
type: integer
12983-
inventory:
12984-
title: Inventory
12985-
description: specify inventory host path or comma separated
12986-
host list. --inventory-file is deprecated
12987-
type: string
12988-
format: inventory
1298912924
limit:
1299012925
title: Limit
1299112926
description: further limit selected hosts to an additional pattern
@@ -13068,9 +13003,6 @@ definitions:
1306813003
debugging)
1306913004
type: integer
1307013005
maximum: 4
13071-
group:
13072-
title: Group
13073-
type: string
1307413006
Task:
1307513007
required:
1307613008
- playbook
@@ -13134,12 +13066,6 @@ definitions:
1313413066
title: Forks
1313513067
description: specify number of parallel processes to use (default=5)
1313613068
type: integer
13137-
inventory:
13138-
title: Inventory
13139-
description: specify inventory host path or comma separated
13140-
host list. --inventory-file is deprecated
13141-
type: string
13142-
format: inventory
1314313069
limit:
1314413070
title: Limit
1314513071
description: further limit selected hosts to an additional pattern

doc/config.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,18 @@ Sections ``[git.fetch]`` and ``[git.clone]``.
374374
Options for git commands. See options in ``git fetch --help`` or ``git clone --help``.
375375

376376

377+
.. _archive:
378+
379+
Archive settings
380+
----------------
381+
382+
Section ``[archive]``.
383+
384+
Here you can specify settings used by archive (e.g. TAR) projects.
385+
386+
* **max_content_length** - Maximum download file size. Format: ``30<unit>``, where unit is *b*, *kb*, *mb*, *gb*, *tb*.
387+
388+
377389
Production web settings
378390
-----------------------
379391

doc/gui.rst

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,31 @@ As you can see, now current project has only 2 variables:
183183

184184
Other available project variables, that you can add with clicking the :guilabel:`Create` button:
185185

186-
* **repo_sync_on_run** - boolean, if true, Polemarch will sync project before every task execution (don't use in concurrent executions, experimental);
187-
* **repo_sync_on_run_timeout** - you can select a timeout when "repo_sync_on_run" will stop the sync attempt;
186+
* **repo_sync_on_run** - boolean, if true, on every execution will be used project files obtained directly
187+
from the remote repository with revision specified in **repo_branch**, instead of current project stored in Polemarch.
188+
* **repo_sync_on_run_timeout** - time value after which attempt to clone project on execution will be stopped. Works
189+
only in conjunction with **repo_sync_on_run**.
190+
191+
.. note::
192+
In case of GIT projects **repo_sync_on_run_timeout** limits time to whole cloning process. For example, if it set
193+
to 3 seconds and after 3 seconds project was cloned only on 70%, execution will be aborted.
194+
195+
This behavior is somewhat different with TAR projects. Timeout specifies how long Polemarch must wait until
196+
successfully establish connection with the server. After that download process will start and continue until it
197+
completes, regardless of **repo_sync_on_run_timeout**.
198+
199+
When working with MANUAL projects both **repo_sync_on_run** and **repo_sync_on_run_timeout** options do not applies.
200+
188201
* **repo_password** - GIT repository password;
189202
* **repo_key** - GIT repository key;
190203
* **playbook_path** - path to playbook;
191204
* **ci_template** - runs the selected template during project synchronization;
192205
* Environment variables, with key starting from **env_**. For example **env_test_var** would create environment variable ``test_var`` on run tasks from this project.
193206

207+
.. note::
208+
You can add ``ANSIBLE_CONFIG`` environment variable by creating ``env_ANSIBLE_CONFIG`` variable in your project.
209+
This will make your project to use specified config at every execution. Make sure that path is relative to project directory.
210+
194211
Let's edit **repo_branch** variable. To do it you need click the **repo_branch** item in list.
195212
Then you will see the following page:
196213

@@ -1025,4 +1042,4 @@ As you can see, the form of "change password" action consists of following field
10251042
There are two buttons here:
10261043

10271044
* :guilabel:`Change password` - this button saves your new password.
1028-
* :guilabel:`Generate password` - generates random password from 12 to 20 characters long. Password will contain capital and lower letters, numbers and special symbols.
1045+
* :guilabel:`Generate password` - generates random password from 12 to 20 characters long. Password will contain capital and lower letters, numbers and special symbols.

polemarch/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
"VST_ROOT_URLCONF": os.getenv("VST_ROOT_URLCONF", 'vstutils.urls'),
3232
}
3333

34-
__version__ = "2.0.1"
34+
__version__ = "2.1.0"
3535

3636
prepare_environment(**default_settings)

0 commit comments

Comments
 (0)