diff --git a/README.md b/README.md index ea8ea68..c3b2028 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,8 @@ The above sample must be run from the root directory of a deployed Open MPIC aws The API is compliant with the [Open MPIC Specification](https://github.com/open-mpic/open-mpic-specification). -Documentation based on the API specification used in this version can be viewed [here](https://open-mpic.org/documentation.html?commit=44c941d395430b022063b2e5353526ba07034771). +There is [documentation based on the API specification used in this version] +(https://open-mpic.org/documentation.html?commit=44c941d395430b022063b2e5353526ba07034771). ## Development Code changes can easily be deployed by editing the .py files and then rezipping the project via `./zip-all.sh` and `./2-package.sh` in the `layer` directory. Then, running `tofu apply` run from the open-tofu directory will update only on the required resources and leave the others unchanged. If any `.tf.template` files are changed or `config.yaml` is edited, `hatch run ./configure.py` must be rerun followed by `tofu apply` in the open-tofu directory. @@ -85,13 +86,13 @@ hatch run test:integration ``` Note: integration tests cannot currently be invoked by running `pytest tests/integration` because `PYTHONPATH` is not set correctly in that case. -The integration tests test a live, deployed API and point the API at real web resources that are provisioned for testing purposes. The integration test content is currently hosted on `caatestsuite.com` (maintained by SSLMate) and `integration-testing.open-mpic.org` (maintained by the maintainers of the Open MPIC project). The zone file for `caatestsuite.com` can be found [here](https://github.com/SSLMate/caatestsuite) along with more info about the tests at [caatestsuite.com](https://caatestsuite.com), and the zone file for `integration-testing.open-mpic.org` can be found [here](https://github.com/open-mpic/open-mpic-integration-zone). `integration-testing.open-mpic.org` also runs an HTTP(S) server for DCV integration testing. The webroot and configs for the webserver can be found [here](https://github.com/open-mpic/open-mpic-integration-webroot). Both of these services are maintained on a best-effort basis. If there is an issue with integration tests, check the availability of these two services and the responses from the sub-domains used in the integration tests. THESE SERVICES ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. They are not intended for use outside of development integration testing (i.e., no excessive query volume, no use in production systems). +The integration tests test a live, deployed API and point the API at real web resources that are provisioned for testing purposes. The integration test content is currently hosted on `caatestsuite.com` (maintained by SSLMate) and `integration-testing.open-mpic.org` (maintained by the maintainers of the Open MPIC project). The zone file for `caatestsuite.com` is available in [SSLMate/caatestsuite](https://github.com/SSLMate/caatestsuite) along with more info about the tests at [caatestsuite.com](https://caatestsuite.com), and the zone file for `integration-testing.open-mpic.org` is available in [open-mpic/open-mpic-integration-zone](https://github.com/open-mpic/open-mpic-integration-zone). `integration-testing.open-mpic.org` also runs an HTTP(S) server for DCV integration testing. The webroot and configs for the webserver is available in [open-mpic/open-mpic-integration-webroot](https://github.com/open-mpic/open-mpic-integration-webroot). Both of these services are maintained on a best-effort basis. If there is an issue with integration tests, check the availability of these two services and the responses from the sub-domains used in the integration tests. THESE SERVICES ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. They are not intended for use outside of development integration testing (i.e., no excessive query volume, no use in production systems). If you encounter issues running integration tests with the above commands, contact the project maintainers. ## Tear-down -If you would like to take the API down, run `tofu destroy` in the open-tofu directory and type `yes` at the prompt. This will remove all AWS resources created by Open Tofu for the API. **There is currently a situation where AWS takes a very long time to release internal IP prefix resources from a VPC upon teardown. This can lead to `tofu destroy` hanging for a long time.** One mitigation is that `tofu destroy` can be run (which deprovisions almost all resources within minutes) and then aborted several minutes later with crtl+c. Then, after several hours, `tofu destroy` can be rerun which will deprovision the remaining IP prefix resources after sufficient time has passed for AWS to register the IP prefix objects are no longer associated with the VPC. +If you would like to take the API down, run `tofu destroy` in the open-tofu directory and type `yes` at the prompt. This will remove all AWS resources created by Open Tofu for the API. **There is currently a situation where AWS takes a very long time to release internal IP prefix resources from a VPC upon teardown. This can lead to `tofu destroy` hanging for a long time.** One mitigation is that `tofu destroy` can be run (which deprovisions almost all resources within minutes) and then aborted several minutes later with ctrl+c. Then, after several hours, `tofu destroy` can be rerun which will deprovision the remaining IP prefix resources after sufficient time has passed for AWS to register the IP prefix objects are no longer associated with the VPC. After `tofu destroy`, `./clean.sh` in the root directory also clears generated/zip files. diff --git a/src/aws_lambda_mpic/mpic_coordinator_lambda/mpic_coordinator_lambda_function.py b/src/aws_lambda_mpic/mpic_coordinator_lambda/mpic_coordinator_lambda_function.py index 8d3ade9..10997ce 100644 --- a/src/aws_lambda_mpic/mpic_coordinator_lambda/mpic_coordinator_lambda_function.py +++ b/src/aws_lambda_mpic/mpic_coordinator_lambda/mpic_coordinator_lambda_function.py @@ -84,7 +84,7 @@ def __init__(self): async def initialize_client_pools(self): # Call this during cold start for perspective_code in self._all_target_perspective_codes: - for _ in range(10): # pre-populate pool + for _ in range(10): # prepopulate pool client = await self._session.client("lambda", perspective_code).__aenter__() await self._client_pools[perspective_code].put(client)