| Property name | Type | Default value | Description |
|---|---|---|---|
| ES_HOSTS | string | http://elasticsearch:9200 | Elasticsearch host (can be either like this "http://elasticsearch:9200", or with login and password delimited by : and separated from the host name by @) |
| ES_USER | string | Elasticsearch host login, set up here the username for elasticsearch, if you choose setup username here, in the ES_HOSTS you should leave only url without login and password | |
| ES_PASSWORD | string | Elasticsearch host password, set up here the password for elasticsearch, if you choose setup the password here, in the ES_HOSTS you should leave only url without login and password | |
| LOGGING_LEVEL | string | DEBUG | logging level for the whole module, can be DEBUG, INFO, ERROR, CRITICAL |
| AMQP_URL | string | an url to the rabbitmq instance | |
| AMQP_EXCHANGE_NAME | string | analyzer | Exchange name for the module communication for this module |
| AMQP_MAX_RETRY_TIME | integer | 300 | the maximum time in seconds to retry connection to RabbitMQ |
| AMQP_INITIAL_RETRY_INTERVAL | integer | 1 | the initial interval in seconds to retry connection to RabbitMQ |
| AMQP_BACKOFF_FACTOR | integer | 2 | the factor to increase the retry interval |
| AMQP_HEARTBEAT_INTERVAL | integer | 30 | the interval in seconds for sending heartbeat messages to RabbitMQ |
| AMQP_HANDLER_TASK_TIMEOUT | integer | 600 | the timeout in seconds for auto-analysis operations to return results. So if the request to the analyzer will be running out of time, the analyzer stops processing it and retries. |
| AMQP_HANDLER_MAX_RETRIES | integer | 3 | the maximum retry number to process an operation if it failed or timed out. |
| ANALYZER_PRIORITY | integer | 1 | priority for this analyzer |
| ANALYZER_INDEX | boolean | true | the parameter for rabbitmq exchange params, where the analyzer supports indexing |
| ANALYZER_LOG_SEARCH | boolean | true | the parameter for rabbitmq exchange params, where the analyzer supports searching logs |
| ANALYZER_SUGGEST | boolean | true | the parameter for rabbitmq exchange params, where the analyzer supports suggesting |
| ANALYZER_CLUSTER | boolean | true | the parameter for rabbitmq exchange params, where the analyzer supports clustering |
| ES_VERIFY_CERTS | boolean | false | turn on SSL certificates verification |
| ES_USE_SSL | boolean | false | turn on SSL |
| ES_SSL_SHOW_WARN | boolean | false | show warning on SSL certificates verification |
| ES_CA_CERT | string | provide a path to CA certs on disk | |
| ES_CLIENT_CERT | string | PEM formatted SSL client certificate | |
| ES_CLIENT_KEY | string | EM formatted SSL client key | |
| ES_TURN_OFF_SSL_VERIFICATION | boolean | false | Turn off ssl verification via using RequestsHttpConnection class instead of Urllib3HttpConnection class. |
| DATASTORE_TYPE | enum | filesystem | Possible values: "minio", "s3", "filesystem". Strategy where to store information, connected with the analyzer |
| DATASTORE_ENDPOINT | string | The endpoint URL for the datastore service. For MinIO or S3-compatible services, specify the full URL including protocol (e.g., http://minio:9000 or https://s3.amazonaws.com). The protocol prefix determines TLS usage.NOTE: This property is mostly for self-hosted services (like Minio) and testing. Managed services, like AWS S3, use their own logic to determine necessary endpoint to connect to. |
|
| DATASTORE_ACCESSKEY | string | Access key for the datastore service (optional for S3 if using IAM roles or environment variables) | |
| DATASTORE_SECRETKEY | string | Secret key for the datastore service (optional for S3 if using IAM roles or environment variables) | |
| DATASTORE_REGION | string | The region for the datastore service (e.g., us-east-1 for AWS S3). Defaults to us-east-1 for S3 if not specified. |
|
| DATASTORE_BUCKETPREFIX | string | prj- | The prefix for buckets which will be transformed to project folder by appending Project ID, E.G. prj-2. It can contain root path, like: my-bucket/reportportal/prj-, then the service will operate in single bucket mode and will put everything to my-bucket bucket, under reportportal/prj-2 (for default project of default user) path. |
| DATASTORE_BUCKETPOSTFIX | string | The postfix for buckets which will be appended after Project ID, E.G. with postfix -data and prefix prj-, the bucket name will be prj-2-data. |
|
| DATASTORE_DEFAULTBUCKETNAME | string | The default bucket name to use. If specified along with bucket prefix, the service will use single-bucket mode. | |
| FILESYSTEM_DEFAULT_PATH | string | storage | The path where all the information connected with analyzer will be stored, if DATASTORE_TYPE is set to filesystem. If you want to mount this folder to some folder on your machine, you can use this instruction in the docker compose:volumes: |
| ES_CHUNK_NUMBER | integer | 1000 | the number of objects which is sent to ES while bulk indexing. NOTE: AWS Elasticsearch has restrictions for sent data size either 10Mb or 100Mb, so when 10Mb is chosen, make sure you don't get the error "TransportError(413, '{"Message": "Request size exceeded 10485760 bytes"}')" while generating index or indexing the data. If you get this error, please, decrease ES_CHUNK_NUMBER until you stop getting this error. |
| ES_CHUNK_NUMBER_UPDATE_CLUSTERS | integer | 500 | the number of objects which is sent to ES while bulk updating clusters. NOTE: AWS Elasticsearch has restrictions for sent data size either 10Mb or 100Mb, so when 10Mb is chosen, make sure you don't get the error "TransportError(413, '{"Message": "Request size exceeded 10485760 bytes"}')" while generating index or indexing the data. If you get this error, please, decrease ES_CHUNK_NUMBER_UPDATE_CLUSTERS until you stop getting this error. |
| ES_PROJECT_INDEX_PREFIX | string | the prefix which is added to the created for each project indices. Our index name is the project id, so if it is 34, then the index "34" will be created. If you set ES_PROJECT_INDEX_PREFIX="rp_", then "rp_34" index will be created. We create several other indices which are sharable between projects, and this prefix won't influence them: rp_aa_stats, rp_stats, rp_model_train_stats, rp_done_tasks, rp_suggestions_info_metrics. NOTE: if you change an environmental variable, you'll need to generate index, so that a nex index is created and filled appropriately. |
|
| ANALYZER_MAX_ITEMS_TO_PROCESS | integer | 4000 | How many test items can be processed for one request, so if analyzer processes more than 4000 items, the analyzer stops processing and returns results to the backend. |
| ANALYZER_HTTP_PORT | integer | 5001 | the http port for checking status of the analyzer. It is used when you run the analyzer without Docker and uwsgi. If you use Docker, you will use the port 5001 and remap it to the port you want. If you use wsqgi for running the analyzer, you can remap the port with --http :5000 parameter in cmd or app.ini. |
| ANALYZER_FILE_LOGGING_PATH | string | /tmp/config.log | the file for logging what's happening with the analyzer |
| ANALYZER_ENABLE_MEMORY_DUMP | boolean | false | the flag to enable memory dump on healthcheck calls for debugging purpose. If set to true, the analyzer will print memory dump to the healthcheck response. |
| Property name | Type | Default value | Description |
|---|---|---|---|
| ES_MIN_SHOULD_MATCH | string | 80% | the global default min should match value for auto-analysis, but it is used only when the project settings are not set up. |
| ES_BOOST_AA | float | 0.0 | the value to boost auto-analyzed items while querying items for Auto-analysis |
| ES_BOOST_MA | float | 10.0 | the value to boost manually analyzed items while querying items for Auto-analysis |
| ES_BOOST_LAUNCH | float | 4.0 | the value to boost items with the same launch while querying items for Auto-analysis |
| ES_BOOST_TEST_CASE_HASH | float | 8.0 | the value to boost items with the same test case hash while querying items for Auto-analysis |
| ES_MAX_QUERY_TERMS | integer | 50 | the value to use in more like this query while querying items for Auto-analysis |
| ES_MIN_WORD_LENGTH | integer | 2 | the value to use in more like this query while querying items for Auto-analysis |
| ES_TIME_WEIGHT_DECAY | float | 0.999 | the value to use in time decay function while querying items for Auto-analysis |
| PATTERN_LABEL_MIN_PERCENT | float | 0.9 | the value of minimum percent of the same issue type for pattern to be suggested as a pattern with a label |
| PATTERN_LABEL_MIN_COUNT | integer | 5 | the value of minimum count of pattern occurrence to be suggested as a pattern with a label |
| PATTERN_MIN_COUNT | integer | 10 | the value of minimum count of pattern occurrence to be suggested as a pattern without a label |
| MAX_LOGS_FOR_DEFECT_TYPE_MODEL | integer | 10000 | the value of maximum count of logs per defect type to add into defect type model training. Default value is chosen in consideration of having space for analyzer_train docker image setuo of 1GB, if you can give more GB you can linearly allow more logs to be considered. |
| PROB_CUSTOM_MODEL_SUGGESTIONS | float | 0.7 | the probability of custom retrained model to be used for running when suggestions are requested. The maximum value is 0.8, because we want at least 20% of requests to process with a global model not to overfit for project too much. The bigger the value of this env variable the more often custom retrained model will be used. |
| PROB_CUSTOM_MODEL_AUTO_ANALYSIS | float | 0.5 | the probability of custom retrained model to be used for running when auto-analysis is performed. The maximum value is 1.0. The bigger the value of this env variable the more often custom retrained model will be used. |
| MAX_SUGGESTIONS_NUMBER | integer | 3 | the maximum number of suggestions shown in the ML suggestions area in the defect type editor. |
| ML_MODEL_FOR_SUGGESTIONS | string | suggestion | the name of the model to use for suggestions. Possible values are: suggestion, auto_analysis, similarity. Use this property if you want to change what and how the Analyzer suggests you in "Make Decision" modal window. By default Analyzer uses it's own model named "suggestion", but it can also use the same model as for auto-analysis, which suggests unique issue types only, or text similarity model which provide results by fields' similarity only (cousin similarity by tf-idf matrix). |
Install python with the version 3.7.4. (it is the version on which the service was developed, but it should work on the versions starting from 3.6).
Perform next steps inside source directory of the analyzer.
- Create a virtual environment with any name (in the example /venv)
python -m venv /analyzer- Install python libraries
/analyzer/bin/pip install --no-cache-dir -r requirements.txt- Activate the virtual environment
/analyzer/bin/activate- Install stopwords, wordnet and omw-1.4 package from the nltk library
/analyzer/bin/python3 -m nltk.downloader -d /usr/share/nltk_data stopwords wordnet omw-1.4- Start the Flask server
/analyzer/bin/python3 app/main.py