Skip to content

Commit

Permalink
3.0.3
Browse files Browse the repository at this point in the history
#### Changelog:
* Feature(backend): Migrate to vstutils 5.6.
* Feature(backend): Provide to setup normal headers to endpoint operations.
* Feature(plugins): Provide async support for history write plugins.
* Feature(web): Provided lightweight healthcheck for webserver ``/api/live/``.
* Fix(backend): Improved healthcheck endpoint to make simple db requests and check current celery connection.
* Fix(dev): Building with docker compose.
* Chore(service): Improved centrifugo notification performance and stability.
* Chore(web): Improved performance for static files.

See merge request polemarch/ce!309
  • Loading branch information
onegreyonewhite committed Jul 22, 2023
2 parents 13ddb7c + fb07f50 commit 2e439f2
Show file tree
Hide file tree
Showing 22 changed files with 7,732 additions and 7,868 deletions.
16 changes: 15 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,25 @@ test_data
test_data_ce
tests.py
tests_ce.py
ce/.tox
ce/helm
ce/dist
ce/build
ce/env
ce/venv
ce/node_modules

node_modules
.coverage
.cache
.ruff_cache
env
dist
.tox

!Dockerfile
!.dockerignore
!ce/Dockerfile
ce
!ce/polemarch
!ce/setup.py
!ce/doc
Expand Down
77 changes: 27 additions & 50 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# set to local images because too long execution
default:
image: registry.gitlab.com/vstconsulting/images:build
image: registry.gitlab.com/vstconsulting/images:ubuntu-v2

variables:
GET_SOURCES_ATTEMPTS: 3
Expand Down Expand Up @@ -34,18 +34,24 @@ stages:
###########################################
.branch_tests_template: &branch_tests
stage: test
image: registry.gitlab.com/vstconsulting/images:tox
image: registry.gitlab.com/vstconsulting/images:ubuntu-v2
coverage: '/\d+\%\s*$/'
variables:
TOX_ENVS: ""
YARN_CACHE_FOLDER: "${CI_PROJECT_DIR}/yarn"
before_script:
- if [ "${CI_BUILD_REF_NAME}" != "master" -a "${CI_BUILD_REF_NAME}" != "developer" ]; then export TOX_ARGS="--workdir /tmp/.tox_polemarchplus_${CI_BUILD_REF_NAME}"; fi
- >
if [ "${CI_COMMIT_REF_NAME}" != "master" -a "${CI_COMMIT_REF_NAME}" != "developer" ]; then
export TOX_ARGS="--workdir /tmp/.tox_polemarch_${CI_COMMIT_REF_NAME}";
unset BUILD_OPTIMIZATION;
fi
- if [ "${TOX_ENVS}" ]; then export TOX_ARGS="${TOX_ARGS} -e ${TOX_ENVS}"; fi
script:
- tox -e $TOX_ENVS $TOX_ARGS
- tox $TOX_ARGS
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
- if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH =~ /^release_/'
when: on_success
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
- if: '($CI_COMMIT_BRANCH != "master" && $CI_COMMIT_BRANCH !~ /^release_/) && ($CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "external_pull_request_event")'
when: on_success
- if: '$CI_PIPELINE_SOURCE == "web" && $CI_COMMIT_TAG == null'
when: on_success
Expand All @@ -54,7 +60,7 @@ stages:

.js_tests_template: &branch_js_tests
<<: *branch_tests
image: registry.gitlab.com/vstconsulting/images:node-tests
image: registry.gitlab.com/vstconsulting/images:node18-tests
before_script:
- yarn install --pure-lockfile --mutex network
script:
Expand All @@ -66,62 +72,33 @@ stages:
code_style:
<<: *branch_tests
stage: code_standarts
variables:
TOX_ENVS: "flake,pylint"
parallel:
matrix:
- TOX_ENVS:
- flake
- pylint

js_style:
<<: *branch_js_tests
stage: code_standarts
script:
- yarn lint

py311-coverage:
<<: *branch_tests
variables:
TOX_ENVS: "$CI_BUILD_NAME"

py38-install:
functional_test:
<<: *branch_tests
variables:
TOX_ENVS: "$CI_BUILD_NAME"
parallel:
matrix:
- TOX_ENVS:
- py38-install
- TOX_ENVS:
- py311-coverage

# Realese
###########################################
#deploy_environment:
# stage: release
# image: registry.gitlab.com/vstconsulting/images:tox
# services:
# - name: "docker:19.03-dind"
# alias: "docker_service_host"
# script:
# - tox -e deploy_env
# environment:
# name: review/$CI_COMMIT_REF_NAME
# on_stop: delete_environment
# url: http://polemarch-$KUBE_NAMESPACE.$KUBE_INGRESS_BASE_DOMAIN
# only:
# kubernetes: active
# refs:
# - branches
# when: manual
#
#delete_environment:
# stage: release
# image: registry.gitlab.com/vstconsulting/images:tox
# script:
# - tox -e destroy_env
# environment:
# name: review/$CI_COMMIT_REF_NAME
# action: stop
# only:
# kubernetes: active
# refs:
# - branches
# when: manual

release:
stage: release
image: registry.gitlab.com/vstconsulting/images:tox
image: registry.gitlab.com/vstconsulting/images:ubuntu-v2
rules:
- if: '$CI_COMMIT_BRANCH == "master" && $GIT_ACCESS_USER && $GIT_ACCESS_PASSWORD'
when: on_success
Expand Down Expand Up @@ -185,7 +162,7 @@ publish_docker:

publish_release:
stage: publish
image: registry.gitlab.com/vstconsulting/images:tox
image: registry.gitlab.com/vstconsulting/images:ubuntu-v2
allow_failure: true
needs: ["release_pypi"]
rules:
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ ignored-classes=optparse.Values,thread._local,_thread._local,
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=RepoTask.task_class,PlusEventLog.delay
generated-members=RepoTask.task_class,PlusEventLog.delay,asyncio.subprocess.Process

# List of decorators that produce context managers, such as
# contextlib.contextmanager. Add to this list to register other decorators that
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build:
os: ubuntu-22.04
tools:
python: "3.11"
nodejs: "16"
nodejs: "18"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
Loading

0 comments on commit 2e439f2

Please sign in to comment.