Diff
Modified: trunk/Tools/ChangeLog (291489 => 291490)
--- trunk/Tools/ChangeLog 2022-03-18 18:06:52 UTC (rev 291489)
+++ trunk/Tools/ChangeLog 2022-03-18 18:48:50 UTC (rev 291490)
@@ -1,3 +1,21 @@
+2022-03-18 Jonathan Bedard <[email protected]>
+
+ [git-webkit] Make radar conditional on authentication
+ https://bugs.webkit.org/show_bug.cgi?id=238051
+ <rdar://problem/90384655>
+
+ Reviewed by Aakash Jain.
+
+ * Scripts/libraries/webkitbugspy/setup.py: Bump version.
+ * Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Ditto.
+ * Scripts/libraries/webkitbugspy/webkitbugspy/radar.py:
+ (Tracker.__init__): Only instantiate client with valid authentication.
+ (Tracker.authentication): Catch exceptions from failed authentication.
+ * Scripts/libraries/webkitscmpy/setup.py: Bump version.
+ * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+ * Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:
+ (Scm.__init__): Only instantiate Radar as a tracker with valid authentication.
+
2022-03-18 Patrick Griffis <[email protected]>
[Flatpak] Pass extra webkit-flatpak args to sub-command
Modified: trunk/Tools/Scripts/libraries/webkitbugspy/setup.py (291489 => 291490)
--- trunk/Tools/Scripts/libraries/webkitbugspy/setup.py 2022-03-18 18:06:52 UTC (rev 291489)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/setup.py 2022-03-18 18:48:50 UTC (rev 291490)
@@ -30,7 +30,7 @@
setup(
name='webkitbugspy',
- version='0.4.2',
+ version='0.4.3',
description='Library containing a shared API for various bug trackers.',
long_description=readme(),
classifiers=[
Modified: trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py (291489 => 291490)
--- trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py 2022-03-18 18:06:52 UTC (rev 291489)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py 2022-03-18 18:48:50 UTC (rev 291490)
@@ -46,7 +46,7 @@
"Please install webkitcorepy with `pip install webkitcorepy --extra-index-url <package index URL>`"
)
-version = Version(0, 4, 2)
+version = Version(0, 4, 3)
from .user import User
from .issue import Issue
Modified: trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py (291489 => 291490)
--- trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py 2022-03-18 18:06:52 UTC (rev 291489)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py 2022-03-18 18:48:50 UTC (rev 291490)
@@ -102,10 +102,10 @@
self._projects = [project] if project else (projects or [])
self.library = self.radarclient()
- if self.library:
+ authentication = authentication or self.authentication()
+ if authentication and self.library:
self.client = self.library.RadarClient(
- authentication or self.authentication(),
- self.library.ClientSystemIdentifier(library_name, str(library_version)),
+ authentication, self.library.ClientSystemIdentifier(library_name, str(library_version)),
)
else:
self.client = None
@@ -116,11 +116,15 @@
totp_secret = Environment.instance().get('RADAR_TOTP_SECRET')
totp_id = Environment.instance().get('RADAR_TOTP_ID') or 1
- if username and password and totp_secret and totp_id:
- return self.library.AuthenticationStrategySystemAccount(
- username, password, totp_secret, totp_id,
- )
- return self.library.AuthenticationStrategySPNego()
+ try:
+ if username and password and totp_secret and totp_id:
+ return self.library.AuthenticationStrategySystemAccount(
+ username, password, totp_secret, totp_id,
+ )
+ return self.library.AuthenticationStrategySPNego()
+ except Exception:
+ sys.stderr.write('No valid authentication session for Radar\n')
+ return None
def from_string(self, string):
for regex in self.RES:
Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (291489 => 291490)
--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py 2022-03-18 18:06:52 UTC (rev 291489)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py 2022-03-18 18:48:50 UTC (rev 291490)
@@ -29,7 +29,7 @@
setup(
name='webkitscmpy',
- version='4.4.0',
+ version='4.4.1',
description='Library designed to interact with git and svn repositories.',
long_description=readme(),
classifiers=[
Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (291489 => 291490)
--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py 2022-03-18 18:06:52 UTC (rev 291489)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py 2022-03-18 18:48:50 UTC (rev 291490)
@@ -46,7 +46,7 @@
"Please install webkitcorepy with `pip install webkitcorepy --extra-index-url <package index URL>`"
)
-version = Version(4, 4, 0)
+version = Version(4, 4, 1)
AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
AutoInstall.register(Package('jinja2', Version(2, 11, 3)))
Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py (291489 => 291490)
--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py 2022-03-18 18:06:52 UTC (rev 291489)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py 2022-03-18 18:48:50 UTC (rev 291490)
@@ -79,7 +79,7 @@
with open(path, 'r') as file:
trackers = Tracker.from_json(json.load(file))
for tracker in trackers:
- if isinstance(tracker, radar.Tracker) and not tracker.radarclient():
+ if isinstance(tracker, radar.Tracker) and (not tracker.radarclient() or not tracker.client):
continue
for contributor in self.contributors:
if contributor.name and contributor.emails: