Skip to content

Commit

Permalink
Merge branch 'release' into 'master'
Browse files Browse the repository at this point in the history
Release 2.1.0

See merge request arenadata/development/adcm!3679
  • Loading branch information
kuhella committed Mar 20, 2024
2 parents f8c064d + 9719d64 commit 032e0c0
Show file tree
Hide file tree
Showing 1,844 changed files with 38,776 additions and 148,515 deletions.
10 changes: 0 additions & 10 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
version: 1
update_configs:
- package_manager: "javascript"
directory: "/web"
update_schedule: "daily"
target_branch: "develop"
version_requirement_updates: "auto"
allowed_updates:
- match:
update_type: "all"
dependency_type: "all"

- package_manager: "python"
directory: "/"
update_schedule: "daily"
Expand Down
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
**/tests/
data
venv
web
adcm-web
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
/tests/functional/ @arenadata/python-web-qa
/tests/ui_tests/ @arenadata/python-web-qa
/tests/api/ @arenadata/python-web-qa
/web/ @arenadata/angular
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ data/
config.json
go/bin/
wwwroot/
python/adcm/silk_*.py
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/adcm-web/ @v.remizov @npp @i.kuzmin @v.paskov @d.bardin @k.fedorenko @a.latunov
/data/ @aas @d.skrynnik @aer
/conf/ @aas @d.skrynnik @a.starovoitov @aer
/go/ @aas @d.skrynnik @aer
/os/ @aas @d.skrynnik @aer
/python/ @aas @d.skrynnik @a.starovoitov @aer
/spec/ @aas @d.skrynnik @aer
/web/ @v.remizov @d.bardin @k.fedorenko
.dockerignore @aas @v.remizov @d.skrynnik @aer
.gitignore @aas @d.skrynnik @v.remizov @d.bardin @k.fedorenko @aer
.gitlab-ci.yaml @aas @v.remizov @d.skrynnik @aer
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ RUN apk update && \
curl -sSL https://install.python-poetry.org | python -
ENV PATH="/root/.local/bin:$PATH"
COPY pyproject.toml /adcm/
COPY poetry.lock /adcm/
RUN python -m venv /adcm/venv/2.9 && \
poetry config virtualenvs.create false && \
poetry -C /adcm install --no-root && \
Expand Down
35 changes: 8 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,22 @@ APP_IMAGE ?= hub.adsw.io/adcm/adcm
APP_TAG ?= $(subst /,_,$(BRANCH_NAME))
SELENOID_HOST ?= 10.92.2.65
SELENOID_PORT ?= 4444
ADCM_VERSION = "2.0.0"
ADCM_VERSION = "2.1.0"

.PHONY: help

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

describe_old:
@echo '{"version": "$(shell date '+%Y.%m.%d.%H')","commit_id": "$(shell git log --pretty=format:'%h' -n 1)"}' > config.json
cp config.json web/src/assets/config.json

buildss:
@docker run -i --rm -v $(CURDIR)/go:/code -w /code golang sh -c "make"

buildjs_old:
@docker run -i --rm -v $(CURDIR)/wwwroot:/wwwroot -v $(CURDIR)/web:/code -w /code node:16-alpine ./build.sh

buildjs:
@docker run -i --rm -v $(CURDIR)/wwwroot:/wwwroot -v $(CURDIR)/adcm-web/app:/code -e ADCM_VERSION=$(ADCM_VERSION) -w /code node:18.16-alpine ./build.sh

build_base_old:
@docker build . -t $(APP_IMAGE):$(APP_TAG)_old

build_base:
@docker build . -t $(APP_IMAGE):$(APP_TAG) --build-arg ADCM_VERSION=$(ADCM_VERSION)

# build ADCM_v1
build_old: describe_old buildss buildjs_old build_base_old

# build ADCM_v2
build: buildss buildjs build_base

Expand All @@ -46,24 +33,18 @@ unittests_postgresql:
poetry run python/manage.py test python -v 2 --parallel
docker stop postgres

ng_tests:
docker pull hub.adsw.io/library/functest:3.8.6.slim.buster_node16-x64
docker run -i --rm -v $(CURDIR)/:/adcm -w /adcm/web hub.adsw.io/library/functest:3.8.6.slim.buster_node16-x64 ./ng_test.sh

