Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement - Improve playground error message and introduce new CLI command for cloudwatch logs #984

Closed
wants to merge 32 commits into from
Closed
Changes from 4 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d4e75d8
Update - improve playground error message
aybruhm Dec 1, 2023
33f2493
Refactor - clean up view navigation component
aybruhm Dec 1, 2023
ab99363
format fix
bekossy Dec 1, 2023
0f45864
Merge branch 'main' into gh/issue-885-resolve
bekossy Dec 5, 2023
3820110
Update - improve playground error message
aybruhm Dec 1, 2023
9537585
Feat - created cli app_logs command module
aybruhm Dec 6, 2023
319848e
Update - register app_logs command to cli
aybruhm Dec 6, 2023
956f208
Feat - created retrieve_app_logs cli client
aybruhm Dec 6, 2023
2ba848e
Update - created get_app_logs router skeleton
aybruhm Dec 6, 2023
f204f46
Cleanup - arrange imports
aybruhm Dec 7, 2023
339a233
Refactor - renamed app_logs to variant_logs
aybruhm Dec 7, 2023
5fe61c7
Refactor - renamed retrieve_app_logs to retrieve_variant_logs
aybruhm Dec 7, 2023
0e71231
Feat - implemented retrieve variant logs api router
aybruhm Dec 7, 2023
877be34
Feat - implemented retrieve cloudwatch logs function
aybruhm Dec 7, 2023
253029a
:art: Format - ran black and format-fix
aybruhm Dec 7, 2023
19e4862
Update - modified retrieve_cloudwatch_logs function
aybruhm Dec 8, 2023
ad0f1b5
Update - created get_deployment_by_appId db function
aybruhm Dec 8, 2023
86ba72b
Update - modified get_variant_logs_stream function
aybruhm Dec 8, 2023
73ebda9
Update - add different error messages based on feature-flag
aybruhm Dec 8, 2023
cd64de6
:art: Format - ran prettier --write .
aybruhm Dec 8, 2023
6556116
Update - created isCloud and isEnterprise utils function
aybruhm Dec 8, 2023
2558688
Update - include region_name to logs_manager boto client
aybruhm Dec 8, 2023
385d2e6
Update - modified error message for cloud users
aybruhm Dec 8, 2023
84ffae0
Update - include return type to get_app_variant_instance_by_id db fun…
aybruhm Dec 8, 2023
365f1ce
Refactor & Cleanup - modified process (cli->client->backend) to retri…
aybruhm Dec 8, 2023
58005a4
Refactor - move logs_manager to cloud/services/ and sync changes
aybruhm Dec 8, 2023
c19bcb7
Update - clean up retrieve_variant_logs api router
aybruhm Dec 11, 2023
0ab8b58
:art: Format - ran black
aybruhm Dec 11, 2023
a0ac49e
Update - modified retrieve_variant_logs api router
aybruhm Dec 11, 2023
7d58ab4
Update - refactor messages in click.style(...)
aybruhm Dec 11, 2023
f97c368
Refactor - renamed func to get_variant_logs
aybruhm Dec 11, 2023
195e26c
Cleanup - remove console log
aybruhm Dec 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions agenta-web/src/components/Playground/ViewNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ const ViewNavigation: React.FC<Props> = ({

if (isError) {
let variantDesignator = variant.templateVariantName
let imageName = `agentaai/${(currentApp?.app_name || "").toLowerCase()}_`
let appName = currentApp?.app_name || ""
let imageName = `agentaai/${appName.toLowerCase()}_`

if (!variantDesignator || variantDesignator === "") {
variantDesignator = variant.variantName
Expand Down Expand Up @@ -154,6 +155,7 @@ const ViewNavigation: React.FC<Props> = ({
}

const apiAddress = `${containerURI}/openapi.json`
const containerName = `${appName}-${variant.baseName}-${containerURI.split("/")[3]}` // [3] is the user organization id
return (
<div>
{error ? (
Expand All @@ -172,15 +174,18 @@ const ViewNavigation: React.FC<Props> = ({
</li>
<li>
Check if the Docker container for the variant {variantDesignator} is
running. The image should be called {imageName}.
active by running the following command in your terminal:
<pre>docker logs {containerName} --tail 50 -f</pre>
Running the above command will enable you to continuously stream the
container logs in real-time as they are generated.
</li>
</ul>
<p>
{" "}
In case the docker container is not running. Please check the logs from
docker to understand the issue. Most of the time it is a missing
In case the docker container is not running, please check the Docker
logs to understand the issue. Most of the time, it is due to missing
requirements. Also, please attempt restarting it (using cli or docker
desktop)
desktop).
</p>
<p>
{" "}
Expand Down
Loading