Skip to content

Commit 5750298

Browse files
feat: add agntcy dir integration test (#5)
* feat: agntcy dir test * chore: add github.com:agntcy/dir/e2e/testdata/ to integrations/agntcy-dir/examples/dir as a submodule --------- Signed-off-by: Peter Balogh <p.balogh.sa@gmail.com> Signed-off-by: Luca Muscariello <lumuscar@cisco.com> Co-authored-by: Luca Muscariello <lumuscar@cisco.com>
1 parent 09bd7e5 commit 5750298

File tree

15 files changed

+464
-75
lines changed

15 files changed

+464
-75
lines changed

.github/workflows/test-integrations.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,55 @@ jobs:
7676
cd integrations
7777
task test:gateway
7878
shell: bash
79+
80+
run-tests-directory:
81+
runs-on: ubuntu-latest
82+
83+
permissions:
84+
contents: 'read'
85+
id-token: 'write'
86+
packages: 'read'
87+
attestations: 'read'
88+
89+
steps:
90+
- name: Checkout code
91+
uses: actions/checkout@v4
92+
with:
93+
fetch-depth: 0
94+
submodules: 'true'
95+
96+
- name: Login to GitHub Container Registry
97+
uses: docker/login-action@v3
98+
with:
99+
registry: ghcr.io
100+
username: ${{ github.actor }}
101+
password: ${{ secrets.GITHUB_TOKEN }}
102+
103+
- name: Setup Environment
104+
uses: ./.github/actions/setup-env
105+
with:
106+
python: true
107+
go: false
108+
109+
- name: Setup K8S Tools
110+
uses: ./.github/actions/setup-k8s
111+
with:
112+
kind-version: ${{ inputs.kind-version }}
113+
114+
- name: Create kind cluster
115+
run: |
116+
cd integrations
117+
task kind:create
118+
shell: bash
119+
120+
- name: Deploy agntcy dir
121+
run: |
122+
cd integrations
123+
task test:env:directory:deploy
124+
shell: bash
125+
126+
- name: Run agent build tests
127+
run: |
128+
cd integrations
129+
task test:directory
130+
shell: bash

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "integrations/agntcy-dir/examples/dir"]
2+
path = integrations/agntcy-dir/examples/dir
3+
url = git@github.com:agntcy/dir.git

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The CSIT project team welcomes security reports and is committed to
44
providing prompt attention to security issues. Security issues should be
5-
reported privately via [security@agntcy.ai](mailto:security@agntcy.ai).
5+
reported privately via [security@agntcy.org](mailto:security@agntcy.org).
66
Security issues should not be reported via the public GitHub Issue tracker.
77

88

@@ -16,7 +16,7 @@ users of CSIT, and maintainers of upstream dependencies if applicable.
1616

1717
Downstream project maintainers and CSIT users can request participation in
1818
coordination of applicable security issues by sending your contact email address,
19-
GitHub username(s) and any other salient information to [security@agntcy.ai](mailto:security@agntcy.ai).
19+
GitHub username(s) and any other salient information to [security@agntcy.org](mailto:security@agntcy.org).
2020
Participation in security issue coordination processes is at the discretion of the CSIT team.
2121

2222
## Security advisories

integrations/Taskfile.yaml

Lines changed: 71 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ vars:
1111

1212
## Image config
1313
IMAGE_REPO: '{{ .IMAGE_REPO | default "ghcr.io/agntcy" }}'
14-
GATEWAY_IMAGE_TAG: '{{ .GATEWAY_IMAGE_TAG | default "0.1.0-rc0-10-g794c425" }}'
14+
GATEWAY_IMAGE_TAG: '{{ .GATEWAY_IMAGE_TAG | default "0.3.0" }}'
15+
DIRECTORY_IMAGE_TAG: '{{ .DIRECTORY_IMAGE_TAG | default "v0.1.2" }}'
1516