pretty:
poetry install --no-root --with lint
black license_checker.py python
autoflake -r -i --remove-all-unused-imports --exclude apps.py,python/ansible/plugins,python/init_db.py,python/task_runner.py,python/backupdb.py,python/job_runner.py,python/drf_docs.py license_checker.py python
isort license_checker.py python
python license_checker.py --fix --folders python go
poetry run python license_checker.py --fix --folders python go
poetry run ruff format license_checker.py python
poetry run ruff check --fix license_checker.py python
poetry run ruff format license_checker.py python

lint:
poetry install --no-root --with lint
poetry run black --check license_checker.py python
poetry run autoflake --check --quiet -r --remove-all-unused-imports --exclude apps.py,python/ansible/plugins,python/init_db.py,python/task_runner.py,python/backupdb.py,python/job_runner.py,python/drf_docs.py license_checker.py python
poetry run isort --check license_checker.py python
python license_checker.py --folders python go
poetry run pylint -j 0 --rcfile pyproject.toml --recursive y python
poetry run python license_checker.py --folders python go
poetry run ruff check license_checker.py python
poetry run ruff format --check python

version:
@echo $(ADCM_VERSION)
22 changes: 1 addition & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Re-run them when needed/applicable.
* go - golang part of application. There is a status server here now.
* test
* spec - specification in form of Sphinx RST
* web - UI source
* adcm-web - UI source

# Build logic

