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

Issue 156/make component content invisible in posthog #929

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
272 commits
Select commit Hold shift + click to select a range
defbc5b
Merge branch 'main' into feat/cypress
Dhoni77 Oct 29, 2023
5f474cf
chore: test
Dhoni77 Oct 29, 2023
5a773ec
chore: test
Dhoni77 Oct 29, 2023
b9fbae0
chore: test
Dhoni77 Oct 29, 2023
ec61e61
chore: test
Dhoni77 Oct 29, 2023
73aaf85
test
Dhoni77 Oct 29, 2023
eb5bcc4
chore: test
Dhoni77 Oct 29, 2023
cedd846
Merge branch 'main' into feat/cypress
aybruhm Oct 30, 2023
1ab366a
Update - added new step to set openai api key to github env
aybruhm Oct 30, 2023
4bf7957
Update - access openai api key from process.env
aybruhm Oct 30, 2023
c354801
Cleanup - revert changes in cypress.config.ts and update frontend-tes…
aybruhm Oct 30, 2023
437c455
Cleanup - remove redundant step
aybruhm Oct 30, 2023
d34cada
Update - change workflow trigger
aybruhm Oct 31, 2023
d3e7594
Merge branch 'main' into feat/cypress
aybruhm Oct 31, 2023
8495177
Update - added environment to cypress job
aybruhm Oct 31, 2023
7af672a
Update - access openai api key from environment proces
aybruhm Oct 31, 2023
e9c405d
fixed fontend-tests workflow and cypress config
MohammedMaaz Oct 31, 2023
9d5f1d6
Merge branch 'main' of https://github.com/Agenta-AI/agenta into feat/…
MohammedMaaz Oct 31, 2023
b9cbadf
fixed failing test cases
MohammedMaaz Oct 31, 2023
d54222f
Merge branch 'main' of https://github.com/Agenta-AI/agenta into feat/…
MohammedMaaz Oct 31, 2023
528f778
temporarily enable only testset spec for testing
MohammedMaaz Oct 31, 2023
781ccd0
fixed base url
MohammedMaaz Oct 31, 2023
1f567a0
debug logs
MohammedMaaz Nov 1, 2023
a5f667a
fixed openapi.json endpoint url
MohammedMaaz Nov 1, 2023
8ad88cc
modified logic to test if BE is up
MohammedMaaz Nov 1, 2023
abaaf55
removed traefic, use docker-compose.test.dev file for cypress tests
MohammedMaaz Nov 1, 2023
d7a6473
fixed frontend-test.yml
MohammedMaaz Nov 1, 2023
6ab3888
Merge branch 'Agenta-AI:main' into cypress-test/abTesting-evaluation
bekossy Nov 1, 2023
47351fd
fixed frontend-test.yml
MohammedMaaz Nov 1, 2023
1dadada
fixed waiting for backend logic
MohammedMaaz Nov 1, 2023
425275f
removed curl and waiting for BE steps
MohammedMaaz Nov 1, 2023
83eaa48
modified wait on api logic
MohammedMaaz Nov 1, 2023
b9a433e
updated frontend-tests.yml
MohammedMaaz Nov 1, 2023
467ff56
Update frontend-tests.yml
mmabrouk Nov 2, 2023
c210203
updated frontend-tests.yml
MohammedMaaz Nov 2, 2023
dc4cbdb
added smoke tests
MohammedMaaz Nov 2, 2023
f018947
Update frontend-tests.yml
mmabrouk Nov 2, 2023
77ab5ff
Update frontend-tests.yml
mmabrouk Nov 2, 2023
be894a9
Update frontend-tests.yml
mmabrouk Nov 2, 2023
b8f56f6
feat: improve test suite
bekossy Nov 2, 2023
f212d57
Merge branch 'Agenta-AI:main' into cypress-test/abTesting-evaluation
bekossy Nov 3, 2023
20581d7
Merge pull request #862 from Agenta-AI/sent
mmabrouk Nov 3, 2023
e26e2cf
fix: select variants and testset
bekossy Nov 3, 2023
bba4d3d
improve test
bekossy Nov 3, 2023
bda1a8a
added sentry for cloud
mmabrouk Nov 3, 2023
b55a81b
sentry
mmabrouk Nov 3, 2023
105f5c9
remove save_object_to_db
devgenix Nov 3, 2023
1485bb6
refactored get_user, added helper function to get by email & id
devgenix Nov 3, 2023
a1f81ba
format black
devgenix Nov 3, 2023
5d50e63
hot fix docs
mmabrouk Nov 3, 2023
bba52d2
fixed issue + updated api
mmabrouk Nov 3, 2023
cd5d728
Merge pull request #865 from Agenta-AI/doc_improve2
mmabrouk Nov 3, 2023
b8c0cb1
Merge pull request #864 from devgenix/oss-organization_refactor
mmabrouk Nov 3, 2023
6431c9d
Update - added step to restart backend to fetch templates and to know…
aybruhm Nov 4, 2023
aa95d6d
Update - replace agenta-backend-1 to agenta_backend_1
aybruhm Nov 4, 2023
0ac85c7
feat: integrate intercom
bekossy Nov 4, 2023
c457b1a
improve test descriptions
bekossy Nov 4, 2023
158d95f
fix build issues
bekossy Nov 5, 2023
287fc11
minor changes
bekossy Nov 5, 2023
d6c1fc6
build fix
bekossy Nov 5, 2023
78ab950
minor modification
bekossy Nov 5, 2023
aaa30aa
Merge pull request #866 from bekossy/Integrate-Intercom-with-agenta-c…
mmabrouk Nov 5, 2023
5584686
minor fix
bekossy Nov 5, 2023
96216a4
Merge pull request #867 from bekossy/intercom-fix
mmabrouk Nov 5, 2023
0905892
fix env vars
mmabrouk Nov 5, 2023
e549528
Merge pull request #868 from Agenta-AI/posthog_intercom_env_vars_fix
mmabrouk Nov 5, 2023
4b4944e
Merge branch 'Agenta-AI:main' into cypress-test/abTesting-evaluation
bekossy Nov 6, 2023
70c7bd1
Feat - created messages sdk param type
aybruhm Nov 7, 2023
ca3ddd9
Update - import messages param to agenta/ and agenta/sdk/ init module(s)
aybruhm Nov 7, 2023
a85a918
Update - added logic to override message param schema
aybruhm Nov 7, 2023
71ce8a1
:art: Format - ran black
aybruhm Nov 7, 2023
e7a2283
Refactor - renamed MessagesParam to MessagesInput type to pydantic
aybruhm Nov 8, 2023
9129128
Refactor - renamed MessagesParam to MessagesInput
aybruhm Nov 8, 2023
c8bfb7b
Merge pull request #875 from bekossy/cypress-test/abTesting-evaluation
aakrem Nov 8, 2023
261ff8d
Update - modified override_schema method for MessagesInput
aybruhm Nov 8, 2023
ec22aa5
Update - set default values for MessagesInput data type
aybruhm Nov 8, 2023
741a292
:art: Format - ran black
aybruhm Nov 8, 2023
71a3e0a
Feat - created startup feature ideas experimental llm application
aybruhm Nov 8, 2023
035c8dc
Update - redesigned MessagesInput sdk
aybruhm Nov 8, 2023
09c2d0d
Update - dynamically populate default property for messages input sdk…
aybruhm Nov 8, 2023
2714e79
Update - modified experimental example application for chat sdk feature
aybruhm Nov 8, 2023
bddb8fe
:art: Format - ran black
aybruhm Nov 8, 2023
f97fd06
add health endpoint for backend
aakrem Nov 9, 2023
47c335b
fix
aakrem Nov 9, 2023
3616a51
format
aakrem Nov 9, 2023
98b48ee
Merge pull request #880 from Agenta-AI/health-check
mmabrouk Nov 9, 2023
eec817d
Update - modified frontend ci workflow and cypress config
aybruhm Nov 9, 2023
e247da4
imgrate babyname
mmabrouk Nov 10, 2023
dc17019
migrate json
mmabrouk Nov 10, 2023
775953e
migration
mmabrouk Nov 10, 2023
cdaf30f
updated the build behavior to always pull
mmabrouk Nov 10, 2023
1094c25
Merge pull request #884 from Agenta-AI/openai_migration
mmabrouk Nov 10, 2023
f54c379
removed self because unavailable in python < 3.11
mmabrouk Nov 10, 2023
a28ac9a
openai 1.0 compatible
mmabrouk Nov 10, 2023
6f1a5c8
format
mmabrouk Nov 10, 2023
2a846a1
format
mmabrouk Nov 10, 2023
78882dc
Merge pull request #876 from aybruhm/gh/sdk-message-data-type
mmabrouk Nov 10, 2023
8d109d7
cleanup
mmabrouk Nov 10, 2023
b544089
Merge pull request #886 from Agenta-AI/cleanup_after_serve
mmabrouk Nov 10, 2023
cabb557
adding tuto deploy mistral model
SamMethnani Nov 10, 2023
330091a
minor fix
bekossy Nov 11, 2023
b6da8d8
revert changes
bekossy Nov 12, 2023
aedc4e7
import resources using docker client only for the right environments
aakrem Nov 12, 2023
c4e8bc9
format
aakrem Nov 12, 2023
a1941f9
improve imports
aakrem Nov 12, 2023
bbf769e
format
aakrem Nov 12, 2023
cd96234
bump
mmabrouk Nov 12, 2023
e7ffa20
Merge pull request #889 from Agenta-AI/bump_
mmabrouk Nov 12, 2023
0fe48b3
Merge pull request #888 from Agenta-AI/ee-integration
aakrem Nov 12, 2023
5d308e3
update useEffect dependency array
bekossy Nov 13, 2023
25e0492
modifies timeouts
bekossy Nov 13, 2023
999d32d
cypress fix
bekossy Nov 13, 2023
0972969
minor fix
bekossy Nov 13, 2023
b29f8ef
test: no variants
bekossy Nov 13, 2023
bca5099
removes before all hook
bekossy Nov 13, 2023
c25a1a0
revert changes
bekossy Nov 13, 2023
6e1d566
minor fix
bekossy Nov 13, 2023
38116ae
minor changes in playground test
bekossy Nov 13, 2023
053fa1f
removes smoke-test
bekossy Nov 13, 2023
75bc297
bug fix
bekossy Nov 13, 2023
a36dc67
minor fix
bekossy Nov 13, 2023
10235fa
hot fix
bekossy Nov 13, 2023
a340c00
minor fix
bekossy Nov 13, 2023
d3c8250
hot fix
bekossy Nov 13, 2023
fe3c744
adds smoke test
bekossy Nov 13, 2023
8d58e26
chore: Use GitHub secret for OpenAI API key in Cypress test
bekossy Nov 13, 2023
15eb2c5
quick test
bekossy Nov 13, 2023
7230680
feat: run all tests
bekossy Nov 13, 2023
556447f
cleanup
bekossy Nov 13, 2023
00c0857
fix: api key test
bekossy Nov 13, 2023
98eeea8
set docker_id as optional
devgenix Nov 13, 2023
dd873f6
Refactor sync - renamed files from ee to cloud
aybruhm Nov 13, 2023
f6e1a06
Merge branch 'main' into gh/sync-ee-renaming-refactoring
aybruhm Nov 13, 2023
f601ef7
chore: Update GitHub Actions workflow
bekossy Nov 13, 2023
ee45608
chore: modifies yaml file
bekossy Nov 13, 2023
14aeb18
debugging in Cypress Test
bekossy Nov 13, 2023
a441165
revert changes
bekossy Nov 13, 2023
f6f1c60
cleanup
bekossy Nov 13, 2023
84bffd3
revert changes in frontend.yml file
bekossy Nov 13, 2023
a2e5345
chore: set env type in workflow
bekossy Nov 14, 2023
e27c5f1
Merge branch 'main' into pr/818
bekossy Nov 14, 2023
f283420
revert changes
bekossy Nov 14, 2023
c9aa710
minor changes
bekossy Nov 14, 2023
72e1ae2
test fix
bekossy Nov 14, 2023
e79d357
draft commit
devgenix Nov 14, 2023
3840976
fix: conditional to create app variant
bekossy Nov 14, 2023
48647a7
reset timeout values to default and removes unused imports
bekossy Nov 14, 2023
2256a67
using docker that does not use .env file for web
mmabrouk Nov 14, 2023
964c1df
updated docker compose
mmabrouk Nov 14, 2023
fabdad2
Merge pull request #895 from Agenta-AI/installation_agenta
mmabrouk Nov 14, 2023
2d29542
enable use of template zip uri
devgenix Nov 14, 2023
be8229a
self host docs
mmabrouk Nov 14, 2023
0e44265
up
mmabrouk Nov 14, 2023
2303415
Merge pull request #896 from Agenta-AI/installation_agenta
mmabrouk Nov 14, 2023
015c680
run all tests
bekossy Nov 14, 2023
187aeaa
Update - modified import path for container_manager service
aybruhm Nov 14, 2023
e7c4b18
Update host-remotely.mdx
mmabrouk Nov 14, 2023
9930be0
Merge pull request #897 from Agenta-AI/mmabrouk-patch-3
mmabrouk Nov 14, 2023
1c7b206
Update host-remotely.mdx
mmabrouk Nov 14, 2023
d789259
Merge pull request #898 from Agenta-AI/mmabrouk-patch-3
mmabrouk Nov 14, 2023
4c928b2
error fix
bekossy Nov 14, 2023
c1c8264
Update host-locally.mdx
mmabrouk Nov 14, 2023
1eb67f7
extend TemplateDB and ImageDB
devgenix Nov 14, 2023
2a3630d
enable use of s3 zip as template
devgenix Nov 14, 2023
dabf762
fix: workflow api key
bekossy Nov 14, 2023
46fa87a
hot fix
bekossy Nov 14, 2023
c900a69
define add_zip_template & extend create_image to support zip
devgenix Nov 15, 2023
6b4d1e7
set template fields as optional
devgenix Nov 15, 2023
77cfa7e
require template name to be unique
devgenix Nov 15, 2023
e48d2b6
format
devgenix Nov 15, 2023
9518ae8
define get_image_by_id
devgenix Nov 15, 2023
1d8f7a6
delete existing template if found
devgenix Nov 15, 2023
7851e50
format
devgenix Nov 15, 2023
81af30e
correct type
devgenix Nov 15, 2023
558dc8b
revert changes in yaml file
bekossy Nov 15, 2023
cc4b35c
compactibility with cli
devgenix Nov 15, 2023
651a0a8
format
devgenix Nov 15, 2023
a4fbdca
typo: ab testing description
bekossy Nov 15, 2023
41ac785
Merge branch 'main' into pr/818
bekossy Nov 15, 2023
72a26e7
set env variable
bekossy Nov 15, 2023
f6861d8
improve cli compactibility by using image type not env
devgenix Nov 15, 2023
89e41b8
resolve merge conflict
devgenix Nov 15, 2023
cdb55c6
modifies yaml files
bekossy Nov 15, 2023
4753ffa
add image type
devgenix Nov 15, 2023
812127c
format
devgenix Nov 15, 2023
235f965
fix import
devgenix Nov 15, 2023
ca26dca
removes comment
bekossy Nov 15, 2023
4af5384
rename to docker_id_or_template_url
devgenix Nov 15, 2023
76dc2e8
fix template override
devgenix Nov 15, 2023
e395a4a
Merge pull request #893 from Agenta-AI/gh/sync-ee-renaming-refactoring
aakrem Nov 15, 2023
ba0cef4
Merge branch 'main' into cloud_lambda
devgenix Nov 15, 2023
4ef8c86
test: api key
bekossy Nov 15, 2023
fd988a6
removes env
bekossy Nov 15, 2023
2835a1d
Update frontend-tests.yml
mmabrouk Nov 15, 2023
0b80975
Update frontend-tests.yml
mmabrouk Nov 15, 2023
b9f930d
update
mmabrouk Nov 15, 2023
882b77a
Merge pull request #887 from Agenta-AI/tutorial-mistral-model
mmabrouk Nov 15, 2023
98fb1ed
Update frontend-tests.yml
mmabrouk Nov 15, 2023
52f9bae
fix
mmabrouk Nov 15, 2023
8e81bca
format
aakrem Nov 16, 2023
dab9289
Update - resolve ee to cloud
aybruhm Nov 16, 2023
1e2cd5a
Update - make use of ee imports if feature_flag is ee
aybruhm Nov 16, 2023
54e99c1
Merge pull request #902 from aybruhm/gh/fix-ee-to-cloud
aakrem Nov 16, 2023
face29d
modifies timeout
bekossy Nov 16, 2023
a9ed6ac
bug fix
bekossy Nov 16, 2023
4b7d668
removes antd message
bekossy Nov 16, 2023
b7d7a23
format
devgenix Nov 16, 2023
73e214d
Merge branch 'Agenta-AI:main' into cloud_lambda
devgenix Nov 16, 2023
13beacb
modifies code evaluation test
bekossy Nov 16, 2023
77ca8e1
test fix
bekossy Nov 16, 2023
1ec636a
removes comments
bekossy Nov 16, 2023
699f313
docs: update README.md [skip ci]
allcontributors[bot] Nov 16, 2023
16222d5
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Nov 16, 2023
6d12827
Merge pull request #903 from Agenta-AI/all-contributors/add-Dhoni77
mmabrouk Nov 16, 2023
3e08cb3
regex evaluation test fix
bekossy Nov 16, 2023
de065e8
correct cloud & ee import
devgenix Nov 16, 2023
3ddd97a
Merge pull request #901 from Agenta-AI/cypress
mmabrouk Nov 16, 2023
dc95c10
Refactor - remove 'demo' ff from codebase
aybruhm Nov 17, 2023
3afa206
Merge branch 'Agenta-AI:main' into issue-#881/saving-in-playground-do…
bekossy Nov 17, 2023
b1b30a0
Update - fix race condition in update_variant_parameterss db manager
aybruhm Nov 17, 2023
2c0c939
Update - added await keyword to validate_image deployment manager
aybruhm Nov 17, 2023
6210874
Update - set block period to 0.3 seconds
aybruhm Nov 17, 2023
9e89633
Update - make comment in update_variant_parameters db function clear
aybruhm Nov 17, 2023
21db804
Update - remove busy-wait mechanism
aybruhm Nov 17, 2023
edfefcd
Merge pull request #892 from devgenix/cloud_lambda
mmabrouk Nov 17, 2023
c7807bc
Merge branch 'Agenta-AI:main' into issue-#881/saving-in-playground-do…
bekossy Nov 17, 2023
6304f4b
Merge pull request #907 from aybruhm/gh/resolve-race-condition-dbmanager
aybruhm Nov 17, 2023
b1c7629
Merge pull request #909 from Agenta-AI/907/resolve-race-condition-dbm…
mmabrouk Nov 17, 2023
e356875
Merge pull request #905 from aybruhm/gh/remove-demo-ff-from-codebase
aybruhm Nov 17, 2023
094eaa4
Merge pull request #911 from Agenta-AI/899/remove-demo-ff-from-codebase
mmabrouk Nov 17, 2023
976f0a9
Merge pull request #906 from bekossy/issue-#881/saving-in-playground-…
mmabrouk Nov 17, 2023
b0c0583
Update pyproject.toml
mmabrouk Nov 17, 2023
0eac33a
Merge pull request #912 from Agenta-AI/mmabrouk-patch-3
mmabrouk Nov 17, 2023
7380ba0
add missing deployment manager
aakrem Nov 19, 2023
22ad8e4
Merge pull request #913 from Agenta-AI/ee-deployment_manager
aakrem Nov 19, 2023
76c36f3
fix import
aakrem Nov 19, 2023
f67c818
Merge pull request #914 from Agenta-AI/fix-import
aakrem Nov 19, 2023
5b3fb42
Update - resolved ImportError
aybruhm Nov 21, 2023
9f9317b
Update - removed redis_url from config.toml
aybruhm Nov 21, 2023
2b901b1
Update - directly inject redis_url into docker environment
aybruhm Nov 21, 2023
bdbada5
Update - removed redis_url from config module and injected it directl…
aybruhm Nov 21, 2023
c7234eb
Update - removed redis_url from config
aybruhm Nov 21, 2023
bb914fd
Refactor - modified redis_connection to make use of container environ…
aybruhm Nov 21, 2023
26c6c0a
Update - handle explicit error + improve code-quality
aybruhm Nov 21, 2023
772ea44
Refactor - modified redis_connection doc-strings
aybruhm Nov 22, 2023
75eafa3
:art: Refactor - cleaned up trailing spaces
aybruhm Nov 22, 2023
161a030
Merge pull request #921 from Agenta-AI/gh/move-redis-url-configuration
aakrem Nov 22, 2023
b85d899
hide testset and eval results in posthog
bekossy Nov 23, 2023
35beff7
format fix
bekossy Nov 23, 2023
5e02c0d
format fix
bekossy Nov 26, 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
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,15 @@
"contributions": [
"doc"
]
},
{
"login": "Dhoni77",
"name": "Aldrin",
"avatar_url": "https://avatars.githubusercontent.com/u/53973174?v=4",
"profile": "https://github.com/Dhoni77",
"contributions": [
"test"
]
}
],
"contributorsPerLine": 7,
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/backend_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ jobs:
fi
sleep 5
done


- name: Run tests
run: docker exec agenta-backend-test pytest

- name: Stop Docker Compose
run: docker-compose down
run: docker-compose down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ jobs:
id: build-web-image
run: |
cd agenta-web
docker build --no-cache -t ghcr.io/${{ env.IMAGE_OWNER_NAME }}/${{ env.WEB_IMAGE_NAME }} -f prod.Dockerfile .
docker build --no-cache -t ghcr.io/${{ env.IMAGE_OWNER_NAME }}/${{ env.WEB_IMAGE_NAME }} -f prod.gh.Dockerfile .
docker push ghcr.io/${{ env.IMAGE_OWNER_NAME }}/${{ env.WEB_IMAGE_NAME }}

58 changes: 58 additions & 0 deletions .github/workflows/frontend-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Execute Frontend tests

on: [pull_request]
env:
OPENAI_API_KEY: ${{ secrets.NEXT_PUBLIC_OPENAI_API_KEY }}

jobs:
cypress:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set Environment Variables
run: |
echo "NEXT_PUBLIC_OPENAI_API_KEY=${{ secrets.NEXT_PUBLIC_OPENAI_API_KEY }}" >> $GITHUB_ENV

- name: Install Curl & Start Docker Compose
env:
NEXT_PUBLIC_OPENAI_API_KEY: ${{ secrets.NEXT_PUBLIC_OPENAI_API_KEY }}
run: |
sudo apt install curl -y
docker-compose -f "docker-compose.yml" up -d --build

