Skip to content

Commit

Permalink
Merge pull request #1544 from bersace/correctifs
Browse files Browse the repository at this point in the history
Tornado 6.4
  • Loading branch information
bersace authored Dec 9, 2024
2 parents c671b64 + 870f2a9 commit 1edad6c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ You need manual steps when upgrading UI.
- Fix running daemonized.
- Raise proper error on unknown environment.
- Improve alerting performance.
- Support Tornado 6.4 on RHEL9.


## 9.0.0
Expand Down
5 changes: 4 additions & 1 deletion tests/test_30_dashboard.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from time import sleep

from selenium.webdriver.common.keys import Keys
Expand Down Expand Up @@ -28,7 +29,9 @@ def test_dashboard(browser, registered_agent, ui_url):

memory, percent = browser.select("#total-memory").text.split()
assert "%" == percent
assert int(memory) > 1
if os.environ.get("CI") != "true":
# It seems that CircleCI prevent proper memory stats.
assert int(memory) > 1

memory, unit = browser.select("#memory").text.split()
assert unit.endswith("B")
Expand Down
2 changes: 1 addition & 1 deletion ui/packaging/rpm/temboard.spec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Requires: python3-flask
Requires: python3-future
Requires: python3-psycopg2 > 2.8
Requires: python3-setuptools
Requires: python3-tornado
Requires: python3-tornado < 6.5
%if 0%{?rhel} < 8
Requires: python36-cryptography
Requires: python36-dateutil
Expand Down
7 changes: 1 addition & 6 deletions ui/setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import os

from setuptools import __version__ as setuptoolsv
from setuptools import find_packages, setup

# Load version number
__version__ = None
setup_path = os.path.dirname(os.path.realpath(__file__))
exec(open(os.path.join(setup_path, "temboardui", "version.py")).read())

if setuptoolsv < "1.0":
__version__ = __version__.replace("+", ".")

install_requires = [
"cryptography",
"flask",
Expand All @@ -22,8 +18,7 @@
# the user or package manager to ensure psycopg2 dependency. See
# documentation.
"sqlalchemy>=1.3.2,<2",
# _verify_cert in SSLIOStream is removed on Tornado 6.4+ on Python 3+.
"tornado>=6.0.2,<6.4",
"tornado>=6.0.2,<6.5",
"future",
]

Expand Down
10 changes: 7 additions & 3 deletions ui/temboardui/autossl.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,13 @@ def _do_ssl_handshake(self):
return self.close(exc_info=True)
else:
self._ssl_accepting = False
if not self._verify_cert(self.socket.getpeercert()):
self.close()
return
if hasattr(self, "_verify_cert"):
# DEPRECATED: Tornado 6.3 / Python 3.8 ?
if not self._verify_cert(self.socket.getpeercert()):
self.close()
return
else:
assert ssl.HAS_SNI # From Tornado 6.4
try:
self._run_ssl_connect_callback() # Tornado < 6
except AttributeError:
Expand Down
2 changes: 1 addition & 1 deletion ui/temboardui/model/versions/013_alerting-index.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
SET search_path TO monitoring, public;
CREATE INDEX idx_state_changes_key
CREATE INDEX IF NOT EXISTS idx_state_changes_key
ON monitoring.state_changes (check_id, key, datetime DESC);

0 comments on commit 1edad6c

Please sign in to comment.