Skip to content

Commit 915aa08

Browse files
authored
Merge branch 'main' into 271-opensearch-containers
2 parents 6b470eb + e13a785 commit 915aa08

22 files changed

Lines changed: 137 additions & 91 deletions

.githooks/install.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
ln -s ${PWD}/.githooks/update-env-hook.sh ${PWD}/.git/hooks/post-commit
4+
ln -s ${PWD}/.githooks/update-env-hook.sh ${PWD}/.git/hooks/post-checkout
5+
ln -s ${PWD}/.githooks/update-env-hook.sh ${PWD}/.git/hooks/post-merge
6+
ln -s ${PWD}/.githooks/update-env-hook.sh ${PWD}/.git/hooks/post-rewrite

.githooks/update-env-hook.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
repo_root=$(git rev-parse --show-toplevel)
4+
exec "$repo_root/update_env.sh"

.github/workflows/anms-core.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
uses: actions/checkout@v6
1515
with:
1616
submodules: recursive
17+
- name: Set ENV
18+
run: ./update_env.sh
1719
- name: Set up Python
1820
uses: actions/setup-python@v6
1921
with:
@@ -42,6 +44,8 @@ jobs:
4244
uses: actions/checkout@v6
4345
with:
4446
submodules: recursive
47+
- name: Set ENV
48+
run: ./update_env.sh
4549
- name: Build ANMS
4650
run: ${DOCKER_CMD} compose ${ANMS_COMPOSE_OPTS} build
4751
- name: Build TEST

.github/workflows/aricodec.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
uses: actions/checkout@v6
1515
with:
1616
submodules: recursive
17+
- name: Set ENV
18+
run: ./update_env.sh
1719
- name: Set up Python
1820
uses: actions/setup-python@v6
1921
with:

.github/workflows/build-test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
run: |
4343
DOCKER_IMAGE_TAG=${{ github.sha }}
4444
echo "DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG}" >> $GITHUB_ENV
45+
- name: Set ENV file
46+
run: ./update_env.sh
4547
- name: Build ANMS
4648
run: ${DOCKER_CMD} compose ${ANMS_COMPOSE_OPTS} build
4749
- name: Build Agents

.github/workflows/publish_images.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ jobs:
4343
else
4444
echo "DOCKER_IMAGE_TAG=latest" >> $GITHUB_ENV
4545
fi
46-
46+
- name: Set ENV
47+
run: ./update_env.sh
4748
- name: Build and push base images via compose
4849
run: |
4950
docker compose build --push

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
.env
22
*~
33
.idea/
44
*~

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ To start the system in the future, use `podman compose -f testenv-compose.yml up
121121
## Manual Startup
122122
Choose the appropriate docker, podman, or podman-compose commands in the directions below as appropriate for your system.
123123

124+
- Run `./update_env.sh` to copy `example.env` to `.env` and populate BUILD_VERSION env variables.
125+
- It is also recommended to run `./githooks/install.sh` to install git hooks to automatically run this on any git commit/checkout/pull operation when updating in the future.
124126
- Edit `.env` file as appropriate.
125127
- Select appropriate profile(s) as desired.
126128
- Core ANMS services are always started.

anms-core/anms/routes/adms/adm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ async def load_default_adm():
135135
return response
136136

137137
@router.post("/", status_code=status.HTTP_201_CREATED,
138-
responses={400: {"model": RequestError}, 405: {"model": UpdateAdmError}, 500: {"model": RequestError}})
138+
responses={200: {}, 400: {"model": RequestError}, 405: {"model": UpdateAdmError}, 500: {"model": RequestError}})
139139
async def update_adm(file: UploadFile, request: Request):
140140
response = None
141141
status_code = status.HTTP_201_CREATED

anms-core/anms/routes/mappings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class RoutesMapper(str, Enum):
3434
base_prefix = posixpath.join("/", config['SERVER_CHROOT']).rstrip("/") + "/"
3535

3636
# Route Paths
37-
hello_api_prefix = posixpath.join(base_prefix, "hello") + "/"
37+
version_api_prefix = posixpath.join(base_prefix, "version") + "/"
3838
agents_api_prefix = posixpath.join(base_prefix, "agents") + "/"
3939
parameter_api_prefix = posixpath.join(base_prefix, "agents", "parameter") +"/"
4040

0 commit comments

Comments
 (0)