Skip to content

Commit 6970354

Browse files
authoredJan 21, 2020
Merge pull request atlassian#101 from atlassian/release-1.2.1-beta
Release 1.2.1 beta
2 parents ec63284 + 4b14fd2 commit 6970354

13 files changed

+56
-30
lines changed
 

‎README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,12 @@ venv\Scripts\activate
9090
pip install -r requirements.txt
9191
```
9292

93-
## Upgrading
94-
If you see "There is newer version of Taurus available, consider upgrading." warning message during your
95-
test execution, please use the next command to apply the upgrade in your virtual environment.
93+
## Upgrading the toolkit
94+
Get latest codebase from master branch:
95+
```
96+
git pull
97+
```
98+
Activate virtual env for the toolkit and install latest versions of libraries:
9699
```
97100
pip install -r requirements.txt
98101
```

‎app/confluence.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ modules:
8989
version: "79.0.3945.36" # Supports Chrome version 79. You can refer to http://chromedriver.chromium.org/downloads
9090
reporting:
9191
- data-source: sample-labels
92-
module: junit-xml
92+
module: junit-xml

‎app/jira.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,4 @@ modules:
9191
version: "79.0.3945.36" # Supports Chrome version 79. You can refer to http://chromedriver.chromium.org/downloads
9292
reporting:
9393
- data-source: sample-labels
94-
module: junit-xml
94+
module: junit-xml

‎app/selenium_ui/confluence/modules.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def measure(webdriver, interaction):
112112
def create_page(webdriver, datasets):
113113
@print_timing
114114
def measure(webdriver, interaction):
115-
webdriver.find_element(By.ID, "quick-create-page-button").click()
115+
_wait_until(webdriver, ec.element_to_be_clickable((By.ID, 'quick-create-page-button')), interaction).click()
116116
_dismiss_popup(webdriver, "#closeDisDialog")
117117
_wait_until(webdriver, ec.element_to_be_clickable((By.ID, 'rte-button-publish')), interaction)
118118

‎app/selenium_ui/jira/modules.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,11 @@ def browse_project(webdriver, datasets):
240240
@print_timing
241241
def measure(webdriver, interaction):
242242
page_size = 25
243-
pages = len(datasets['project_keys']) // page_size
244-
webdriver.get(APPLICATION_URL +
245-
f'/secure/BrowseProjects.jspa?selectedCategory=all&selectedProjectType=all&page={random.randint(1, pages)}')
243+
projects_count = len(datasets['project_keys'])
244+
pages = projects_count // page_size if projects_count % page_size == 0 else projects_count // page_size + 1
245+
webdriver.get(
246+
APPLICATION_URL +
247+
f'/secure/BrowseProjects.jspa?selectedCategory=all&selectedProjectType=all&page={random.randint(1, pages)}')
246248
_wait_until(webdriver, AnyEc(ec.presence_of_element_located((By.CSS_SELECTOR, "tbody.projects-list")),
247249
ec.presence_of_element_located((By.CLASS_NAME, "none-panel"))
248250
), interaction)

‎app/util/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from util.project_paths import JIRA_YML, CONFLUENCE_YML
44

5-
TOOLKIT_VERSION = '1.2.0'
5+
TOOLKIT_VERSION = '1.2.1'
66

77

88
def read_yml_file(file):

‎app/util/confluence/populate_db.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ if [[ ${FREE_SPACE_GB} -lt ${REQUIRED_SPACE_GB} ]]; then
109109
echo "Required space: ${REQUIRED_SPACE_GB} GB"
110110
exit 1
111111
fi;
112-
time wget ${DB_DUMP_URL}
112+
# use computer style progress bar
113+
time wget --progress=dot:giga ${DB_DUMP_URL}
113114
if [[ $? -ne 0 ]]; then
114115
echo "DB dump download failed! Pls check available disk space."
115116
exit 1
@@ -159,5 +160,8 @@ echo "Step6: Start Confluence"
159160
sudo systemctl start confluence
160161
rm -rf ${DB_DUMP_NAME}
161162

163+
echo "Finished"
164+
echo # move to a new line
165+
162166
echo "Important: new admin user credentials are admin/admin"
163167
echo "Wait a couple of minutes until Confluence is started."

‎app/util/confluence/upload_attachments.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ if [[ ${FREE_SPACE_GB} -lt ${REQUIRED_SPACE_GB} ]]; then
8181
echo "Required space: ${REQUIRED_SPACE_GB} GB"
8282
exit 1
8383
fi;
84-
sudo su confluence -c "time wget ${ATTACHMENTS_TAR_URL}"
84+
sudo su confluence -c "time wget --progress=dot:giga ${ATTACHMENTS_TAR_URL}"
8585

8686
echo "Step3: Untar attachments to tmp folder"
8787
sudo su -c "rm -rf ${ATTACHMENTS_DIR}"
88-
sudo su confluence -c "time tar -xzvf ${ATTACHMENTS_TAR}"
88+
sudo su confluence -c "time tar -xzf ${ATTACHMENTS_TAR} --checkpoint=.10000"
8989
if [[ $? -ne 0 ]]; then
9090
echo "Untar failed!"
9191
exit 1
@@ -97,4 +97,7 @@ sudo su -c "rm -rf ${ATTACHMENTS_TAR}"
9797

9898
echo "Step4: Copy attachments to EFS"
9999
sudo su confluence -c "time ./msrsync -P -p 100 -f 3000 ${ATTACHMENTS_DIR} ${EFS_DIR}"
100-
sudo su -c "rm -rf ${ATTACHMENTS_DIR}"
100+
sudo su -c "rm -rf ${ATTACHMENTS_DIR}"
101+
102+
echo "Finished"
103+
echo # move to a new line

‎app/util/data_preparation/jira/prepare-data.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
ISSUES = "issues"
1313
JQLS = "jqls"
1414
PROJECT_KEYS = "project_keys"
15+
PROJECTS_COUNT_LIMIT = 1000
1516

1617
DEFAULT_USER_PASSWORD = 'password'
1718
DEFAULT_USER_PREFIX = 'performance_'
@@ -78,7 +79,7 @@ def __write_to_file(file_path, items):
7879
def __create_data_set(jira_api):
7980
dataset = dict()
8081
dataset[USERS] = __get_users(jira_api)
81-
software_project_keys = __get_software_project_keys(jira_api)
82+
software_project_keys = __get_software_project_keys(jira_api, PROJECTS_COUNT_LIMIT)
8283
dataset[PROJECT_KEYS] = software_project_keys
8384
dataset[ISSUES] = __get_issues(jira_api, software_project_keys)
8485
dataset[SCRUM_BOARDS] = __get_boards(jira_api, 'scrum')
@@ -115,13 +116,13 @@ def __get_users(jira_api):
115116
return users
116117

117118

118-
def __get_software_project_keys(jira_api):
119+
def __get_software_project_keys(jira_api, max_projects_count):
119120
all_projects = jira_api.get_all_projects()
120121
software_project_keys = [project['key'] for project in all_projects if 'software' == project.get('projectTypeKey')]
121122
if not software_project_keys:
122123
raise SystemExit("There is no software project in Jira")
123-
124-
return software_project_keys
124+
# Limit number of projects to avoid "Request header is too large" for further requests.
125+
return software_project_keys[:max_projects_count]
125126

126127

127128
def main():

‎app/util/environment_checker.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
from sys import version_info
22

3-
SUPPORTED_PYTHON_VERSION = (3, 6)
3+
from util.conf import TOOLKIT_VERSION
44

5-
python_version = version_info[0:2]
6-
if python_version < SUPPORTED_PYTHON_VERSION:
5+
MIN_SUPPORTED_PYTHON_VERSION = (3, 6, 0)
6+
7+
8+
print("Data Center App Performance Toolkit version: {}".format(TOOLKIT_VERSION))
9+
10+
python_version = version_info[0:3]
11+
print("Python version: {}".format(python_version))
12+
if python_version < MIN_SUPPORTED_PYTHON_VERSION:
713
raise Exception(
814
"Python version {} is not supported. "
9-
"Please use Python version {} or higher.".format(python_version, SUPPORTED_PYTHON_VERSION))
15+
"Please use Python version {} or higher.".format(python_version, MIN_SUPPORTED_PYTHON_VERSION))

‎app/util/jira/populate_db.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ if [[ ${FREE_SPACE_GB} -lt ${REQUIRED_SPACE_GB} ]]; then
145145
echo "Required space: ${REQUIRED_SPACE_GB} GB"
146146
exit 1
147147
fi;
148-
time wget ${DB_DUMP_URL}
148+
# use computer style progress bar
149+
time wget --progress=dot:giga ${DB_DUMP_URL}
149150
if [[ $? -ne 0 ]]; then
150151
echo "DB dump download failed! Pls check available disk space."
151152
exit 1
@@ -195,5 +196,8 @@ echo "Step6: Start Jira"
195196
sudo su jira -c "${START_JIRA}"
196197
rm -rf ${DB_DUMP_NAME}
197198

199+
echo "Finished"
200+
echo # move to a new line
201+
198202
echo "Important: new admin user credentials are admin/admin"
199203
echo "Wait a couple of minutes until Jira is started."

‎app/util/jira/upload_attachments.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ if [[ ${FREE_SPACE_GB} -lt ${REQUIRED_SPACE_GB} ]]; then
8181
echo "Required space: ${REQUIRED_SPACE_GB} GB"
8282
exit 1
8383
fi;
84-
sudo su jira -c "time wget ${ATTACHMENTS_TAR_URL}"
84+
sudo su jira -c "time wget --progress=dot:giga ${ATTACHMENTS_TAR_URL}"
8585

8686
echo "Step3: Untar attachments to tmp folder"
8787
sudo su -c "rm -rf ${ATTACHMENTS_DIR}"
88-
sudo su jira -c "tar -xzvf ${ATTACHMENTS_TAR}"
88+
sudo su jira -c "tar -xzf ${ATTACHMENTS_TAR} --checkpoint=.10000"
8989
if [[ $? -ne 0 ]]; then
9090
echo "Untar failed!"
9191
exit 1
@@ -97,4 +97,7 @@ sudo su -c "rm -rf ${ATTACHMENTS_TAR}"
9797

9898
echo "Step4: Copy attachments to EFS"
9999
sudo su jira -c "time ./msrsync -P -p 100 -f 3000 ${ATTACHMENTS_DIR} ${EFS_DIR}"
100-
sudo su -c "rm -rf ${ATTACHMENTS_DIR}"
100+
sudo su -c "rm -rf ${ATTACHMENTS_DIR}"
101+
102+
echo "Finished"
103+
echo # move to a new line

‎requirements.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
matplotlib==3.1.1
2-
pandas==0.25.0
3-
importlib-metadata==0.20
4-
bzt==1.13.9
1+
matplotlib==3.1.2
2+
pandas==0.25.3
3+
importlib-metadata==1.4.0
4+
bzt==1.13.9

0 commit comments

Comments
 (0)
Failed to load comments.