Expand Down Expand Up @@ -82,26 +82,6 @@ pre-commit install
After this you will see invocation of black and pylint on every commit.
## Link ADWP_UI packages
If you need to debug packages from ADWP_UI, you should do:
In ADWP_UI repository:
```sh
delete dist folder
yarn run watch:widgets
cd dist/widgets
yarn link
```
In ADCM repository:
```sh
cd web
sudo rm -rf ./node_modules OR rmdir -force ./node_modules(WIN)
yarn link "@adwp-ui/widgets"
yarn install
```
## Running ADCM using SQLite
1. Start container:
Expand Down
4 changes: 2 additions & 2 deletions adcm-web/app/.env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ADCM_API_HOST=http://localhost:8000
ADCM_WS_HOST=ws://localhost:8000
# ADCM_API_HOST=http://localhost:8000
# ADCM_WS_HOST=ws://localhost:8000
ADCM_VERSION=2.0.0
53 changes: 52 additions & 1 deletion adcm-web/app/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,63 @@
{
"settings": {
"import/resolver": {
"alias": {
"map": [
["@uikit", "./src/components/uikit/"],
["@models", "./src/models/"],
["@utils", "./src/utils/"],
["@store", "./src/store/"],
["@constants", "./src/constants"],
["@api", "./src/api/"]
],
"extensions": [".ts", ".js", ".jsx", ".json"]
}
}
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "prettier", "@typescript-eslint", "react-hooks", "react-refresh", "spellcheck"],
"plugins": ["react", "prettier", "@typescript-eslint", "react-hooks", "react-refresh", "spellcheck", "import"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:storybook/recommended",
"plugin:prettier/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"prettier"
],
"rules": {
"import/no-unresolved": "off", // delete after fixing all cycle deps and adding all alias mappings into import/resolver settings above
"import/no-cycle": [
"error",
{
"maxDepth": 10,
"ignoreExternal": true
}
],
"no-restricted-imports": "off",
"@typescript-eslint/no-restricted-imports": [
"error",
{
"paths": [
{
"name": "react-redux",
"importNames": ["useSelector", "useDispatch"],
"message": "Use typed `useStore` and `useDispatch` from '@hooks' instead."
},
{
"name": "@reduxjs/toolkit",
"importNames": ["createAsyncThunk"],
"message": "Use typed `createAsyncThunk` from '@store/redux' instead."
}
]
}
],
"@typescript-eslint/no-unused-vars": ["error", { "ignoreRestSiblings": true }],
"react-refresh/only-export-components": "warn",
"object-curly-spacing": [2, "always"],
Expand Down Expand Up @@ -61,15 +105,19 @@
"enum",
"guid",
"gz",
"highlite",
"hljs",
"hostcomponentmap",
"hostprovider",
"hostproviders",
"href",
"highlite",
"io",
"javascript",
"lang",
"linkable",
"ldap",
"lang",
"maintenance",
"mouseenter",
"mouseleave",
Expand All @@ -94,7 +142,9 @@
"readonly",
"rect",
"redux",
"refractor",
"resize",
"refractor",
"rp",
"req",
"schemas",
Expand All @@ -114,6 +164,7 @@
"tgz",
"toggler",
"tooltip",
"txt",
"ttl",
"ul",
"unlink",
Expand Down
100 changes: 51 additions & 49 deletions adcm-web/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
},
"dependencies": {
"@braintree/browser-detection": "^2.0.0",
"@floating-ui/dom": "1.2.9",
"@floating-ui/react": "0.24.2",
"@reduxjs/toolkit": "1.9.5",
"@floating-ui/dom": "1.6.3",
"@floating-ui/react": "0.26.9",
"@reduxjs/toolkit": "1.9.7",
"ajv": "^8.12.0",
"axios": "1.4.0",
"classnames": "2.3.2",
"date-fns": "2.30.0",
"html-react-parser": "4.2.1",
"js-base64": "3.7.5",
"axios": "1.6.7",
"classnames": "2.5.1",
"date-fns": "3.3.1",
"html-react-parser": "5.1.8",
"js-base64": "3.7.7",
"qs": "6.11.2",
"react": "18.2.0",
"react-collapsed": "4.0.2",
Expand All @@ -35,55 +35,57 @@
"react-redux": "8.1.1",
"react-router-dom": "6.11.2",
"react-syntax-highlighter": "15.5.0",
"redux": "4.2.1"
"redux": "4.2.1",
"refractor": "^4.8.1"
},
"devDependencies": {
"@babel/core": "7.21.8",
"@babel/preset-env": "7.21.5",
"@babel/preset-react": "7.18.6",
"@babel/preset-typescript": "7.21.5",
"@storybook/addon-essentials": "7.0.12",
"@storybook/addon-interactions": "7.0.12",
"@storybook/addon-links": "7.0.12",
"@storybook/blocks": "7.0.12",
"@storybook/builder-vite": "7.0.12",
"@storybook/react": "7.0.12",
"@storybook/react-vite": "7.0.12",
"@storybook/testing-library": "0.0.14-next.2",
"@testing-library/dom": "9.3.0",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "14.0.0",
"@testing-library/user-event": "14.4.3",
"@types/jest": "29.5.2",
"@types/json-schema": "^7.0.12",
"@types/qs": "6.9.7",
"@types/react": "18.0.28",
"@types/react-copy-to-clipboard": "5.0.4",
"@types/react-dom": "18.0.11",
"@types/react-syntax-highlighter": "15.5.7",
"@typescript-eslint/eslint-plugin": "5.57.1",
"@typescript-eslint/parser": "5.57.1",
"@babel/core": "7.23.9",
"@babel/preset-env": "7.23.9",
"@babel/preset-react": "7.23.3",
"@babel/preset-typescript": "7.23.3",
"@storybook/addon-essentials": "^7.6.17",
"@storybook/addon-interactions": "^7.6.17",
"@storybook/addon-links": "^7.6.17",
"@storybook/blocks": "^7.6.17",
"@storybook/builder-vite": "7.6.17",
"@storybook/react": "^7.6.17",
"@storybook/react-vite": "^7.6.17",
"@storybook/testing-library": "0.2.2",
"@testing-library/dom": "9.3.4",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.1",
"@testing-library/user-event": "14.5.2",
"@types/jest": "29.5.12",
"@types/json-schema": "^7.0.15",
"@types/qs": "6.9.12",
"@types/react": "18.2.60",
"@types/react-copy-to-clipboard": "5.0.7",
"@types/react-dom": "18.2.19",
"@types/react-syntax-highlighter": "15.5.11",
"@typescript-eslint/eslint-plugin": "7.1.0",
"@typescript-eslint/parser": "7.1.0",
"@vitejs/plugin-react": "4.0.0",
"eslint": "8.38.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-react": "7.32.2",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-alias": "1.1.2",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-refresh": "0.3.4",
"eslint-plugin-react-refresh": "0.4.5",
"eslint-plugin-spellcheck": "0.0.20",
"eslint-plugin-storybook": "0.6.12",
"husky": "8.0.3",
"eslint-plugin-storybook": "0.8.0",
"husky": "9.0.11",
"identity-obj-proxy": "3.0.0",
"jest": "29.5.0",
"jest-environment-jsdom": "29.5.0",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"json-schema": "0.4.0",
"prettier": "2.8.8",
"prettier": "3.2.5",
"prop-types": "15.8.1",
"sass": "1.62.1",
"storybook": "7.0.12",
"typescript": "5.0.2",
"sass": "1.71.1",
"storybook": "^7.6.17",
"typescript": "5.2.2",
"vite": "4.4.1",
"vite-plugin-eslint": "1.8.1",
"vite-plugin-react-remove-attributes": "1.0.3",
Expand Down
Loading

0 comments on commit 032e0c0

Please sign in to comment.