Skip to content

Commit be05651

Browse files
authored
Release v4.0.2 into Main
2 parents 244307a + 2b82335 commit be05651

File tree

102 files changed

+6124
-15183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+6124
-15183
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
!postcss.config.js
44
!jest.config.js
55
*.d.ts
6+
dist/
67
node_modules/
78
__pycache__/
89
.ruff_cache/
910
.husky/
1011
.mypy_cache/
1112
.pytest_cache/
12-
1313
*.key
1414
*.pem
1515

CHANGELOG.md

+24
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
# v4.0.2
2+
## Enhancements
3+
- Revised base configuration to eliminate default RagRepository declaration. **Important:** Ensure config-custom.yaml contains an empty array declaration if no configurations are defined.
4+
- Implemented multi-instance LISA deployment support within single AWS accounts. Customers may now deploy more than one LISA environment into a single account.
5+
- Optimized data schema architecture to eliminate redundant reference patterns
6+
7+
## User Interface Improvements
8+
- Enhanced proxy configuration to support HTTP status code propagation for improved error handling
9+
- Introduced configurable markdown viewer toggle for non-standard model outputs
10+
- Implemented redesigned administrative configuration interface
11+
- Enhanced session management:
12+
- Removed UUID exposure from breadcrumb navigation
13+
- Transitioned to last-modified timestamp display from access time
14+
- Improved session loading indicators for enhanced user feedback
15+
- Integrated document library refresh functionality
16+
- Resolved critical Redux store corruption issue affecting state management overrides, reducing noticeable latency when fetching data in the UI
17+
18+
## Acknowledgements
19+
* @bedanley
20+
* @estohlmann
21+
* @dustins
22+
23+
**Full Changelog**: https://github.com/awslabs/LISA/compare/v4.0.1..v4.0.2
24+
125
# v4.0.1
226
## Bug Fixes
327
### Vector Store Management

Makefile

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ PROJECT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
1313
HEADLESS = false
1414
DOCKER_CMD ?= $(or $(CDK_DOCKER),docker)
1515

16-
# Arguments defined through command line or config.yaml
1716

1817
# PROFILE (optional argument)
1918
ifeq (${PROFILE},)
@@ -131,13 +130,13 @@ bootstrap:
131130
@printf "Bootstrapping: $(ACCOUNT_NUMBER) | $(REGION) | $(PARTITION)\n"
132131

133132
ifdef PROFILE
134-
@cdk bootstrap \
133+
@npx cdk bootstrap \
135134
--profile $(PROFILE) \
136135
aws://$(ACCOUNT_NUMBER)/$(REGION) \
137136
--partition $(PARTITION) \
138137
--cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess
139138
else
140-
@cdk bootstrap \
139+
@npx cdk bootstrap \
141140
aws://$(ACCOUNT_NUMBER)/$(REGION) \
142141
--partition $(PARTITION) \
143142
--cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess
@@ -232,6 +231,8 @@ cleanTypeScript:
232231
@find . -type d -name ".tscache" -exec rm -rf {} +
233232
@find . -type d -name ".jest_cache" -exec rm -rf {} +
234233
@find . -type d -name "node_modules" -exec rm -rf {} +
234+
@find . -type d -name "cdk.out" -exec rm -rf {} +
235+
@find . -type d -name "coverage" -exec rm -rf {} +
235236

236237

237238
## Delete CloudFormation outputs

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0.1
1+
4.0.2

bin/lisa.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
*/
1818

1919
// Main app
20-
import * as fs from 'fs';
21-
import * as path from 'path';
20+
import * as fs from 'node:fs';
21+
import * as path from 'node:path';
2222

2323
import * as cdk from 'aws-cdk-lib';
2424
import * as yaml from 'js-yaml';