1617
IMAGE_BAKE_OPTS: '{{ .IMAGE_BAKE_OPTS | default "--set *.platform=linux/arm64" }}'
1718
TEST_APP_TAG: '{{ .TEST_APP_TAG | default "v0.0.1" }}'
@@ -38,14 +39,33 @@ tasks:
3839
cmds:
3940
- kind delete cluster --name {{.KIND_CLUSTER_NAME}}
4041

41-
kind:load-images:
42+
kind:load-images:directory:
43+
desc: Pull and load images to kind
44+
cmds:
45+
# pull images
46+
- docker pull {{.IMAGE_REPO}}/dir-apiserver:{{.DIRECTORY_IMAGE_TAG}}
47+
# load images
48+
- kind load docker-image {{.IMAGE_REPO}}/dir-apiserver:{{.DIRECTORY_IMAGE_TAG}} --name {{.KIND_CLUSTER_NAME}}
49+
50+
kind:load-images:gateway:
4251
desc: Pull and load images to kind
4352
cmds:
4453
# pull images
4554
- docker pull {{.IMAGE_REPO}}/agp/gw:{{.GATEWAY_IMAGE_TAG}}
4655
# load images
4756
- kind load docker-image {{.IMAGE_REPO}}/agp/gw:{{.GATEWAY_IMAGE_TAG}} --name {{.KIND_CLUSTER_NAME}}
4857

58+
k8s:port-forward:setup:directory:
59+
internal: true
60+
cmds:
61+
- kubectl port-forward svc/agntcy-dir-apiserver -n {{ .HELM_NAMESPACE }} 8888 &
62+
- sleep 1
63+
64+
k8s:port-forward:teardown:directory:
65+
internal: true
66+
cmds:
67+
- kill -9 $(ps aux | grep port-forward | grep agntcy-dir-apiserver | awk '{print $2}') || true
68+
4969
k8s:port-forward:setup:gateway:
5070
internal: true
5171
cmds:
@@ -57,10 +77,35 @@ tasks:
5777
cmds:
5878
- kill -9 $(ps aux | grep port-forward | grep agntcy-agp | awk '{print $2}') || true
5979

80+
test:env:directory:deploy:
81+
desc: Deploy Agntcy directory test env
82+
deps:
83+
- kind:load-images:directory
84+
vars:
85+
REGCRED_CREATE: '{{ .REGCRED_CREATE | default "false" }}'
86+
cmds:
87+
- |
88+
helm dependency build ./agntcy-dir/components/helm
89+
helm upgrade agntcy-dir \
90+
./agntcy-dir/components/helm \
91+
--set dir.apiserver.image.tag="{{ .DIRECTORY_IMAGE_TAG }}" \
92+
--set regcred.create="{{ .REGCRED_CREATE }}" \
93+
--namespace {{ .HELM_NAMESPACE }} \
94+
--create-namespace \
95+
--install \
96+
--wait \
97+
--wait-for-jobs \
98+
--timeout "15m"
99+
100+
test:env:directory:cleanup:
101+
desc: Remove agntcy directory test env
102+
cmds:
103+
- helm delete --namespace {{ .HELM_NAMESPACE }} agntcy-dir
104+
60105
test:env:gateway:deploy:
61-
desc: Deploy agent gateway test env
106+
desc: Deploy agntcy gateway test env
62107
deps:
63-
- kind:load-images
108+
- kind:load-images:gateway
64109
cmds:
65110
- |
66111
helm dependency build ./agntcy-agp/components/helm
@@ -85,6 +130,28 @@ tasks:
85130
cmds:
86131
- IMAGE_TAG={{ .TEST_APP_TAG }} docker buildx bake {{ .IMAGE_BAKE_OPTS }} --load
87132

