Skip to content

Commit 7a313d0

Browse files
authored
Merge pull request #52 from open-mpic/birgelee-no-sh
version bump and misc improvements
2 parents 2664fae + 2e15d71 commit 7a313d0

File tree

5 files changed

+18
-15
lines changed

5 files changed

+18
-15
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ For convenience:
2626
* `hatch run lambda:prepare` will run steps 2-5 in a single command.
2727
* `hatch run lambda:deploy-no-dnssec` or `hatch run lambda:deploy-dnssec` will clean the environment and then run steps 2-6 with DNSSEC validation enabled or disabled respectively.
2828

29+
Note: the above commands do not run `tofu init`. During first time environment setup this will need to be run in the `open-tofu` dir for these commands to work.
30+
2931
## Testing
3032
The following is an example of a test API call that uses bash command substitution to fill in the proper values for the API URL and the API key.
3133

@@ -93,7 +95,7 @@ If you would like to take the API down, run `tofu destroy` in the open-tofu dire
9395

9496
After `tofu destroy`, `./clean.sh` in the root directory also clears generated/zip files.
9597

96-
98+
`hatch run lambda:destroy-tf` can be run as an alternative to `tofu destroy`
9799

98100
# Remaining tasks
99101

open-tofu/.terraform.lock.hcl

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ classifiers = [
2727
]
2828
dependencies = [
2929
# "open-mpic-core @ git+https://github.com/open-mpic/open-mpic-core-python.git@birgelee-key-auth-hash",
30-
"pyyaml==6.0.1",
30+
"pyyaml==6.0.2",
3131
"requests>=2.32.3",
32-
"dnspython==2.6.1",
33-
"pydantic==2.8.2",
34-
"aiohttp==3.11.11",
35-
"aws-lambda-powertools[parser]==3.2.0",
36-
"open-mpic-core==5.2.0",
32+
"dnspython==2.7.0",
33+
"pydantic==2.10.6",
34+
"aiohttp==3.11.13",
35+
"aws-lambda-powertools[parser]==3.8.0",
36+
"open-mpic-core==5.5.1",
3737
"aioboto3~=13.3.0",
3838
"black==24.8.0",
3939
]
@@ -56,7 +56,7 @@ Source = "https://github.com/open-mpic/aws-lambda-python"
5656
#virtual = ".hatch"
5757

5858
[tool.api]
59-
spec_version = "3.1.0"
59+
spec_version = "3.3.0"
6060
spec_repository = "https://github.com/open-mpic/open-mpic-specification"
6161

6262
[tool.hatch]
@@ -87,10 +87,10 @@ PIP_ONLY_BINARY = ":all:"
8787
#PIP_TARGET = "layer/create_layer_virtualenv2/lib/python3.11/site-packages" # does not work... bug in pip 24.2?
8888

8989
[tool.hatch.envs.lambda.scripts]
90-
layer-install = "pip install . --platform manylinux2014_aarch64 --only-binary=:all: --target layer/create_layer_virtualenv/lib/python3.11/site-packages"
91-
layer-package = "sh ./package-layer.sh"
90+
layer-install = "pip install . --upgrade --platform manylinux2014_aarch64 --only-binary=:all: --target layer/create_layer_virtualenv/lib/python3.11/site-packages"
91+
layer-package = "./package-layer.sh"
9292
configure-tf = "python configure.py"
93-
zip-lambdas = "sh ./zip-all.sh"
93+
zip-lambdas = "./zip-all.sh"
9494
apply-tf-dnssec = "(cd open-tofu && tofu apply -var=\"dnssec_enabled=true\" -auto-approve)"
9595
apply-tf-no-dnssec = "(cd open-tofu && tofu apply -var=\"dnssec_enabled=false\" -auto-approve)"
9696
destroy-tf = "(cd open-tofu && tofu destroy -auto-approve)"
@@ -100,7 +100,7 @@ prepare = [
100100
"configure-tf",
101101
"zip-lambdas"
102102
]
103-
clean = "sh ./clean.sh"
103+
clean = "./clean.sh"
104104
deploy-dnssec = [
105105
"clean",
106106
"prepare",

src/aws_lambda_mpic/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.4.1"
1+
__version__ = "1.0.0"

src/aws_lambda_mpic/mpic_coordinator_lambda/mpic_coordinator_lambda_function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from aws_lambda_powertools.utilities.parser import event_parser, envelopes
1414

1515
from open_mpic_core import MpicRequest, CheckRequest, CheckResponse
16-
from open_mpic_core import MpicRequestValidationError, MpicRequestValidationMessages
16+
from open_mpic_core import MpicRequestValidationException, MpicRequestValidationMessages
1717
from open_mpic_core import MpicCoordinator, MpicCoordinatorConfiguration
1818
from open_mpic_core import CheckType
1919
from open_mpic_core import RemotePerspective
@@ -196,7 +196,7 @@ def build_400_response(error_name, issues_list):
196196
def wrapper(*args, **kwargs):
197197
try:
198198
return func(*args, **kwargs)
199-
except MpicRequestValidationError as e:
199+
except MpicRequestValidationException as e:
200200
validation_issues = json.loads(e.__notes__[0])
201201
return build_400_response(MpicRequestValidationMessages.REQUEST_VALIDATION_FAILED.key, validation_issues)
202202
except ValidationError as validation_error:

0 commit comments

Comments
 (0)