cdk.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"app": "npx ts-node --prefer-ts-exts bin/lisa.ts",
2+
"app": "npm run deploy",
33
"requireApproval": "never",
44
"watch": {
55
"include": ["**"],

config-base.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
mountS3DebUrl: https://s3.amazonaws.com/mountpoint-s3-release/latest/x86_64/mount-s3.deb
22
stackSynthesizer: CliCredentialsStackSynthesizer
3-
ragRepositories:
4-
- repositoryId: pgvector-rag
5-
type: pgvector
6-
rdsConfig:
7-
username: postgres
83
ragFileProcessingConfig:
94
chunkSize: 512
105
chunkOverlap: 51

ecs_model_deployer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ FROM public.ecr.aws/lambda/nodejs:18
22

33
COPY ./dist/ ${LAMBDA_TASK_ROOT}
44
RUN chmod 777 -R ${LAMBDA_TASK_ROOT}
5-
CMD ["index.handler"]
5+
CMD ["ecs_model_deployer/src/index.handler"]

ecs_model_deployer/package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
2-
"name": "cdk_runner",
2+
"name": "ecs_model_deployer",
33
"version": "1.0.0",
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"build": "tsc && cp package.json ./dist && cp ./src/cdk*json ./dist/ && cp ../VERSION ./dist && cd ./dist && npm i --omit dev",
7+
"build": "tsc && npm run copy-deps && npm run install-run-deps",
8+
"copy-deps": "cp package.json ./dist && cp ./src/cdk*json ./dist/ && cp ../VERSION ./dist",
9+
"install-run-deps": "cd dist && npm i --omit dev --include-workspace-root",
810
"clean": "rm -rf ./dist/",
911
"test": "echo \"Error: no test specified\" && exit 1"
1012
},

ecs_model_deployer/src/index.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
limitations under the License.
1515
*/
1616

17-
import { spawnSync, spawn, ChildProcess } from 'child_process';
18-
import { readdirSync, symlinkSync, rmSync } from 'fs';
17+
import { ChildProcess, spawn, spawnSync } from 'node:child_process';
18+
19+
import { readdirSync, rmSync, symlinkSync } from 'node:fs';
1920

2021
/*
2122
cdk CLI always wants ./ to be writable in order to write cdk.context.json.

ecs_model_deployer/src/lib/app.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
*/
1616

1717
import { AddPermissionBoundary } from '@cdklabs/cdk-enterprise-iac';
18-
import { Aspects, App } from 'aws-cdk-lib';
18+
import { App, Aspects } from 'aws-cdk-lib';
1919
import { LisaModelStack, LisaModelStackProps } from './lisa_model_stack';
2020

21-
import { ConfigFile, ConfigSchema } from './ecs-schema';
21+
import { ConfigFile, ConfigSchema } from '../../../lib/schema';
22+
2223

2324
export const app = new App();
2425

ecs_model_deployer/src/lib/ecs-model.ts

+27-28
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,16 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15-
*/
15+
*/
1616

17-
// ECS Model Construct.
1817
import { ISecurityGroup, IVpc, SubnetSelection } from 'aws-cdk-lib/aws-ec2';
1918
import { AmiHardwareType } from 'aws-cdk-lib/aws-ecs';
2019
import { Bucket } from 'aws-cdk-lib/aws-s3';
2120
import { Construct } from 'constructs';
2221

2322
import { ECSCluster } from './ecsCluster';
2423
import { getModelIdentifier } from './utils';
25-
import { BaseProps, Config, Ec2Metadata, EcsSourceType, ModelConfig } from './ecs-schema';
24+
import { BaseProps, Config, Ec2Metadata, EcsClusterConfig, EcsSourceType } from '../../../lib/schema';
2625
import { StringParameter } from 'aws-cdk-lib/aws-ssm';
2726

