argus-alm 0.12.3__py3-none-any.whl → 0.12.4b2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. argus/backend/controller/admin_api.py +26 -0
  2. argus/backend/controller/api.py +26 -1
  3. argus/backend/controller/main.py +21 -0
  4. argus/backend/controller/testrun_api.py +16 -0
  5. argus/backend/controller/view_api.py +162 -0
  6. argus/backend/models/web.py +16 -0
  7. argus/backend/plugins/core.py +25 -10
  8. argus/backend/plugins/driver_matrix_tests/controller.py +39 -0
  9. argus/backend/plugins/driver_matrix_tests/model.py +251 -3
  10. argus/backend/plugins/driver_matrix_tests/raw_types.py +27 -0
  11. argus/backend/plugins/driver_matrix_tests/service.py +18 -0
  12. argus/backend/plugins/driver_matrix_tests/udt.py +14 -13
  13. argus/backend/plugins/generic/model.py +5 -2
  14. argus/backend/plugins/sct/service.py +13 -1
  15. argus/backend/service/argus_service.py +116 -20
  16. argus/backend/service/build_system_monitor.py +37 -7
  17. argus/backend/service/jenkins_service.py +2 -1
  18. argus/backend/service/release_manager.py +14 -0
  19. argus/backend/service/stats.py +147 -11
  20. argus/backend/service/testrun.py +44 -5
  21. argus/backend/service/views.py +258 -0
  22. argus/backend/template_filters.py +7 -0
  23. argus/backend/util/common.py +14 -2
  24. argus/client/driver_matrix_tests/cli.py +110 -0
  25. argus/client/driver_matrix_tests/client.py +56 -193
  26. argus_alm-0.12.4b2.dist-info/METADATA +129 -0
  27. {argus_alm-0.12.3.dist-info → argus_alm-0.12.4b2.dist-info}/RECORD +30 -27
  28. {argus_alm-0.12.3.dist-info → argus_alm-0.12.4b2.dist-info}/entry_points.txt +1 -0
  29. argus_alm-0.12.3.dist-info/METADATA +0 -207
  30. {argus_alm-0.12.3.dist-info → argus_alm-0.12.4b2.dist-info}/LICENSE +0 -0
  31. {argus_alm-0.12.3.dist-info → argus_alm-0.12.4b2.dist-info}/WHEEL +0 -0
