mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 14:03:02 +00:00
add some debugging output for intermittent share code failure
This commit is contained in:
@@ -945,7 +945,7 @@ class ShareCode(_Share, Hashed, Base):
|
||||
else:
|
||||
server_name = "unknown/deleted"
|
||||
|
||||
return f"<{self.__class__.__name__}(server={server_name}, scopes={self.scopes}, expires_at={self.expires_at})>"
|
||||
return f"<{self.__class__.__name__}(id={self.id}, server={server_name}, scopes={self.scopes}, expires_at={self.expires_at})>"
|
||||
|
||||
@classmethod
|
||||
def new(
|
||||
|
@@ -1342,6 +1342,13 @@ async def test_share_codes_api_revoke(
|
||||
method="delete",
|
||||
name=requester.name,
|
||||
)
|
||||
if r.status_code != status:
|
||||
# debug intermittent failure
|
||||
print(f"{share_code=}")
|
||||
print(f"{code=}")
|
||||
print(f"{url=}")
|
||||
for sc in db.query(orm.ShareCode):
|
||||
print(f"{sc.id=}, {sc.prefix=}, {sc.hashed=}, {sc=}")
|
||||
assert r.status_code == status
|
||||
|
||||
# other code unaffected
|
||||
|
Reference in New Issue
Block a user