Bug 52204 - The Veyon API client needs to handle idle timeouts
The Veyon API client needs to handle idle timeouts
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Veyon
unspecified
Other Linux
: P5 normal (vote)
: UCS@school 4.4 v7-errata
Assigned To: Ole Schwiegert
Daniel Tröder
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-10-12 09:49 CEST by Ole Schwiegert
Modified: 2020-12-22 08:29 CET (History)
2 users (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ole Schwiegert univentionstaff 2020-10-12 09:49:00 CEST
A connection to the Veyon API is invalidated after a certain idle time.
The client should be configurable with such an idle timeout value and fetch a new connection in advance.
Comment 1 Ole Schwiegert univentionstaff 2020-10-12 11:39:21 CEST
Implemented on oschwieg/4.4/52204

You can now define an idle timeout. If a connection was not used for the specified time, a new connection is created and cached.

Please QA and REOPEN for merge&build
Comment 2 Tobias Wenzel univentionstaff 2020-10-13 14:53:34 CEST
QA -> Looks good -> REOPEN for merge & build

As discussed, add the missing unittest (see last code-block in this comment) and then merge & build. 

Code -> Looks good

build & install -> OK
the unittests are passing during override_dh_auto_test 

the test-scenarios were also tested manually:
client.remove_session("localhost")
-> removes the session as expected


idle-timeout -> new session

client._session_cache["localhost"] = None
client._get_connection_uid(renew_session=True)
# -> new session


client._session_cache["localhost"] = None
client._get_connection_uid(renew_session=False)
# raises VeyonError: The currently cached connection is invalid
Comment 3 Ole Schwiegert univentionstaff 2020-10-14 09:08:40 CEST
Package: ucs-school-veyon-client
Version: 1.0.1-1A~4.4.0.202010140905
Branch: ucs_4.4-0
Scope: ucs-school-4.4

Unit test was added.
Comment 4 Daniel Tröder univentionstaff 2020-10-14 11:00:07 CEST
OK: unit tests
OK: merge, changelog and package build
OK: update acf477db3 to unit test without package rebuild was tested
OK: advisory
Comment 5 Daniel Tröder univentionstaff 2020-10-14 16:10:44 CEST
UCS@school 4.4 v7 (errata 2020-10-14) has been released.

https://docs.software-univention.de/changelog-ucsschool-4.4v7-de.html

If this error occurs again, please clone this bug.