2827
// This is the amount of memory to buffer (or subtract off) from the total instance memory, if we don't include this,
@@ -33,11 +32,11 @@ const CONTAINER_MEMORY_BUFFER = 1024 * 5;
3332
* Properties for the EcsModel Construct.
3433
*
3534
* @property {IVpc} vpc - The virtual private cloud (VPC).
36-
* @property {SecurityGroup} securityGroup - The security group to use for the ECS cluster
37-
* @property {ModelConfig} modelConfig - The model configuration.
35+
* @property {ISecurityGroup} securityGroup - The security group to use for the ECS cluster
36+
* @property {EcsClusterConfig} modelConfig - The model configuration.
3837
*/
3938
type ECSModelProps = {
40-
modelConfig: ModelConfig;
39+
modelConfig: EcsClusterConfig;
4140
securityGroup: ISecurityGroup;
4241
vpc: IVpc;
4342
subnetSelection?: SubnetSelection;
@@ -51,10 +50,10 @@ export class EcsModel extends Construct {
5150
public readonly endpointUrl: string;
5251

5352
/**
54-
* @param {Construct} scope - The parent or owner of the construct.
55-
* @param {string} id - The unique identifier for the construct within its scope.
56-
* @param {ECSModelProps} props - The properties of the construct.
57-
*/
53+
* @param {Construct} scope - The parent or owner of the construct.
54+
* @param {string} id - The unique identifier for the construct within its scope.
55+
* @param {ECSModelProps} props - The properties of the construct.
56+
*/
5857
constructor (scope: Construct, id: string, props: ECSModelProps) {
5958
super(scope, id);
6059
const { config, modelConfig, securityGroup, vpc, subnetSelection } = props;
@@ -87,15 +86,15 @@ export class EcsModel extends Construct {
8786
}
8887

8988
/**
90-
* Generates environment variables for Docker at runtime based on the configuration. The environment variables
91-
* include the local model path, S3 bucket for models, model name, and other variables depending on the model type.
92-
*
93-
* @param {Config} config - The application configuration.
94-
* @param {ModelConfig} modelConfig - Configuration for the specific model.
95-
* @returns {Object} An object containing the environment variables. The object has string keys and values, which
96-
* represent the environment variables for Docker at runtime.
97-
*/
98-
private getEnvironmentVariables (config: Config, modelConfig: ModelConfig): { [key: string]: string } {
89+
* Generates environment variables for Docker at runtime based on the configuration. The environment variables
90+
* include the local model path, S3 bucket for models, model name, and other variables depending on the model type.
91+
*
92+
* @param {Config} config - The application configuration.
93+
* @param {EcsClusterConfig} modelConfig - Configuration for the specific model.
94+
* @returns {Object} An object containing the environment variables. The object has string keys and values, which
95+
* represent the environment variables for Docker at runtime.
96+
*/
97+
private getEnvironmentVariables (config: Config, modelConfig: EcsClusterConfig): { [key: string]: string } {
9998
const environment: { [key: string]: string } = {
10099
LOCAL_MODEL_PATH: `${config.nvmeContainerMountPath}/model`,
101100
S3_BUCKET_MODELS: config.s3BucketModels,
@@ -127,15 +126,15 @@ export class EcsModel extends Construct {
127126
}
128127

129128
/**
130-
* Generates build arguments for the Docker build based on the configuration. The build arguments include the base
131-
* image, and depending on the model type, either the local code path or the S3 deb URL.
132-
*
133-
* @param {Config} config - The application configuration.
134-
* @param {ModelConfig} modelConfig - Configuration for the specific model.
135-
* @returns {Object} An object containing the build arguments. The object has string keys and values, which represent
136-
* the arguments for the Docker build.
137-
*/
138-
private getBuildArguments (config: Config, modelConfig: ModelConfig): { [key: string]: string } | undefined {
129+
* Generates build arguments for the Docker build based on the configuration. The build arguments include the base
130+
* image, and depending on the model type, either the local code path or the S3 deb URL.
131+
*
132+
* @param {Config} config - The application configuration.
133+
* @param {EcsClusterConfig} modelConfig - Configuration for the specific model.
134+
* @returns {Object} An object containing the build arguments. The object has string keys and values, which represent
135+
* the arguments for the Docker build.
136+
*/
137+
private getBuildArguments (config: Config, modelConfig: EcsClusterConfig): { [key: string]: string } | undefined {
139138
if (modelConfig.containerConfig.image.type !== EcsSourceType.ASSET) {
140139
return undefined;
141140
}

0 commit comments

Comments
 (0)