diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-05-09 17:43:42 +0200 |
---|---|---|
committer | Sascha Roloff <sascha.roloff@huawei.com> | 2025-05-12 10:49:25 +0200 |
commit | 5aba3e6394a665d3c11973424c59d603134a3fbd (patch) | |
tree | 82be8856cc99d5df60e706f1e219078ef2a68b1c /doc | |
parent | 3d203cdfaa244cd0f197d2faed7de6b87e22314f (diff) | |
download | justbuild-5aba3e6394a665d3c11973424c59d603134a3fbd.tar.gz |
Invocation server: support restricting to not-fully-cached builds
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/invocations-http-server/server.py | 13 | ||||
-rw-r--r-- | doc/invocations-http-server/templates/invocations.html | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/doc/invocations-http-server/server.py b/doc/invocations-http-server/server.py index 9bae82d7..138c5f2e 100755 --- a/doc/invocations-http-server/server.py +++ b/doc/invocations-http-server/server.py @@ -66,6 +66,8 @@ class InvocationServer: rule("/", methods=("GET",), endpoint="list_invocations"), rule("/filterinvocations/context/<hexidentifier:key>/<hexidentifier:value>", methods=("GET",), endpoint="filter_context"), + rule("/filterinvocations/noncached", + methods=("GET",), endpoint="filter_noncached"), rule("/filterinvocations/remote/prop/<hexidentifier:key>/<hexidentifier:value>", methods=("GET",), endpoint="filter_remote_prop"), rule("/blob/<hashidentifier:blob>", @@ -194,6 +196,17 @@ class InvocationServer: metadata_filter = check_prop, ) + def do_filter_noncached(self): + def check_noncached(p): + for v in p.get('actions', {}).values(): + if not v.get('cached'): + return True + return False + return self.do_list_invocations( + filter_info = "not fully cached", + profile_filter = check_noncached, + ) + def process_failure(self, cmd, procobj, *, failure_kind=None): params = {"stdout": None, "stderr": None, "failure_kind": failure_kind} params["cmd"] = json.dumps(cmd) diff --git a/doc/invocations-http-server/templates/invocations.html b/doc/invocations-http-server/templates/invocations.html index dee5f46b..1417a3c4 100644 --- a/doc/invocations-http-server/templates/invocations.html +++ b/doc/invocations-http-server/templates/invocations.html @@ -8,6 +8,8 @@ Recent Invocations <h1>Invocations filtered by {{ filter_info | e }}</h1> {% else %} <h1>Recent Invocations</h1> + +Filter: <a href="/filterinvocations/noncached">only not fully cached</a> {% endif %} {% if invocations %} <ul> |