Fixed following issues related to auto-update:

1. Fixed the issue where auto-update was not working for macOS x64 arch machines as pgadmin4 zip file name has x86_64 in it.
2. Improved error handling in the /upgrade_check API by replacing the static “Failed to check for update” message for Windows users with a dynamic error message.
3. Fixed the CSS issue affecting the close icon in the warning notifier.
4. Removed trailing periods from helper texts and notifier messages in the app’s auto-update workflow. #9133
This commit is contained in:
Anil Sahoo authored and GitHub committed 2025-10-13 17:25:14 +05:30
1 parent 758bbc7272
commit 5f22b4e2d2
9 files changed
+32 -29

No files matched your search

@@ -1171,9 +1171,11 @@ class FunctionView(PGChildNodeView, DataTypeReader, SchemaDiffObjectCompare):
old_data['proparallel'] = \
parallel_dict[old_data['proparallel']]
if self.node_type == 'function' and \
old_data['dependsonextensions'] is None:
old_data['dependsonextensions'] = []
if self.node_type == 'function':
old_data['dependsonextensions'] = \
old_data.get('dependsonextensions') or []
data['dependsonextensions'] = \
data.get('dependsonextensions') or []
# If any of the below argument is changed,
# then CREATE OR REPLACE SQL statement should be called
+1 -1
View File
@@ -282,7 +282,7 @@ define('pgadmin.browser', [
});
const isDesktopWithAutoUpdate = pgAdmin.server_mode == 'False' && data.check_for_auto_updates && data.auto_update_url !== '';
const isUpdateAvailable = data.outdated && data.upgrade_version_int > data.current_version_int;
const noUpdateMessage = 'No update available...';
const noUpdateMessage = 'No update available.';
// This is for desktop installers whose auto_update_url is mentioned in https://www.pgadmin.org/versions.json
if (isDesktopWithAutoUpdate) {
if (isUpdateAvailable) {
+6 -4
View File
@@ -34,6 +34,7 @@ import ssl
from urllib.request import urlopen
from urllib.parse import unquote
from pgadmin.settings import get_setting, store_setting
import html
MODULE_NAME = 'misc'
@@ -389,10 +390,11 @@ def upgrade_check():
if response.getcode() == 200:
data = json.loads(response.read().decode('utf-8'))
current_app.logger.debug('Response data: %s' % data)
except Exception:
current_app.logger.exception(
'Exception when checking for update')
return internal_server_error('Failed to check for update')
except Exception as e:
current_app.logger.exception(e)
# Escaping the error message to prevent HTML execution in UI
escaped_error = html.escape(str(e))
return internal_server_error(errormsg=escaped_error)
if data and config.UPGRADE_CHECK_KEY and \
config.UPGRADE_CHECK_KEY in data:
+2 -2
View File
@@ -198,9 +198,9 @@ export default function BrowserComponent({pgAdmin}) {
if (data?.check_version_update) {
pgAdmin.Browser.check_version_update(true);
} else if (data.update_downloading) {
appAutoUpdateNotifier('Update downloading...', 'info', null, 10000);
appAutoUpdateNotifier('Update downloading.', 'info', null, 10000);
} else if (data.no_update_available) {
appAutoUpdateNotifier('No update available...', 'info', null, 10000);
appAutoUpdateNotifier('No update available.', 'info', null, 10000);
} else if (data.update_downloaded) {
const UPDATE_DOWNLOADED_MESSAGE = gettext('An update is ready. Restart the app now to install it, or later to keep using the current version.');
appAutoUpdateNotifier(UPDATE_DOWNLOADED_MESSAGE, 'warning', installUpdate, null, 'Update downloaded', 'update_downloaded');
@@ -1287,7 +1287,6 @@ const StyledNotifierMessageBox = styled(Box)(({theme}) => ({
backgroundColor: theme.palette.warning.light,
'& .FormFooter-iconWarning': {
color: theme.palette.warning.main,
marginBottom: theme.spacing(8),
},
},
'& .FormFooter-message': {