133+
test:directory:
134+
desc: Directory test
135+
cmds:
136+
- task: k8s:port-forward:setup:directory
137+
- defer: { task: k8s:port-forward:teardown:directory }
138+
- defer: { task: manifests:cleanup }
139+
- IMAGE_REPO={{.IMAGE_REPO}} DIRECTORY_IMAGE_TAG={{.DIRECTORY_IMAGE_TAG}} go test ./agntcy-dir/tests -v -failfast -test.v -test.paniconexit0 -ginkgo.timeout 30m -timeout 30m -ginkgo.v
140+
141+
test:directory:compiler:
142+
desc: Agntcy compiler test
143+
cmds:
144+
- docker pull {{.IMAGE_REPO}}/dir-ctl:{{.DIRECTORY_IMAGE_TAG}}
145+
- IMAGE_REPO={{.IMAGE_REPO}} DIRECTORY_IMAGE_TAG={{.DIRECTORY_IMAGE_TAG}} go test ./agntcy-dir/tests -v -failfast -test.v -test.paniconexit0 -ginkgo.timeout 10m -timeout 10m -ginkgo.v -ginkgo.focus "agent compilation"
146+
147+
test:directory:push:
148+
desc: Directory agent push test
149+
cmds:
150+
- task: k8s:port-forward:setup:directory
151+
- defer: { task: k8s:port-forward:teardown:directory }
152+
- defer: { task: manifests:cleanup }
153+
- IMAGE_REPO={{.IMAGE_REPO}} DIRECTORY_IMAGE_TAG={{.DIRECTORY_IMAGE_TAG}} go test ./agntcy-dir/tests -v -failfast -test.v -test.paniconexit0 -ginkgo.timeout 30m -timeout 30m -ginkgo.v -ginkgo.focus "agent push and pull"
154+
88155
test:autogen-agent:run:
89156
internal: true
90157
cmds:

integrations/agntcy-agp/components/helm/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ version: 0.1.0
2424
# incremented each time you make changes to the application. Versions are not expected to
2525
# follow Semantic Versioning. They should reflect the version the application is using.
2626
# It is recommended to use it with quotes.
27-
appVersion: "1.16.0"
27+
appVersion: "0.1.0"
2828

