Skip to content

feat: support custom timeout for DevTools license download#24722

Open
totally-not-ai[bot] wants to merge 12 commits into
mainfrom
feat/devtools-license-download-timeout
Open

feat: support custom timeout for DevTools license download#24722
totally-not-ai[bot] wants to merge 12 commits into
mainfrom
feat/devtools-license-download-timeout

Conversation

@totally-not-ai

Copy link
Copy Markdown
Contributor

DevTools triggers an asynchronous license download that opens the
system browser so the user can sign in and fetch a license. The
license-checker waits a fixed 60 seconds for that to complete, which
is too short for first-time users who still need to register a Vaadin
account before they can download the license. When the timeout
elapses the download fails and the popup that initiated it becomes
stale, forcing a page reload and a repeat of the whole flow.

Allow callers of downloadLicense in the dev tools to pass an optional
timeout. The value is forwarded to the server and passed on to
LicenseChecker.checkLicenseAsync; when omitted the previous default
behavior is kept.

Fixes #24717

totally-not-ai Bot added 2 commits June 22, 2026 12:30
DevTools triggers an asynchronous license download that opens the
system browser so the user can sign in and fetch a license. The
license-checker waits a fixed 60 seconds for that to complete, which
is too short for first-time users who still need to register a Vaadin
account before they can download the license. When the timeout
elapses the download fails and the popup that initiated it becomes
stale, forcing a page reload and a repeat of the whole flow.

Allow callers of downloadLicense in the dev tools to pass an optional
timeout. The value is forwarded to the server and passed on to
LicenseChecker.checkLicenseAsync; when omitted the previous default
behavior is kept.

Fixes #24717
Pass an options object to downloadLicense instead of a bare timeout
argument so additional download settings can be added later without
changing the method signature.
Always call the license checker with an explicit timeout, defaulting
to 5 minutes when the client does not provide one, so the download
behaves identically in all cases.
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

Test Results

 1 453 files  ±0   1 453 suites  ±0   1h 26m 49s ⏱️ +59s
10 271 tests +2  10 203 ✅ +2  68 💤 ±0  0 ❌ ±0 
10 743 runs  +2  10 674 ✅ +2  69 💤 ±0  0 ❌ ±0 

Results for commit a92f140. ± Comparison against base commit 554167c.

♻️ This comment has been updated with latest results.

Exercise the url handler passed to the license checker so the browser
opening logic is covered.
Artur-
Artur- previously approved these changes Jun 22, 2026
@abdullahtellioglu

Copy link
Copy Markdown
Collaborator

There is a timeout in LicenseChecker, which is 60 seconds. Now there is another timeout constant in DebugWindowConnection, which is 3 minutes. It is a bit odd to have two timeout constants show different values

@Artur-

Artur- commented Jun 22, 2026

Copy link
Copy Markdown
Member

True, probably better to tune the default timeout in license checker and not include a custom one here

Remove the server-side default timeout constant and have the dev tools
client send the timeout (in seconds) with the download request. The
default value now lives only in the frontend, so the server simply
forwards what it receives instead of defining a second timeout value.
@totally-not-ai

Copy link
Copy Markdown
Contributor Author

@abdullahtellioglu Good point. I removed the timeout constant from DebugWindowConnection so there is no longer a second default sitting next to the license checker's 60s. The dev tools client now owns the timeout: it sends the value with the download request (defaulting to 300s, defined once in the frontend) and the server just forwards it to the license checker. So there's a single source of truth for the dev tools download timeout.

Only forward a timeout to the license checker when the dev tools client
explicitly provides one. When omitted, the license checker's own
default applies, so the default can be tuned there instead of being
duplicated here.
@totally-not-ai

Copy link
Copy Markdown
Contributor Author

@Artur- Done — removed the custom default. The dev tools now only pass a timeout to the license checker when the client explicitly provides one; when omitted, the license checker's own default applies, so it can be tuned there instead of being duplicated here.

Artur-
Artur- previously approved these changes Jun 22, 2026
Note why the download uses two calls and opens the browser directly:
LicenseChecker has no timeout-only checkLicenseAsync overload, so a url
handler must be supplied and the checker's default handler is not
accessible here.
totally-not-ai Bot added 3 commits June 23, 2026 17:34
License checker 3.1.0 adds a checkLicenseAsync overload that takes only
a timeout and reuses the checker's own browser handler. Use it so the
download is a single call with no browser handling here, and fall back
to the checker's public default timeout when the client sends none.
…imeout' into feat/devtools-license-download-timeout
@totally-not-ai totally-not-ai Bot dismissed stale reviews from abdullahtellioglu and Artur- via 58abc4c June 23, 2026 17:43
The previous run failed while installing flow-maven-plugin with a
corrupted cached com.vaadin/maven-metadata.xml (stray content after
</metadata>), unrelated to these changes. Re-running on a clean cache.
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DownloadLicense should have timeout argument

2 participants