Skip to content

Commit

Permalink
Update template.yaml and make build to support build-time-only re…
Browse files Browse the repository at this point in the history
…sources

Update dependencies and test invocation to get rid of some deprecation warnings
  • Loading branch information
mbklein committed Apr 26, 2024
1 parent 5a1e6c0 commit 68e3282
Show file tree
Hide file tree
Showing 11 changed files with 7,803 additions and 14,820 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
aws-region: us-east-1
- run: ln -s .tfvars/dc-api/samconfig.toml .
- run: ln -s .tfvars/dc-api/$CONFIG_ENV.parameters .
- run: sam build
- run: make build
- run: |
sam deploy \
--no-confirm-changeset \
Expand Down
11 changes: 5 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,9 @@ $RECYCLE.BIN/
.venv

.vscode
/samconfig.toml
/samconfig.yaml
/samconfig.*.yaml
/env.json
/env.*.json
/*.parameters
samconfig.*
!dev/samconfig.toml
env.json
env.*.json
*.parameters
/schemas
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ help:
echo "make cover-node | run node tests with coverage"
echo "make cover-python | run python tests with coverage"
.aws-sam/build.toml: ./template.yaml node/package-lock.json node/src/package-lock.json chat/dependencies/requirements.txt chat/src/requirements.txt
sed -Ei.orig 's/^(\s+)#\*\s/\1/' template.yaml
sam build --cached --parallel
mv template.yaml.orig template.yaml
deps-node:
cd node && npm ci
cover-node:
Expand All @@ -43,7 +45,7 @@ style-python: deps-python
style-python-fix: deps-python
cd chat && ruff check --fix .
test-python: deps-python
cd chat && export SKIP_WEAVIATE_SETUP=True && PYTHONPATH=src:test && python -m unittest discover -v
cd chat && SKIP_WEAVIATE_SETUP=True PYTHONPATH=src:test python -m unittest discover -v
python-version:
cd chat && python --version
build: .aws-sam/build.toml
Expand Down
9 changes: 5 additions & 4 deletions layers/api_dependencies/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
"license": "Apache-2.0",
"dependencies": {
"@aws-crypto/sha256-browser": "^2.0.1",
"@aws-sdk/credential-provider-node": "^3.142.0",
"@aws-sdk/node-http-handler": "^3.127.0",
"@aws-sdk/protocol-http": "^3.127.0",
"@aws-sdk/signature-v4": "^3.130.0",
"@aws-sdk/client-sfn": "^3.563.0",
"@aws-sdk/credential-provider-node": "^3.563.0",
"@smithy/node-http-handler": "^2.5.0",
"@smithy/protocol-http": "^3.3.0",
"@smithy/signature-v4": "^2.3.0",
"@honeybadger-io/js": "^4.9.3",
"axios": ">=0.21.1",
"cookie": "^0.5.0",
Expand Down
15,177 changes: 5,893 additions & 9,284 deletions node/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"nock": "^13.2.9",
"nyc": "^15.1.0",
"prettier": "^2.7.1",
"sinon": "^15.0.1"
"sinon": "^16.1.1"
},
"eslintConfig": {
"extends": "eslint:recommended",
Expand Down
2 changes: 1 addition & 1 deletion node/src/api/opensearch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { HttpRequest } = require("@aws-sdk/protocol-http");
const { HttpRequest } = require("@smithy/protocol-http");
const { awsFetch } = require("../aws/fetch");
const { openSearchEndpoint, prefix } = require("../environment");
const Honeybadger = require("../honeybadger-setup");
Expand Down
4 changes: 2 additions & 2 deletions node/src/aws/fetch.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { defaultProvider } = require("@aws-sdk/credential-provider-node");
const { SignatureV4 } = require("@aws-sdk/signature-v4");
const { NodeHttpHandler } = require("@aws-sdk/node-http-handler");
const { SignatureV4 } = require("@smithy/signature-v4");
const { NodeHttpHandler } = require("@smithy/node-http-handler");
const { Sha256 } = require("@aws-crypto/sha256-browser");
const region = require("../environment").region();

Expand Down
Loading

0 comments on commit 68e3282

Please sign in to comment.