Skip to content

Commit

Permalink
🐛 adding debug info in the e2e test (#482)
Browse files Browse the repository at this point in the history
* 🐛 adding extra debug info for e2e on failure

Signed-off-by: Shawn Hurley <[email protected]>

* attempt to output debug log level on task failure

Signed-off-by: Shawn Hurley <[email protected]>

* attempt to get logs again

Signed-off-by: Shawn Hurley <[email protected]>

* adding debug

Signed-off-by: Shawn Hurley <[email protected]>

* output server log

Signed-off-by: Shawn Hurley <[email protected]>

* fixup

Signed-off-by: Shawn Hurley <[email protected]>

* fixup

Signed-off-by: Shawn Hurley <[email protected]>

* fixup

Signed-off-by: Shawn Hurley <[email protected]>

* fixup

Signed-off-by: Shawn Hurley <[email protected]>

* re-generating the cached data for new task selection

Signed-off-by: Shawn Hurley <[email protected]>

* fixup

Signed-off-by: Shawn Hurley <[email protected]>

---------

Signed-off-by: Shawn Hurley <[email protected]>
  • Loading branch information
shawn-hurley committed Nov 12, 2024
1 parent f303739 commit e039dd2
Show file tree
Hide file tree
Showing 35 changed files with 27,043 additions and 32,426 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build-and-push-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ jobs:
cat << EOF > ./example/config.toml
log_level = "info"
file_log_level = "debug"
log_dir = "/home/runner/work/kai/kai/kai/../../logs/"
demo_mode = true
[models]
provider = "${{ matrix.models.provider }}"
[models.args]
Expand All @@ -134,7 +137,10 @@ jobs:
echo "Tests passed"
exit 0
else
echo "Tests failed"
echo "Tests failed, only $changed_files_count where changed"
git diff --name-only
cat /home/runner/work/kai/kai/kai/../../logs/kai_server.log
cat /home/runner/work/kai/kai/example/logs/kai_server.log
exit 1
fi
env:
Expand Down
7 changes: 6 additions & 1 deletion example/run_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import time
from io import BufferedReader, BufferedWriter
from pathlib import Path
from typing import Generator, cast
from typing import Generator, Optional, cast

from opentelemetry import trace
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
Expand Down Expand Up @@ -68,6 +68,10 @@ def initialize_rpc_server(
kai_config: KaiConfig,
) -> Generator[JsonRpcServer, None, None]:

cache_dir: Optional[Path] = None
if kai_config.cache_dir is not None:
cache_dir = Path(kai_config.cache_dir)

log = get_logger("client")
config = KaiRpcApplicationConfig(
process_id=None,
Expand All @@ -76,6 +80,7 @@ def initialize_rpc_server(
log_dir_path=Path("./logs"),
model_provider=kai_config.models,
demo_mode=True,
cache_dir=cache_dir,
analyzer_lsp_java_bundle_path=ANALYSIS_BUNDLE_PATH,
analyzer_lsp_lsp_path=ANALYSIS_LSP_PATH,
analyzer_lsp_rpc_path=ANALYSIS_RPC_PATH,
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit e039dd2

Please sign in to comment.