Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mysql to 8.0.39 #202

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

MYSQL8_INSTALL_DIR = os.path.join(APPS_BASE_DIR, "MySQL")
MYSQL57_INSTALL_DIR = os.path.join("C:\\", "Program Files", "MySQL", "MySQL Server 5.7")
MYSQL_LATEST_VERSION = "8.0.32"
MYSQL_LATEST_VERSION = "8.0.39"
MYSQL_ZIP = os.path.join(
INST_SHARE_AREA,
"kits$",
Expand Down Expand Up @@ -64,7 +64,7 @@
Tasks relating to installing or maintaining an installation of MySQL on a machine.
"""

def _get_mysql_dir(self):

Check failure on line 67 in installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN202)

installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py:67:9: ANN202 Missing return type annotation for private function `_get_mysql_dir`
"""
Returns the mysql 8 default install directory if it exists, else 5.7.

Expand All @@ -76,7 +76,7 @@

return mysql_bin_dir

def _get_mysql_backup_dir(self):

Check failure on line 79 in installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN202)

installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py:79:9: ANN202 Missing return type annotation for private function `_get_mysql_backup_dir`
mysql_backup_dir = os.path.join(
STAGE_DELETED,
self._get_machine_name(),
Expand All @@ -87,14 +87,14 @@
return mysql_backup_dir

@task("Truncate database")
def truncate_database(self):

Check failure on line 90 in installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN201)

installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py:90:9: ANN201 Missing return type annotation for public function `truncate_database`
"""
Truncate the message log, sample and alarms tables
"""
try:
mysql_bin_dir = self._get_mysql_dir()

sql_command = "truncate table msg_log.message;truncate table archive.sample;truncate table alarm.pv"

Check failure on line 97 in installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (E501)

installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py:97:101: E501 Line too long (112 > 100)

RunProcess(
MYSQL_FILES_DIR,
Expand All @@ -110,7 +110,7 @@
f"Error is {ex}"
)

def _configure_mysql(self):

Check failure on line 113 in installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN202)

installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py:113:9: ANN202 Missing return type annotation for private function `_configure_mysql`
"""
Copy mysql settings and run the MySQL configuration script
"""
Expand All @@ -131,7 +131,7 @@
admin_commands.add_command("sc", "start MYSQL80", expected_return_val=None)
admin_commands.run_all()

def _remove_old_versions_of_mysql8(self, clean_install):

Check failure on line 134 in installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN202)

installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py:134:9: ANN202 Missing return type annotation for private function `_remove_old_versions_of_mysql8`

Check failure on line 134 in installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN001)

installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py:134:46: ANN001 Missing type annotation for function argument `clean_install`
if clean_install:
self.prompt.prompt_and_raise_if_not_yes(
"Warning: this will erase all data held in the MySQL database. "
Expand All @@ -151,11 +151,11 @@
if clean_install:
self._remove_old_mysql_data_dir()

def _remove_old_mysql_data_dir(self):

Check failure on line 154 in installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN202)

installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py:154:9: ANN202 Missing return type annotation for private function `_remove_old_mysql_data_dir`
if os.path.exists(MYSQL_FILES_DIR):
shutil.rmtree(MYSQL_FILES_DIR)

def _create_mysql_binaries(self):

Check failure on line 158 in installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN202)

installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py:158:9: ANN202 Missing return type annotation for private function `_create_mysql_binaries`
os.makedirs(MYSQL8_INSTALL_DIR)

mysql_unzip_temp = os.path.join(APPS_BASE_DIR, "temp-mysql-unzip")
Expand All @@ -171,7 +171,7 @@

shutil.rmtree(mysql_unzip_temp)

def _initialize_mysql_data_area_for_vhd(self):

Check failure on line 174 in installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN202)

installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py:174:9: ANN202 Missing return type annotation for private function `_initialize_mysql_data_area_for_vhd`
os.makedirs(os.path.join(MYSQL_FILES_DIR, "data"))

RunProcess(
Expand Down