- name: Restart Backend Service To Fetch Template(s)
run: docker container restart agenta_backend_1

- name: Wait for Backend Service
run: curl http://localhost/api/health/

- name: Know the Response of Organization & Container Templates
run: |
curl http://localhost/api/organizations/own/
curl http://localhost/api/containers/templates/

- name: Set Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Frontend Depedencies
env:
NEXT_PUBLIC_OPENAI_API_KEY: ${{ secrets.NEXT_PUBLIC_OPENAI_API_KEY }}
run: |
cd agenta-web/ && npm install

- name: Run Cypress
env:
NEXT_PUBLIC_OPENAI_API_KEY: ${{ secrets.NEXT_PUBLIC_OPENAI_API_KEY }}
run: cd agenta-web/ && npm run cypress:run

- name: Docker logs
if: always() #
run: docker ps -q | xargs -I {} docker logs {}

- name: Stop Docker Compose
run: docker-compose down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ self-host/*/*.tfstate.backup

todo.md
agenta-web/cypress/videos/
agenta-backend/agenta_backend/ee/**
agenta-backend/agenta_backend/cloud/**
agenta-web/src/ee/**
agenta-web/src/config/frontendConfig.ts
agenta-web/src/config/appInfo.ts
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ Check out our [Contributing Guide](https://docs.agenta.ai/contributing/getting-s
## Contributors ✨

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-32-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-33-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Expand Down Expand Up @@ -282,6 +282,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://venkataravitejagullapudi.github.io/"><img src="https://avatars.githubusercontent.com/u/70102577?v=4?s=100" width="100px;" alt="Raviteja"/><br /><sub><b>Raviteja</b></sub></a><br /><a href="https://github.com/Agenta-AI/agenta/commits?author=VenkataRavitejaGullapudi" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ArijitCloud"><img src="https://avatars.githubusercontent.com/u/81144422?v=4?s=100" width="100px;" alt="Arijit"/><br /><sub><b>Arijit</b></sub></a><br /><a href="https://github.com/Agenta-AI/agenta/commits?author=ArijitCloud" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Yachika9925"><img src="https://avatars.githubusercontent.com/u/147185379?v=4?s=100" width="100px;" alt="Yachika9925"/><br /><sub><b>Yachika9925</b></sub></a><br /><a href="https://github.com/Agenta-AI/agenta/commits?author=Yachika9925" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Dhoni77"><img src="https://avatars.githubusercontent.com/u/53973174?v=4?s=100" width="100px;" alt="Aldrin"/><br /><sub><b>Aldrin</b></sub></a><br /><a href="https://github.com/Agenta-AI/agenta/commits?author=Dhoni77" title="Tests">⚠️</a></td>
</tr>
</tbody>
</table>
Expand Down
4 changes: 2 additions & 2 deletions agenta-backend/agenta_backend/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os

if os.environ["FEATURE_FLAG"] in ["cloud", "ee", "demo"]:
import agenta_backend.ee.__init__
if os.environ["FEATURE_FLAG"] in ["cloud", "ee"]:
import agenta_backend.cloud.__init__
2 changes: 0 additions & 2 deletions agenta-backend/agenta_backend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@
os.environ["DOCKER_HUB_URL"] = toml_config["docker_hub_url"]
os.environ["DOCKER_HUB_REPO_OWNER"] = toml_config["docker_hub_repo_owner"]
os.environ["DOCKER_HUB_REPO_NAME"] = toml_config["docker_hub_repo_name"]
os.environ["REDIS_URL"] = toml_config["redis_url"]
os.environ["DATABASE_MODE"] = os.environ.get("DATABASE_MODE", "v2")


class Settings(BaseSettings):
docker_registry_url: str
registry: str
redis_url: str
database_url: str
docker_hub_url: str
docker_hub_repo_owner: str
Expand Down
1 change: 0 additions & 1 deletion agenta-backend/agenta_backend/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
docker_registry_url="registry:5001"
registry="agentaai"
database_url="sqlite:////db/deploy.db"
redis_url="redis://redis:6379/0"
docker_hub_url="https://hub.docker.com/v2/repositories/{}/{}"
docker_hub_repo_owner="agentaai"
docker_hub_repo_name="templates_v2"
12 changes: 7 additions & 5 deletions agenta-backend/agenta_backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
variants_router,
bases_router,
configs_router,
health_router,
)

if os.environ["FEATURE_FLAG"] in ["cloud", "ee"]:
from agenta_backend.ee.services import templates_manager
from agenta_backend.cloud.services import templates_manager
else:
from agenta_backend.services import templates_manager

Expand Down Expand Up @@ -56,16 +57,17 @@ async def lifespan(application: FastAPI, cache=True):
allow_headers=allow_headers,
)

if os.environ["FEATURE_FLAG"] not in ["cloud", "ee", "demo"]:
if os.environ["FEATURE_FLAG"] not in ["cloud", "ee"]:
from agenta_backend.services.auth_helper import authentication_middleware

app.middleware("http")(authentication_middleware)

if os.environ["FEATURE_FLAG"] in ["cloud", "ee", "demo"]:
import agenta_backend.ee.main as ee
if os.environ["FEATURE_FLAG"] in ["cloud", "ee"]:
import agenta_backend.cloud.main as cloud

app, allow_headers = ee.extend_main(app)
app, allow_headers = cloud.extend_main(app)

app.include_router(health_router.router, prefix="/health")
app.include_router(user_profile.router, prefix="/profile")
app.include_router(app_router.router, prefix="/apps")
app.include_router(variants_router.router, prefix="/variants")
Expand Down
10 changes: 6 additions & 4 deletions agenta-backend/agenta_backend/models/api/api_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class RestartAppContainer(BaseModel):


class Image(BaseModel):
type: Optional[str]
docker_id: str
tags: str
organization_id: Optional[str] = None
Expand All @@ -129,12 +130,13 @@ class ImageExtended(Image):

class TemplateImageInfo(BaseModel):
name: str
size: int
digest: str
size: Optional[int] = None
digest: Optional[str] = None
title: str
description: str
last_pushed: datetime
repo_name: str
last_pushed: Optional[datetime] = None
repo_name: Optional[str] = None
template_uri: Optional[str] = None


class Template(BaseModel):
Expand Down
9 changes: 5 additions & 4 deletions agenta-backend/agenta_backend/models/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,13 @@ def templates_db_to_pydantic(templates_db: List[TemplateDB]) -> List[Template]:
id=str(template.id),
image=TemplateImageInfo(
name=template.name,
size=template.size,
digest=template.digest,
size=template.size if template.size else None,
digest=template.digest if template.digest else None,
title=template.title,
description=template.description,
last_pushed=template.last_pushed,
repo_name=template.repo_name,
last_pushed=template.last_pushed if template.last_pushed else None,
repo_name=template.repo_name if template.repo_name else None,
template_uri=template.template_uri if template.template_uri else None,
),
)
for template in templates_db
Expand Down
20 changes: 12 additions & 8 deletions agenta-backend/agenta_backend/models/db_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ class Config:
class ImageDB(Model):
"""Defines the info needed to get an image and connect it to the app variant"""

docker_id: str = Field(index=True)
tags: str
type: Optional[str] = Field(default="image")
template_uri: Optional[str]
docker_id: Optional[str] = Field(index=True)
tags: Optional[str]
deletable: bool = Field(default=True)
user: UserDB = Reference(key_name="user")
organization: OrganizationDB = Reference(key_name="organization")
Expand Down Expand Up @@ -163,14 +165,16 @@ class Config:


class TemplateDB(Model):
tag_id: int
name: str # tag name of image
repo_name: str
type: Optional[str] = Field(default="image")
template_uri: Optional[str]
tag_id: Optional[int]
name: str = Field(unique=True) # tag name of image
repo_name: Optional[str]
title: str
description: str
size: int
digest: str # sha256 hash of image digest
last_pushed: datetime
size: Optional[int]
digest: Optional[str] # sha256 hash of image digest
last_pushed: Optional[datetime]

class Config:
collection = "templates"
Expand Down
Loading
Loading