@@ -1,207 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: argus-alm
3
- Version: 0.12.3
4
- Summary: Argus
5
- Home-page: https://github.com/scylladb/argus
6
- License: Apache-2.0
7
- Author: Alexey Kartashov
8
- Author-email: alexey.kartashov@scylladb.com
9
- Requires-Python: >=3.10,<4.0
10
- Classifier: License :: OSI Approved :: Apache Software License
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
- Requires-Dist: click (>=8.1.3,<9.0.0)
16
- Requires-Dist: requests (>=2.26.0,<3.0.0)
17
- Project-URL: Repository, https://github.com/scylladb/argus
18
- Description-Content-Type: text/markdown
19
-
20
- # Argus
21
-
22
- ## Description
23
-
24
- Argus is a test tracking system intended to provide observability into automated test pipelines which use long-running resources. It allows observation of a test status, its events and its allocated resources. It also allows easy comparison between particular runs of a specific test.
25
-
26
- ## Installation notes
27
-
28
- ### Prerequisites
29
-
30
- - Python >=3.10.0 (system-wide or pyenv)
31
-
32
- - NodeJS >=16 (with npm)
33
-
34
- - Yarn (can be installed globally with `npm -g install yarn`)
35
-
36
- - nginx
37
-
38
- - poetry >=1.2.0b1
39
-
40
- ### From source
41
-
42
- #### Production
43
-
44
- Perform the following steps:
45
-
46
- Create a user that will be used by uwsgi:
47
-
48
- ```bash
49
- useradd -m -s /bin/bash argus
50
- sudo -iu argus
51
- ```
52
-
53
- (Optional) Install pyenv and create a virtualenv for this user:
54
-
55
- ```bash
56
- pyenv install 3.10.0
57
- pyenv virtualenv argus
58
- pyenv activate argus
59
- ```
60
-
61
- Clone the project into a directory somewhere where user has full write permissions
62
-
63
- ```bash
64
- git clone https://github.com/scylladb/argus ~/app
65
- cd ~/app
66
- ```
67
-
68
- Install project dependencies:
69
-
70
- ```bash
71
- poetry install --with default,dev,web-backend,docker-image
72
- yarn install
73
- ```
74
-
75
- Compile frontend files from `/frontend` into `/public/dist`
76
-
77
- ```bash
78
- yarn webpack
79
- ```
80
-
81
- Create a `argus.local.yaml` configuration file (used to configure database connection) and a `argus_web.yaml` (used for webapp secrets) in your application install directory.
82
-
83
- ```bash
84
- cp argus_web.example.yaml argus_web.yaml
85
- cp argus.yaml argus.local.yaml
86
- ```
87
-
88
- Open `argus.local.yaml` and add the database connection information (contact_points, user, password and keyspace name).
89
-
90
- Open `argus_web.yaml` and change the `SECRET_KEY` value to something secure, like a sha512 digest of random bytes. Fill out GITHUB_* variables with their respective values.
91
-
92
- Copy nginx configuration file from `docs/configs/argus.nginx.conf` to nginx virtual hosts directory:
93
-
94
- Ubuntu:
95
-
96
- ```bash
97
- sudo cp docs/configs/argus.nginx.conf /etc/nginx/sites-available/argus
98
- sudo ln -s /etc/nginx/sites-enabled/argus /etc/nginx/sites-available/argus
99
- ```
100
-
101
- RHEL/Centos/Alma/Fedora:
102
-
103
- ```bash
104
- sudo cp docs/configs/argus.nginx.conf /etc/nginx/conf.d/argus.conf
105
- ```
106
-
107
- Adjust the webhost settings in that file as necessary, particularly `listen` and `server_name` directives.
108
-
109
- Copy systemd service file from `docs/config/argus.service` to `/etc/systemd/system` directory:
110
-
111
- ```bash
112
- sudo cp docs/config/argus.service /etc/systemd/system
113
- ```
114
-
115
- Open it and adjust the path to the `start_argus.sh` script in the `ExecStart=` directive and the user/group, then reload systemd daemon configuration and enable (and optionally start) the service.
116
-
117
- WARNING: `start_argus.sh` assumes pyenv is installed into `~/.pyenv`
118
-
119
- ```bash
120
- sudo systemctl daemon-reload
121
- sudo systemctl enable --now argus.service
122
- ```
123
-
124
- #### Development
125
-
126
- Clone the project into a directory somewhere
127
-
128
- ```bash
129
- git clone https://github.com/scylladb/argus
130
- cd argus
131
- ```
132
-
133
- Install project dependencies:
134
-
135
- ```bash
136
- poetry install --with default,dev,web-backend,docker-image
137
- yarn install
138
- ```
139
-
140
- Compile frontend files from `/frontend` into `/public/dist`. Add --watch to recompile files on change.
141
-
142
- ```bash
143
- yarn webpack --watch
144
- ```
145
- ##### Configuration
146
- Create a `argus.local.yaml` configuration file (used to configure database connection) and a `argus_web.yaml` (used for webapp secrets) in your application install directory.
147
-
148
- See `Production` section for more details.
149
- To configure Github authentication follow steps:
150
- 1. Authorize OAuth App
151
- 1. go to your Account Settings (top right corner) -> Developer settings (left pane) -> OAuth Apps
152
- 2. Click Create New OAuth App button
153
- 3. Fill the fields (app name: `argus-dev`, homepage URL `http://localhost:5000`, Auth callback URL: `http://localhost:5000/profile/oauth/github`)
154
- 4. Confirm and get the tokens/ids required for config
155
- 2. Create Jenkins token for your account
156
- 1. Go to `Configure` in top right corner
157
- 2. Click `Add new Token`
158
- 3. Get it and paste to config to `JENKINS_API_TOKEN` param
159
- ##### Database Initialization
160
-
161
- You can initialize a scylla cluster in any way you like, either using docker image with docker-compose or using cassandra cluster manager. You will need to create the keyspace manually before you can sync database models.
162
-
163
- Create keyspace according to your configuration.
164
- e.g. (need to test if it works with RF=1 if not, make it 3)
165
- ```
166
- CREATE KEYSPACE argus WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 1}
167
- ```
168
-
169
- Initial sync can be done as follows:
170
-
171
- ```py
172
- from argus.backend.db import ScyllaCluster
173
- from argus.db.testrun import TestRun
174
- db = ScyllaCluster.get()
175
-
176
- db.sync_models() # Syncronizes Object Mapper models
177
- TestRun.init_own_table() # Syncronizes TestRun table (separate from python-driver Object Mapper)
178
-
179
- ```
180
-
181
- You can also use `flask sync-models` afterwards during development when making small changes to models.
182
-
183
- It is recommended to set up jenkins api key and run `flask scan-jenkins` afterwards to get basic release/group/test structure.
184
-
185
- There are scripts in `./scripts` directory that can be used to download data from production, upload them into your dev db and fix their relations to other models in your instance of the application. Specifically, `download_runs_from_prod.py` requires additional config, `argus.local.prod.yaml` which is the config used to connect to the production cluster. The scripts are split to prevent mistakes and accidentally affecting production cluster.
186
-
187
- ##### Configuration
188
-
189
- Create a `argus.local.yaml` configuration file (used to configure database connection) and a `argus_web.yaml` (used for webapp secrets) in your application install directory.
190
-
191
- ```bash
192
- cp argus_web.example.yaml argus_web.yaml
193
- cp argus.yaml argus.local.yaml
194
- ```
195
-
196
- Open `argus.local.yaml` and add the database connection information (contact_points, user, password and keyspace name).
197
-
198
- Open `argus_web.yaml` and change the `SECRET_KEY` value to something secure, like a sha512 digest of random bytes. Fill out GITHUB_* and JENKINS_* variables with their respective values.
199
-
200
- Run the application from CLI using:
201
-
202
- ```bash
203
- FLASK_ENV="development" FLASK_APP="argus_backend:start_server" FLASK_DEBUG=1 CQLENG_ALLOW_SCHEMA_MANAGEMENT=1 flask run
204
- ```
205
-
206
- Omit `FLASK_DEBUG` if running your own debugger (pdb, pycharm, vscode)
207
-