From af41f5f90e39e4528d12ce1f473cbc4053138aae Mon Sep 17 00:00:00 2001 From: Oleksandr Metelytsia Date: Thu, 25 Jun 2020 17:45:57 +0300 Subject: [PATCH 01/10] Version bump 3.1.0 --- CODEOWNERS | 4 ++-- app/bitbucket.yml | 2 +- app/confluence.yml | 2 +- app/jira.yml | 2 +- app/util/conf.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 473bdf647..42ad43652 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,2 +1,2 @@ -# Default code owners for master branch - Atlassian Data Center App Performance Toolkit -* @benmagro @ometelytsia @jkim2-atlassian @SergeyMoroz0703 @astashys @mmizin \ No newline at end of file +# Default code owners for dev branch - Atlassian Data Center App Performance Toolkit +* @ometelytsia @jkim2-atlassian @SergeyMoroz0703 @astashys @mmizin \ No newline at end of file diff --git a/app/bitbucket.yml b/app/bitbucket.yml index 66421a9ed..133e36667 100644 --- a/app/bitbucket.yml +++ b/app/bitbucket.yml @@ -17,7 +17,7 @@ settings: total_actions_per_hour: 32700 WEBDRIVER_VISIBLE: False JMETER_VERSION: 5.2.1 - allow_analytics: Yes # Allow sending basic run analytics to Atlassian. These analytics help us to understand how the tool is being used and help us to continue to invest in this tooling. For more details please see our README. + allow_analytics: No # Allow sending basic run analytics to Atlassian. These analytics help us to understand how the tool is being used and help us to continue to invest in this tooling. For more details please see our README. services: - module: shellexec prepare: diff --git a/app/confluence.yml b/app/confluence.yml index c72f83f08..0c321b5ad 100644 --- a/app/confluence.yml +++ b/app/confluence.yml @@ -17,7 +17,7 @@ settings: total_actions_per_hour: 20000 WEBDRIVER_VISIBLE: False JMETER_VERSION: 5.2.1 - allow_analytics: Yes # Allow sending basic run analytics to Atlassian. These analytics help us to understand how the tool is being used and help us to continue to invest in this tooling. For more details please see our README. + allow_analytics: No # Allow sending basic run analytics to Atlassian. These analytics help us to understand how the tool is being used and help us to continue to invest in this tooling. For more details please see our README. # Action percentage for Jmeter and Locust load executors view_page: 54 view_dashboard: 6 diff --git a/app/jira.yml b/app/jira.yml index 19fd14b8c..2f914586f 100644 --- a/app/jira.yml +++ b/app/jira.yml @@ -17,7 +17,7 @@ settings: total_actions_per_hour: 54500 WEBDRIVER_VISIBLE: False JMETER_VERSION: 5.2.1 - allow_analytics: Yes # Allow sending basic run analytics to Atlassian. These analytics help us to understand how the tool is being used and help us to continue to invest in this tooling. For more details please see our README. + allow_analytics: No # Allow sending basic run analytics to Atlassian. These analytics help us to understand how the tool is being used and help us to continue to invest in this tooling. For more details please see our README. # Action percentage for Jmeter and Locust load executors create_issue: 4 search_jql: 13 diff --git a/app/util/conf.py b/app/util/conf.py index 4e5a081c2..cad9d4daf 100644 --- a/app/util/conf.py +++ b/app/util/conf.py @@ -2,7 +2,7 @@ from util.project_paths import JIRA_YML, CONFLUENCE_YML, BITBUCKET_YML -TOOLKIT_VERSION = '3.0.0' +TOOLKIT_VERSION = '3.1.0' def read_yml_file(file): From 2525424381e2bcc3ee1ddf7dda3aa6fe9d0854ba Mon Sep 17 00:00:00 2001 From: Oleksandr Metelytsia Date: Fri, 26 Jun 2020 13:09:44 +0300 Subject: [PATCH 02/10] Update documentation --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 79f9b9b01..ab90f11b3 100644 --- a/README.md +++ b/README.md @@ -5,16 +5,16 @@ This repository contains Taurus scripts for performance testing of Atlassian Dat ## Supported versions * Supported Jira versions: - * Jira [Enterprise Releases](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 7.13.6 and 8.5.0 - * Jira Platform Release: 8.0.3 + * Jira [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 7.13.6 and 8.5.0 + * Jira Platform release: 8.0.3 * Supported Confluence versions: - * Confluence [Enterprise Release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.13.8 - * Confluence Platform Release: 7.0.4 + * Confluence [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.13.8 + * Confluence Platform release: 7.0.4 * Supported Bitbucket Server versions: - * Bitbucket Server [Enterprise Release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.10.0 - * Bitbucket Server Platform Release: 7.0.0 + * Bitbucket Server [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.10.0 + * Bitbucket Server Platform release: 7.0.0 ## Support In case of technical questions, issues or problems with DC Apps Performance Toolkit, contact us for support in the [community Slack](http://bit.ly/dcapt_slack) **#data-center-app-performance-toolkit** channel. From 3eec81055b516431bb8d70eee636053fb6ac1b4e Mon Sep 17 00:00:00 2001 From: Oleksandr Metelytsia Date: Fri, 26 Jun 2020 13:12:09 +0300 Subject: [PATCH 03/10] user guides update with LTS --- docs/dc-apps-performance-toolkit-user-guide-bitbucket.md | 4 ++-- docs/dc-apps-performance-toolkit-user-guide-confluence.md | 4 ++-- docs/dc-apps-performance-toolkit-user-guide-jira.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/dc-apps-performance-toolkit-user-guide-bitbucket.md b/docs/dc-apps-performance-toolkit-user-guide-bitbucket.md index ca6354328..71d1244e7 100644 --- a/docs/dc-apps-performance-toolkit-user-guide-bitbucket.md +++ b/docs/dc-apps-performance-toolkit-user-guide-bitbucket.md @@ -63,8 +63,8 @@ All important parameters are listed and described in this section. For all other The Data Center App Performance Toolkit officially supports: -- Bitbucket Platform Release version: 7.0.0 -- Bitbucket [Enterprise Releases](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.10.0 +- Bitbucket Platform release version: 7.0.0 +- Bitbucket [Long Term Support releases](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.10.0 **Cluster nodes** diff --git a/docs/dc-apps-performance-toolkit-user-guide-confluence.md b/docs/dc-apps-performance-toolkit-user-guide-confluence.md index 796004edb..f96641722 100644 --- a/docs/dc-apps-performance-toolkit-user-guide-confluence.md +++ b/docs/dc-apps-performance-toolkit-user-guide-confluence.md @@ -64,8 +64,8 @@ All important parameters are listed and described in this section. For all other The Data Center App Performance Toolkit officially supports: -- Confluence Platform Release version: 7.0.4 -- Confluence [Enterprise Release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.13.8 +- Confluence Platform release version: 7.0.4 +- Confluence [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.13.8 **Cluster nodes** diff --git a/docs/dc-apps-performance-toolkit-user-guide-jira.md b/docs/dc-apps-performance-toolkit-user-guide-jira.md index ce58afa5f..faced8a66 100644 --- a/docs/dc-apps-performance-toolkit-user-guide-jira.md +++ b/docs/dc-apps-performance-toolkit-user-guide-jira.md @@ -64,8 +64,8 @@ All important parameters are listed and described in this section. For all other The Data Center App Performance Toolkit officially supports: -- Jira Platform Release version: 8.0.3 -- Jira [Enterprise Releases](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 7.13.6 and 8.5.0 +- Jira Platform release version: 8.0.3 +- Jira [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 7.13.6 and 8.5.0 **Cluster nodes** From f121b2b4f649763c4d7048cb1d7bee80454f3192 Mon Sep 17 00:00:00 2001 From: Sergey Moroz Date: Wed, 1 Jul 2020 10:55:08 +0300 Subject: [PATCH 04/10] Update CODEOWNERS (#257) --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 42ad43652..11f3e33af 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,2 +1,2 @@ # Default code owners for dev branch - Atlassian Data Center App Performance Toolkit -* @ometelytsia @jkim2-atlassian @SergeyMoroz0703 @astashys @mmizin \ No newline at end of file +* @ometelytsia @SergeyMoroz0703 @astashys @mmizin From c878757689a5491360eefec2e9b3a9a224126e72 Mon Sep 17 00:00:00 2001 From: mmizin <30836532+mmizin@users.noreply.github.com> Date: Tue, 7 Jul 2020 08:14:59 -0700 Subject: [PATCH 05/10] NONE:Update DB instance class (#260) --- docs/dc-apps-performance-toolkit-user-guide-confluence.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dc-apps-performance-toolkit-user-guide-confluence.md b/docs/dc-apps-performance-toolkit-user-guide-confluence.md index f96641722..cdc9a42c4 100644 --- a/docs/dc-apps-performance-toolkit-user-guide-confluence.md +++ b/docs/dc-apps-performance-toolkit-user-guide-confluence.md @@ -84,7 +84,7 @@ The Data Center App Performance Toolkit framework is also set up for concurrency | Parameter | Recommended Value | | --------- | ----------------- | -| Database instance class | [db.m4.xlarge](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#Concepts.DBInstanceClass.Summary) | +| Database instance class | [db.m5.xlarge](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#Concepts.DBInstanceClass.Summary) | | RDS Provisioned IOPS | 1000 | | Master (admin) password | Password1! | | Enable RDS Multi-AZ deployment | true | From c9fefd6e794e1e73b10b1f28f36d6596cd31525b Mon Sep 17 00:00:00 2001 From: Alex Metelytsia Date: Tue, 7 Jul 2020 18:16:03 +0300 Subject: [PATCH 06/10] Fix language check in case SSL (#261) * Fix language check in case SSL * fixed confluence nodes count to work with server * addeed additional check * fix lint Co-authored-by: Serhii Moroz --- app/util/analytics/application_info.py | 2 +- app/util/api/abstract_clients.py | 8 +++---- app/util/api/bitbucket_clients.py | 12 ++++++----- app/util/api/confluence_clients.py | 21 +++++++++++-------- .../bitbucket_prepare_data.py | 2 +- .../confluence_prepare_data.py | 6 +++--- 6 files changed, 28 insertions(+), 23 deletions(-) diff --git a/app/util/analytics/application_info.py b/app/util/analytics/application_info.py index 7db18fca4..54c485b11 100644 --- a/app/util/analytics/application_info.py +++ b/app/util/analytics/application_info.py @@ -57,7 +57,7 @@ def version(self): @property def nodes_count(self): - return len(self.client.get_confluence_nodes_count()) + return self.client.get_confluence_nodes_count() @property def dataset_information(self): diff --git a/app/util/api/abstract_clients.py b/app/util/api/abstract_clients.py index 329f9d6e0..e855ae577 100644 --- a/app/util/api/abstract_clients.py +++ b/app/util/api/abstract_clients.py @@ -57,9 +57,9 @@ def session(self): def base_auth(self): return self.user, self.password - def get(self, url: str, error_msg: str): + def get(self, url: str, error_msg: str, expected_status_codes: list = None): response = self.session.get(url, auth=self.base_auth, verify=False, timeout=self.requests_timeout) - self.__verify_response(response, error_msg) + self.__verify_response(response, error_msg, expected_status_codes) return response def post(self, url: str, error_msg: str, body: dict = None, params=None): @@ -76,8 +76,8 @@ def put(self, url: str, error_msg: str, body: dict = None, params=None): self.__verify_response(response, error_msg) return response - def __verify_response(self, response: Response, error_msg: str): - if response.ok: + def __verify_response(self, response: Response, error_msg: str, expected_status_codes: list = None): + if response.ok or response.status_code in expected_status_codes: return status_code = response.status_code diff --git a/app/util/api/bitbucket_clients.py b/app/util/api/bitbucket_clients.py index e542a9fa1..59f483773 100644 --- a/app/util/api/bitbucket_clients.py +++ b/app/util/api/bitbucket_clients.py @@ -2,7 +2,7 @@ from enum import Enum from util.api.abstract_clients import RestClient -import lxml.html as LH +from lxml import html BATCH_SIZE_PROJECTS = 100 BATCH_SIZE_USERS = 100 @@ -151,9 +151,11 @@ def get_bitbucket_system_page(self): return r.content.decode('utf-8') def get_locale(self): - page = LH.parse(self.host) + language = None + page = self.get(self.host, "Could not get page content.").content + tree = html.fromstring(page) try: - language = page.xpath('//html/@lang')[0] - except Exception: - raise Exception('Could not get user locale') + language = tree.xpath('//html/@lang')[0] + except Exception as error: + print(f"Warning: Could not get user locale: {error}") return language diff --git a/app/util/api/confluence_clients.py b/app/util/api/confluence_clients.py index fd6ac65ce..f1cd1ded9 100644 --- a/app/util/api/confluence_clients.py +++ b/app/util/api/confluence_clients.py @@ -1,8 +1,7 @@ import xmlrpc.client from util.api.abstract_clients import RestClient, Client -import xml.etree.ElementTree as ET -import lxml.html as LH +from lxml import html BATCH_SIZE_SEARCH = 500 @@ -89,7 +88,7 @@ def get_confluence_version(self): version = '' api_url = f'{self.host}/rest/applinks/1.0/manifest' response = self.get(api_url, 'Could not get Confluence manifest') - tree = ET.fromstring(response.content) + tree = html.fromstring(response.content) for child in tree: if child.tag == 'version': version = child.text @@ -132,8 +131,10 @@ def is_remote_api_enabled(self): def get_confluence_nodes_count(self): api_url = f"{self.host}/rest/atlassian-cluster-monitoring/cluster/nodes" - response = self.get(api_url, error_msg='Could not get Confluence nodes count via API') - return response.json() + response = self.get(api_url, error_msg='Could not get Confluence nodes count via API', + expected_status_codes=[200, 500]) + return 'Server' if response.status_code == 500 and 'NonClusterMonitoring' in response.text\ + else len(response.json()) def get_total_pages_count(self): api_url = f"{self.host}/rest/api/search?cql=type=page" @@ -146,11 +147,13 @@ def get_collaborative_editing_status(self): return response.json() def get_locale(self): - page = LH.parse(self.host) + language = None + page = self.get(self.host, "Could not get page content.").content + tree = html.fromstring(page) try: - language = page.xpath('.//meta[@name="ajs-user-locale"]/@content')[0] - except Exception: - raise Exception('Could not get user locale') + language = tree.xpath('.//meta[@name="ajs-user-locale"]/@content')[0] + except Exception as error: + print(f"Warning: Could not get user locale: {error}") return language diff --git a/app/util/data_preparation/bitbucket_prepare_data.py b/app/util/data_preparation/bitbucket_prepare_data.py index 60b377cdc..c69a51bf8 100644 --- a/app/util/data_preparation/bitbucket_prepare_data.py +++ b/app/util/data_preparation/bitbucket_prepare_data.py @@ -123,7 +123,7 @@ def write_test_data_to_files(datasets): def __check_current_language(bitbucket_api): language = bitbucket_api.get_locale() - if language != ENGLISH: + if language and language != ENGLISH: raise SystemExit(f'"{language}" language is not supported. ' f'Please change your account language to "English (United States)"') diff --git a/app/util/data_preparation/confluence_prepare_data.py b/app/util/data_preparation/confluence_prepare_data.py index f1180c165..348643790 100644 --- a/app/util/data_preparation/confluence_prepare_data.py +++ b/app/util/data_preparation/confluence_prepare_data.py @@ -112,7 +112,7 @@ def __is_collaborative_editing_enabled(confluence_api): def __check_current_language(confluence_api): language = confluence_api.get_locale() - if language not in [ENGLISH_US, ENGLISH_GB]: + if language and language not in [ENGLISH_US, ENGLISH_GB]: raise SystemExit(f'"{language}" language is not supported. ' f'Please change your profile language to "English (US)"') @@ -126,12 +126,12 @@ def main(): rest_client = ConfluenceRestClient(url, CONFLUENCE_SETTINGS.admin_login, CONFLUENCE_SETTINGS.admin_password) rpc_client = ConfluenceRpcClient(url, CONFLUENCE_SETTINGS.admin_login, CONFLUENCE_SETTINGS.admin_password) + __is_remote_api_enabled(rest_client) + __is_collaborative_editing_enabled(rest_client) __check_current_language(rest_client) - __is_remote_api_enabled(rest_client) - dataset = __create_data_set(rest_client, rpc_client) write_test_data_to_files(dataset) From 606a860962a64a98fb6f4aa7a29fd00a296f2a28 Mon Sep 17 00:00:00 2001 From: mmizin <30836532+mmizin@users.noreply.github.com> Date: Tue, 7 Jul 2020 13:57:43 -0700 Subject: [PATCH 07/10] DCA-352:Jira full index time consistency (#258) * DCA-352:Update the Jira database instance class; Update Jira reindex time * DCA-352:Reword notes text * DCA-352:Remove note frome first reindex; Add note to the Scenario 1 -> Run 2; * DCA-352:Reword reindex step according; Remove optional reindex; * DCA-352:Fix after review * Update dc-apps-performance-toolkit-user-guide-jira.md --- ...pps-performance-toolkit-user-guide-jira.md | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/dc-apps-performance-toolkit-user-guide-jira.md b/docs/dc-apps-performance-toolkit-user-guide-jira.md index faced8a66..32c3b91b3 100644 --- a/docs/dc-apps-performance-toolkit-user-guide-jira.md +++ b/docs/dc-apps-performance-toolkit-user-guide-jira.md @@ -84,7 +84,7 @@ The Data Center App Performance Toolkit framework is also set up for concurrency | Parameter | Recommended Value | | --------- | ----------------- | -| Database instance class | [db.m5.large](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#Concepts.DBInstanceClass.Summary) | +| Database instance class | [db.m5.xlarge](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#Concepts.DBInstanceClass.Summary) | | RDS Provisioned IOPS | 1000 | | Master (admin) password | Password1! | | Enable RDS Multi-AZ deployment | true | @@ -309,14 +309,16 @@ After [Importing the main dataset](#importingdataset), you'll now have to pre-lo Do not close or interrupt the session. It will take about two hours to upload attachments to Elastic File Storage (EFS). {{% /note %}} -### Re-indexing Jira Data Center (~1 hour) +### Re-indexing Jira Data Center (~30 min) For more information, go to [Re-indexing Jira](https://confluence.atlassian.com/adminjiraserver/search-indexing-938847710.html). 1. Log in as a user with the **Jira System Administrators** [global permission](https://confluence.atlassian.com/adminjiraserver/managing-global-permissions-938847142.html). 1. Go to **![cog icon](/platform/marketplace/images/cog.png) > System > Indexing**. -1. Select the **Lock one Jira node and rebuild index** option. +1. Select the **Full re-index** option. 1. Click **Re-Index** and wait until re-indexing is completed. +1. **Take a screenshot of the acknowledgment screen** displaying the re-index time and Lucene index timing. +1. Attach the screenshot to your DCHELP ticket. Jira will be unavailable for some time during the re-indexing process. When finished, the **Acknowledge** button will be available on the re-indexing page. @@ -405,28 +407,24 @@ Review `results_summary.log` file under artifacts dir location. Make sure that o #### Run 2 (~50 min + Lucene Index timing test) -If you are submitting a Jira app, you are required to conduct a Lucene Index timing test. This involves conducting a foreground re-index on a single-node Data Center deployment (without and with your app installed) and a dataset that has 1M issues. - -First, benchmark your re-index time without your app installed: +If you are submitting a Jira app, you are required to conduct a Lucene Index timing test. This involves conducting a foreground re-index on a single-node Data Center deployment (with your app installed) and a dataset that has 1M issues. {{% note %}} -Jira 7 index time for 1M issues on a User Guide [recommended configuration](#quick-start-parameters) is about ~100 min, Jira 8 index time is about ~40 min. +Jira 7 index time for 1M issues on a User Guide [recommended configuration](#quick-start-parameters) is about ~100 min, Jira 8 index time is about ~30 min. {{% /note %}} -1. Go to **![cog icon](/platform/marketplace/images/cog.png) > System > Indexing**. -1. Select the **Lock one Jira node and rebuild index** option. -1. Click **Re-Index** and wait until re-indexing is completed. -1. **Take a screenshot of the acknowledgment screen** displaying the re-index time and Lucene index timing. -1. Attach the screenshot to your DC HELP ticket. +{{% note %}} +If your Amazon RDS DB instance class is lower then db.m5.xlarge it is required to wait ~2 hours after previous reindex finish before starting a new one. +{{% /note %}} -Next, benchmark your re-index time with your app installed: +Benchmark your re-index time with your app installed: 1. Install the app you want to test. 1. Go to **![cog icon](/platform/marketplace/images/cog.png) > System > Indexing**. -1. Select the **Lock one Jira node and rebuild index** option. +1. Select the **Full re-index** option. 1. Click **Re-Index** and wait until re-indexing is completed. 1. **Take a screenshot of the acknowledgment screen** displaying the re-index time and Lucene index timing. -1. Attach the screenshot to your DC HELP ticket. +1. Attach the screenshot to your DCHELP ticket. After attaching both screenshots to your DC HELP ticket, move on to performance results generation with an app installed: From 9b4230c965ce7f63d0c3134b5fde6448b883aadf Mon Sep 17 00:00:00 2001 From: Alex Metelytsia Date: Wed, 8 Jul 2020 15:54:56 +0300 Subject: [PATCH 08/10] Remove hipchat requests from jira.jmx as jira 8.9+ does not have them anymore (#267) --- app/jmeter/jira.jmx | 657 +------------------------------------------- 1 file changed, 2 insertions(+), 655 deletions(-) diff --git a/app/jmeter/jira.jmx b/app/jmeter/jira.jmx index b808fbfaf..623faf985 100644 --- a/app/jmeter/jira.jmx +++ b/app/jmeter/jira.jmx @@ -772,63 +772,6 @@ JMeterUtils.setProperty("c_AtlToken" + user_counter, atl_token) - - - - - false - _ - ${__time(,)} - = - true - - - - - - - - ${application.postfix}/rest/hipchat/integrations/1.0/configuration/status - GET - true - false - true - false - - - - - - - - - Accept-Language - en-US,en;q=0.5 - - - X-Requested-With - XMLHttpRequest - - - Cache-Control - no-cache - - - Accept-Encoding - gzip, deflate - - - Pragma - no-cache - - - Accept - application/json, text/javascript, */*; q=0.01 - - - - - @@ -2692,63 +2635,6 @@ vars.put("extend_action", extend_action); - - - - - false - _ - ${__time(,)} - = - true - - - - - - - UTF-8 - ${application.postfix}/rest/hipchat/integrations/1.0/configuration/status - GET - true - false - true - false - - - - - - - - - Accept-Language - en-US,en;q=0.5 - - - X-Requested-With - XMLHttpRequest - - - Cache-Control - no-cache - - - Accept-Encoding - gzip, deflate - - - Pragma - no-cache - - - Accept - application/json, text/javascript, */*; q=0.01 - - - - - true @@ -3527,55 +3413,6 @@ vars.put("extend_action", extend_action); - - - - - false - _ - ${__time(,)} - = - true - - - - - - - - ${application.postfix}/rest/hipchat/integrations/1.0/configuration/status - GET - true - false - true - false - - - - - - - - - Accept-Language - en-US,en;q=0.5 - - - X-Requested-With - XMLHttpRequest - - - Accept-Encoding - gzip, deflate - - - Accept - application/json, text/javascript, */*; q=0.01 - - - - - true @@ -4444,55 +4281,6 @@ vars.put("extend_action", extend_action); - - - - - false - _ - ${__time(,)} - = - true - - - - - - - - ${application.postfix}/rest/hipchat/integrations/1.0/configuration/status - GET - true - false - true - false - - - - - - - - - Accept-Language - en-US,en;q=0.5 - - - X-Requested-With - XMLHttpRequest - - - Accept-Encoding - gzip, deflate - - - Accept - application/json, text/javascript, */*; q=0.01 - - - - - true @@ -5047,55 +4835,6 @@ vars.put("extend_action", extend_action); - - - - - false - _ - ${__time(,)} - = - true - - - - - - - UTF-8 - ${application.postfix}/rest/hipchat/integrations/1.0/configuration/status - GET - true - false - true - false - - - - - - - - - Accept-Language - en-US,en;q=0.5 - - - X-Requested-With - XMLHttpRequest - - - Accept-Encoding - gzip, deflate - - - Accept - application/json, text/javascript, */*; q=0.01 - - - - - true @@ -5574,7 +5313,7 @@ vars.put("random_string_long", random_string_long) - + @@ -5590,105 +5329,7 @@ vars.put("random_string_long", random_string_long) - ${application.postfix}/rest/hipchat/integrations/1.0/issuepanel/data/${issue_key} - GET - true - false - true - false - - - - - - - - - Accept-Language - en-US,en;q=0.5 - - - X-Requested-With - XMLHttpRequest - - - Accept-Encoding - gzip, deflate - - - Accept - application/json, text/javascript, */*; q=0.01 - - - - - - - - - - false - _ - ${__time(,)} - = - true - - - - - - - UTF-8 - ${application.postfix}/rest/hipchat/integrations/1.0/configuration/status - GET - true - false - true - false - - - - - - - - - Accept-Language - en-US,en;q=0.5 - - - X-Requested-With - XMLHttpRequest - - - Accept-Encoding - gzip, deflate - - - Accept - application/json, text/javascript, */*; q=0.01 - - - - - - - - - - false - _ - ${__time(,)} - = - true - - - - - - - - ${application.postfix}/rest/bamboo/latest/deploy/${issue_project_key}/${issue_key} + ${application.postfix}/rest/bamboo/latest/deploy/${issue_project_key}/${issue_key} GET true false @@ -6160,55 +5801,6 @@ vars.put("extend_action", extend_action); - - - - - false - _ - ${__time(,)} - = - true - - - - - - - UTF-8 - ${application.postfix}/rest/hipchat/integrations/1.0/configuration/status - GET - true - false - true - false - - - - - - - - - Accept-Language - en-US,en;q=0.5 - - - X-Requested-With - XMLHttpRequest - - - Accept-Encoding - gzip, deflate - - - Accept - application/json, text/javascript, */*; q=0.01 - - - - - true @@ -6689,55 +6281,6 @@ vars.put("extend_action", extend_action); - - - - - false - _ - ${__time(,)} - = - true - - - - - - - UTF-8 - ${application.postfix}/rest/hipchat/integrations/1.0/configuration/status - GET - true - false - true - false - - - - - - - - - Accept-Language - en-US,en;q=0.5 - - - X-Requested-With - XMLHttpRequest - - - Accept-Encoding - gzip, deflate - - - Accept - application/json, text/javascript, */*; q=0.01 - - - - - true @@ -7119,55 +6662,6 @@ vars.put("extend_action", extend_action); - - - - - false - _ - ${__time(,)} - = - true - - - - - - - - ${application.postfix}/rest/hipchat/integrations/1.0/configuration/status - GET - true - false - true - false - - - - - - - - - Accept-Language - en-US,en;q=0.5 - - - X-Requested-With - XMLHttpRequest - - - Accept-Encoding - gzip, deflate - - - Accept - application/json, text/javascript, */*; q=0.01 - - - - - true @@ -8076,55 +7570,6 @@ vars.put("extend_action", extend_action); - - - - - false - _ - ${__time(,)} - = - true - - - - - - - - ${application.postfix}/rest/hipchat/integrations/1.0/configuration/status - GET - true - false - true - false - - - - - - - - - Accept-Language - en-US,en;q=0.5 - - - X-Requested-With - XMLHttpRequest - - - Accept-Encoding - gzip, deflate - - - Accept - application/json, text/javascript, */*; q=0.01 - - - - - true @@ -9040,55 +8485,6 @@ vars.put("extend_action", extend_action); - - - - - false - _ - ${__time(,)} - = - true - - - - - - - UTF-8 - ${application.postfix}/rest/hipchat/integrations/1.0/configuration/status - GET - true - false - true - false - - - - - - - - - Accept-Language - en-US,en;q=0.5 - - - X-Requested-With - XMLHttpRequest - - - Accept-Encoding - gzip, deflate - - - Accept - application/json, text/javascript, */*; q=0.01 - - - - - true @@ -10024,55 +9420,6 @@ vars.put("extend_action", extend_action); - - - - - false - _ - ${__time(,)} - = - true - - - - - - - UTF-8 - ${application.postfix}/rest/hipchat/integrations/1.0/configuration/status - GET - true - false - true - false - - - - - - - - - Accept-Language - en-US,en;q=0.5 - - - X-Requested-With - XMLHttpRequest - - - Accept-Encoding - gzip, deflate - - - Accept - application/json, text/javascript, */*; q=0.01 - - - - - true From 0fd817e1624ef9998de06beb4e7670ec159fd3c5 Mon Sep 17 00:00:00 2001 From: Sergey Moroz Date: Wed, 8 Jul 2020 17:32:47 +0300 Subject: [PATCH 09/10] nodes count for server (#268) * nodes count for server * replace logic for nodes calculation * fix selector when no jql results Co-authored-by: Oleksandr Metelytsia --- app/selenium_ui/jira/pages/selectors.py | 2 +- app/util/analytics/application_info.py | 8 +------- app/util/api/jira_clients.py | 22 ++++++++++++++++------ 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/app/selenium_ui/jira/pages/selectors.py b/app/selenium_ui/jira/pages/selectors.py index fe62350be..58ccea0b2 100644 --- a/app/selenium_ui/jira/pages/selectors.py +++ b/app/selenium_ui/jira/pages/selectors.py @@ -133,7 +133,7 @@ class SearchLocators: search_issue_table = (By.ID, "issuetable") search_issue_content = (By.ID, "issue-content") - search_no_issue_found = (By.ID, "issue-content") + search_no_issue_found = (By.CLASS_NAME, "no-results-message") class BoardsListLocators: diff --git a/app/util/analytics/application_info.py b/app/util/analytics/application_info.py index 54c485b11..064d284d1 100644 --- a/app/util/analytics/application_info.py +++ b/app/util/analytics/application_info.py @@ -32,13 +32,7 @@ def version(self): @property def nodes_count(self): - html_pattern = 'Nodestate:Active' - if self.version >= '8.1.0': - return len(self.client.get_nodes_info_via_rest()) - else: - jira_system_page = self.client.get_system_info_page() - node_count = jira_system_page.replace(' ', '').replace('\n', '').count(html_pattern) - return node_count + return self.client.get_cluster_nodes_count(jira_version=self.version) def __issues_count(self): return self.client.get_total_issues_count() diff --git a/app/util/api/jira_clients.py b/app/util/api/jira_clients.py index 277eec853..64430309a 100644 --- a/app/util/api/jira_clients.py +++ b/app/util/api/jira_clients.py @@ -158,12 +158,13 @@ def get_server_info(self): return response.json() - def get_nodes_info_via_rest(self): + def get_nodes_count_via_rest(self): # Works for Jira version >= 8.1.0 api_url = f'{self.host}/rest/api/2/cluster/nodes' - response = self.get(api_url, 'Could not get Jira nodes count') - - return response.json() + response = self.get(api_url, 'Could not get Jira nodes count', expected_status_codes=[200, 405]) + if response.status_code == 405 and 'This Jira instance is not clustered' in response.text: + return 'Server' + return len(response.json()) def get_system_info_page(self): session = self._session @@ -187,10 +188,19 @@ def get_system_info_page(self): session.post(url=login_url, data=login_body, headers=headers) auth_request = session.post(url=auth_url, data=auth_body, headers=headers) system_info_html = auth_request.content.decode("utf-8") - if 'Cluster nodes' not in system_info_html: - print('Could not get Jira nodes count via parse html page') return system_info_html + def get_cluster_nodes_count(self, jira_version): + html_pattern = 'Nodestate:Active' + if jira_version >= '8.1.0': + return self.get_nodes_count_via_rest() + else: + jira_system_page = self.get_system_info_page() + nodes_count = jira_system_page.replace(' ', '').replace('\n', '').count(html_pattern) + if nodes_count == 0: + return 'Server' + return nodes_count + def get_locale(self): api_url = f'{self.host}/rest/api/2/myself' user_properties = self.get(api_url, "Could not retrieve user") From e0c6cd4905622af4e2fdb82746b06bcf5559d477 Mon Sep 17 00:00:00 2001 From: Oleksandr Metelytsia Date: Wed, 8 Jul 2020 17:56:35 +0300 Subject: [PATCH 10/10] Release 3.0.1 --- CODEOWNERS | 4 ++-- app/bitbucket.yml | 2 +- app/confluence.yml | 2 +- app/jira.yml | 2 +- app/util/conf.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 11f3e33af..473bdf647 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,2 +1,2 @@ -# Default code owners for dev branch - Atlassian Data Center App Performance Toolkit -* @ometelytsia @SergeyMoroz0703 @astashys @mmizin +# Default code owners for master branch - Atlassian Data Center App Performance Toolkit +* @benmagro @ometelytsia @jkim2-atlassian @SergeyMoroz0703 @astashys @mmizin \ No newline at end of file diff --git a/app/bitbucket.yml b/app/bitbucket.yml index 133e36667..66421a9ed 100644 --- a/app/bitbucket.yml +++ b/app/bitbucket.yml @@ -17,7 +17,7 @@ settings: total_actions_per_hour: 32700 WEBDRIVER_VISIBLE: False JMETER_VERSION: 5.2.1 - allow_analytics: No # Allow sending basic run analytics to Atlassian. These analytics help us to understand how the tool is being used and help us to continue to invest in this tooling. For more details please see our README. + allow_analytics: Yes # Allow sending basic run analytics to Atlassian. These analytics help us to understand how the tool is being used and help us to continue to invest in this tooling. For more details please see our README. services: - module: shellexec prepare: diff --git a/app/confluence.yml b/app/confluence.yml index 0c321b5ad..c72f83f08 100644 --- a/app/confluence.yml +++ b/app/confluence.yml @@ -17,7 +17,7 @@ settings: total_actions_per_hour: 20000 WEBDRIVER_VISIBLE: False JMETER_VERSION: 5.2.1 - allow_analytics: No # Allow sending basic run analytics to Atlassian. These analytics help us to understand how the tool is being used and help us to continue to invest in this tooling. For more details please see our README. + allow_analytics: Yes # Allow sending basic run analytics to Atlassian. These analytics help us to understand how the tool is being used and help us to continue to invest in this tooling. For more details please see our README. # Action percentage for Jmeter and Locust load executors view_page: 54 view_dashboard: 6 diff --git a/app/jira.yml b/app/jira.yml index 2f914586f..19fd14b8c 100644 --- a/app/jira.yml +++ b/app/jira.yml @@ -17,7 +17,7 @@ settings: total_actions_per_hour: 54500 WEBDRIVER_VISIBLE: False JMETER_VERSION: 5.2.1 - allow_analytics: No # Allow sending basic run analytics to Atlassian. These analytics help us to understand how the tool is being used and help us to continue to invest in this tooling. For more details please see our README. + allow_analytics: Yes # Allow sending basic run analytics to Atlassian. These analytics help us to understand how the tool is being used and help us to continue to invest in this tooling. For more details please see our README. # Action percentage for Jmeter and Locust load executors create_issue: 4 search_jql: 13 diff --git a/app/util/conf.py b/app/util/conf.py index cad9d4daf..e1666b2fa 100644 --- a/app/util/conf.py +++ b/app/util/conf.py @@ -2,7 +2,7 @@ from util.project_paths import JIRA_YML, CONFLUENCE_YML, BITBUCKET_YML -TOOLKIT_VERSION = '3.1.0' +TOOLKIT_VERSION = '3.0.1' def read_yml_file(file):