Repository navigation
Console: say why there is no console, for each case - #176
Merged
Merged
Conversation
The console's 503 named only the agent off, a missing binary or a stopped
agent. An agent running without its console (started without --serve), whose
console.addr is missing or left over, got "the agent isn't running". Now
agent.no_console() tells the cases apart in the words the JS and Java SDKs use
(off, a named agent's console, no console, no binary, didn't start with its
agent.log). A browser's page (Accept: text/html) gets a page in the console's
look that reloads itself every 2 s; the rest gets {"error": ...}; both with
Retry-After.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The console under
/__tracepanel__/already answered 503 without an agent, but its reason (agent.unavailable()) knew only "off", "no binary" and "isn't running". An agent alive atagent.addrbut serving no console (started by hand without--serve; console.addr missing or left over) was reported as "the agent isn't running".Now
agent.no_console()gives a title and a detail, in the same words as the JS and Java SDKs:TRACEPANEL_AGENT=off)console_urlTRACEPANEL_AGENT_BINnaming nothing / no binary for this platformagent.logA browser page (
Accept: text/html, now passed by Django, ASGI and WSGI onRequest.accept) gets a small self-contained page in the console's dark look that reloads itself every 2 s; everything else gets{"error": "<detail>"}. Both carryRetry-After: 2andCache-Control: no-store.unavailable()stays for the CLI and the pytest plugin.Tests:
tests/console/test_no_console.py(each case, the page's refresh and escaping);tests/django/test_widget.pyupdated.uv syncwith all CI groups,poe lintandpoe testpass (1469 passed).🤖 Generated with Claude Code