2929
dependencies:
3030
- name: agp
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
apiVersion: v2
5+
name: agntcy-dir
6+
description: A Helm chart for Kubernetes
7+
8+
# A chart can be either an 'application' or a 'library' chart.
9+
#
10+
# Application charts are a collection of templates that can be packaged into versioned archives
11+
# to be deployed.
12+
#
13+
# Library charts provide useful utilities or functions for the chart developer. They're included as
14+
# a dependency of application charts to inject those utilities and functions into the rendering
15+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
16+
type: application
17+
18+
# This is the chart version. This version number should be incremented each time you make changes
19+
# to the chart and its templates, including the app version.
20+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
21+
version: 0.1.0
22+
23+
# This is the version number of the application being deployed. This version number should be
24+
# incremented each time you make changes to the application. Versions are not expected to
25+
# follow Semantic Versioning. They should reflect the version the application is using.
26+
# It is recommended to use it with quotes.
27+
appVersion: "0.1.0"
28+
29+
dependencies:
30+
- name: dir
31+
version: "v0.1.2"
32+
repository: oci://ghcr.io/agntcy/dir/helm-charts
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
regcred:
5+
create: false
6+
7+
dir:
8+
apiserver:
9+
config:
10+
server_port: 8888
11+
health_port: 8889
12+
provider: "oci"
13+
oci_registry_address: "agntcy-dir-zot:5000"
Submodule dir added at 616b5ce
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"name": "marketing-strategy",
3+
"version": "v1.0.0",
4+
"authors": [
5+
"author1",
6+
"author2"
7+
],
8+
"created_at": {
9+
"seconds": 1735689600
10+
},
11+
"locators": [
12+
{
13+
"type": 3,
14+
"source": {
15+
"url": "http://ghcr.io/agntcy/marketing-strategy"
16+
}
17+
}
18+
],
19+
"extensions": [
20+
{
21+
"name": "runtime",
22+
"version": "v0.0.0",
23+
"specs": {
24+
"language": "python",
25+
"sbom": {
26+
"name": "marketing-strategy",
27+
"packages": [
28+
{
29+
"name": "crewai",
30+
"version": "0.55.2"
31+
},
32+
{
33+
"name": "langchain",
34+
"version": "0.2.16"
35+
},
36+
{
37+
"name": "langchain-ollama",
38+
"version": "0.1.3"
39+
},
40+
{
41+
"name": "langchain-openai",
42+
"version": "0.1.25"
43+
},
44+
{
45+
"name": "langgraph",
46+
"version": "0.2.34"
47+
}
48+
]
49+
},
50+
"version": "\u003e=3.11,\u003c3.13"
51+
}
52+
},
53+
{
54+
"name": "category",
55+
"version": "v0.0.0",
56+
"specs": {
57+
"categories": []
58+
}
59+
},
60+
{
61+
"name": "crewai",
62+
"version": "v0.0.0",
63+
"specs": {
64+
"agent.chief_marketing_strategist.backstory": "You are the Chief Marketing Strategist at a leading digital marketing agency, known for crafting bespoke strategies that drive success.\n",
65+
"agent.chief_marketing_strategist.goal": "Synthesize amazing insights from product analysis to formulate incredible marketing strategies.\n",
66+
"agent.chief_marketing_strategist.role": "Chief Marketing Strategist\n",
67+
"agent.creative_content_creator.backstory": "As a Creative Content Creator at a top-tier digital marketing agency, you excel in crafting narratives that resonate with audiences. Your expertise lies in turning marketing strategies into engaging stories and visual content that capture attention and inspire action.\n",
68+
"agent.creative_content_creator.goal": "Develop compelling and innovative content for social media campaigns, with a focus on creating high-impact ad copies.\n",
69+
"agent.creative_content_creator.role": "Creative Content Creator\n",
70+
"agent.lead_market_analyst.backstory": "As the Lead Market Analyst at a premier digital marketing firm, you specialize in dissecting online business landscapes.\n",
71+
"agent.lead_market_analyst.goal": "Conduct amazing analysis of the products and competitors, providing in-depth insights to guide marketing strategies.\n",
72+
"agent.lead_market_analyst.role": "Lead Market Analyst\n",
73+
"inputs.campaign_idea_task": "string",
74+
"inputs.copy_creation_task": "string",
75+
"inputs.marketing_strategy_task": "string",
76+
"inputs.project_understanding_task": "string",
77+
"inputs.research_task": "string",
78+
"task.campaign_idea_task.description": "Develop creative marketing campaign ideas for {project_description}. Ensure the ideas are innovative, engaging, and aligned with the overall marketing strategy.\n",
79+
"task.campaign_idea_task.expected_output": "A list of 5 campaign ideas, each with a brief description and expected impact.\n",
80+
"task.copy_creation_task.description": "Create marketing copies based on the approved campaign ideas for {project_description}. Ensure the copies are compelling, clear, and tailored to the target audience.\n",
81+
"task.copy_creation_task.expected_output": "Marketing copies for each campaign idea.\n",
82+
"task.marketing_strategy_task.description": "Formulate a comprehensive marketing strategy for the project {project_description} of the customer {customer_domain}. Use the insights from the research task and the project understanding task to create a high-quality strategy.\n",
83+
"task.marketing_strategy_task.expected_output": "A detailed marketing strategy document that outlines the goals, target audience, key messages, and proposed tactics, make sure to have name, tatics, channels and KPIs",
84+
"task.project_understanding_task.description": "Understand the project details and the target audience for {project_description}. Review any provided materials and gather additional information as needed.\n",
85+
"task.project_understanding_task.expected_output": "A detailed summary of the project and a profile of the target audience.\n",
86+
"task.research_task.description": "Conduct a thorough research about the customer and competitors in the context of {customer_domain}. Make sure you find any interesting and relevant information given the current year is 2024. We are working with them on the following project: {project_description}.\n",
87+
"task.research_task.expected_output": "A complete report on the customer and their customers and competitors, including their demographics, preferences, market positioning and audience engagement.\n"
88+
}
89+
}
90+
]
91+
}

integrations/agntcy-dir/manifests/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)