diff --git a/.nvmrc b/.nvmrc index a336baf20bc..5802c69cb8f 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16.19.0 \ No newline at end of file +20.12.2 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 044ea2bf226..0d2262b2e28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,10 +8,27 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Migration Notes +#### CUMULUS-3433 Update to node.js v20 + +The following applies only to users with a custom value configured for +`async_operation_image`: + +- As part of the node v20 update process, a new version (49) of the Core + async-operation container was published - [cumuluss/async + operation](https://hub.docker.com/layers/cumuluss/async-operation) The + default value for `async_operation_image` has been updated in the `cumulus` + module, however if you are using an internal image repository such as ECR, + please make sure to update your deployment configuration with the newly + provided image. + + Users making use of a custom image configuration should note the base image + for Core async operations must support node v20.x. + #### CUMULUS-3449 Please follow instructions before upgrading Cumulus. -- The updates in CUMULUS-3449 requires manual update to postgres database in production environment. Please follow - [Update Cumulus_id Type and Indexes](https://nasa.github.io/cumulus/docs/next/upgrade-notes/update-cumulus_id-type-indexes-CUMULUS-3449) +- The updates in CUMULUS-3449 requires manual update to postgres database in + production environment. Please follow [Update Cumulus_id Type and + Indexes](https://nasa.github.io/cumulus/docs/next/upgrade-notes/update-cumulus_id-type-indexes-CUMULUS-3449) #### CUMULUS-3617 Migration of DLA messages should be performed after Cumulus is upgraded @@ -39,9 +56,11 @@ The Lambda will trigger an Async Operation and return an `id` such as: "taskArn":"arn:aws:ecs:us-east-1:AWSID:task/$PREFIX-CumulusECSCluster/123456789"} ``` -which you can then query the Async Operations [API Endpoint](https://nasa.github.io/cumulus-api/#retrieve-async-operation) for -the output or status of your request. If you want to directly observe the progress of the migration as it runs, you can view -the CloudWatch logs for your async operations (e.g. `PREFIX-AsyncOperationEcsLogs`). +which you can then query the Async Operations [API +Endpoint](https://nasa.github.io/cumulus-api/#retrieve-async-operation) for the +output or status of your request. If you want to directly observe the progress +of the migration as it runs, you can view the CloudWatch logs for your async +operations (e.g. `PREFIX-AsyncOperationEcsLogs`). ### Breaking Changes @@ -91,9 +110,21 @@ the CloudWatch logs for your async operations (e.g. `PREFIX-AsyncOperationEcsLog - `tf-modules/monitoring` module now deploys Glue table for querying dead-letter-archive messages. - **CUMULUS-3616** - Added user guide on querying dead-letter-archive messages using AWS Athena. +- **CUMULUS-3433** + - Added `importGot` helper method to import `got` as an ESM module in + CommmonJS typescript/webpack clients. ### Changed - +- **CUMULUS-3433** + - Updated all node.js lambda dependencies to node 20.x/20.12.2 + - Modified `@cumulus/ingest` unit test HTTPs server to accept localhost POST + requests, and removed nock dependency from tests involving `fs.Readstream` + and `got` due to a likely incompatibility with changes in node v18, `got`, + fs.Readstream and nock when used in combination in units + (https://github.com/sindresorhus/got/issues/2341) + - Updated `got` dependency in `@cumulus/ingest` to use `@cumulus/common` + dynamic import helper / `got` > v10 in CommonJS. + - Updated all Core lambdas to use [cumulus-message-adapter-js](https://github.com/nasa/cumulus-message-adapter-js) v2.2.0 - **CUMULUS-3629** - dla guarantees de-nested SQS message bodies, preferring outermost metadata as found. - dla uses execution Name as filename and ensures no ':' or '/' characters in name diff --git a/bamboo/Dockerfile b/bamboo/Dockerfile index a37b2961646..f70360698a1 100644 --- a/bamboo/Dockerfile +++ b/bamboo/Dockerfile @@ -1,6 +1,6 @@ ## Dockerfile to create integration/unit test environment -FROM node:16.19.0-buster -RUN apt update && npm config set unsafe-perm true &&\ +FROM node:20.12.2-buster +RUN apt update &&\ apt install -y netcat zip jq rsync zip RUN apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ @@ -15,13 +15,8 @@ WORKDIR "/opt/Python-$PYTHON_VERSION.$PYTHON_VERSION_PATCH" RUN ./configure --enable-optimizations && make -j4 && make altinstall WORKDIR / - - - - - RUN update-alternatives --install /usr/bin/python python /usr/local/bin/python3.10 1 && \ update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 RUN python -m pip install -U pip -RUN npm install -g npm@8.6 && npm config --global set script-shell /bin/bash +RUN npm config --global set script-shell /bin/bash RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && ./aws/install diff --git a/bamboo/bootstrap-integration-tests.sh b/bamboo/bootstrap-integration-tests.sh index b1d6f7a3d96..25a48e971d6 100755 --- a/bamboo/bootstrap-integration-tests.sh +++ b/bamboo/bootstrap-integration-tests.sh @@ -5,8 +5,6 @@ set -ex . ./bamboo/abort-if-not-pr-or-redeployment.sh . ./bamboo/abort-if-skip-integration-tests.sh -npm config set unsafe-perm true - if [[ $USE_TERRAFORM_ZIPS == true ]]; then ## Configure TF deployment to use deployed packages for the version being built echo "***Deploying stack with deployment packages" diff --git a/bamboo/deploy-dev-integration-test-stack.sh b/bamboo/deploy-dev-integration-test-stack.sh index 726c23b782b..0739a88d153 100755 --- a/bamboo/deploy-dev-integration-test-stack.sh +++ b/bamboo/deploy-dev-integration-test-stack.sh @@ -6,8 +6,6 @@ set -ex . ./bamboo/abort-if-not-pr-or-redeployment.sh . ./bamboo/abort-if-skip-integration-tests.sh -npm config set unsafe-perm true - if [[ $USE_TERRAFORM_ZIPS == true ]]; then ## If this flag is set, we want to use the output of the 'publish' stage ## to deploy in the integration test stage, so abort diff --git a/bamboo/docker-compose-local.yml b/bamboo/docker-compose-local.yml index 2bf65ec28aa..aec85da0653 100644 --- a/bamboo/docker-compose-local.yml +++ b/bamboo/docker-compose-local.yml @@ -14,15 +14,15 @@ services: - ../:/source/cumulus - ../packages/test-data:/tmp/cumulus_unit_test_data ports: - - "20:20" - - "21:21" - - 47400-47470:47400-47470 - - 3030:3030 - - 2222:2222 - - 4550-4599:4550-4599 - - 5432:5432 - - 8080:8080 - - 9200:9200 + - "127.0.0.1:20:20" + - "127.0.0.1:21:21" + - 127.0.0.1:47400-47470:47400-47470 + - 127.0.0.1:3030:3030 + - 127.0.0.1:2222:2222 + - 127.0.0.1:4550-4599:4550-4599 + - 127.0.0.1:5432:5432 + - 127.0.0.1:8080:8080 + - 127.0.0.1:9200:9200 localstack: image: localstack/localstack:3.0.0 elasticsearch: diff --git a/bamboo/generate-ts-build-cache.sh b/bamboo/generate-ts-build-cache.sh index afba517a1ac..afba3213042 100755 --- a/bamboo/generate-ts-build-cache.sh +++ b/bamboo/generate-ts-build-cache.sh @@ -13,8 +13,6 @@ npm install @octokit/graphql@2.1.1 simple-git@3.7.0 . ./bamboo/abort-if-not-pr.sh -npm config set unsafe-perm true - set -o pipefail CURRENT_WORKING_DIR=$NONCACHE_WORKING_DIR diff --git a/bamboo/httpd.conf b/bamboo/httpd.conf index d58b84ebf26..8b0d42f4ffa 100644 --- a/bamboo/httpd.conf +++ b/bamboo/httpd.conf @@ -2,20 +2,20 @@ # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See for detailed information. -# In particular, see +# In particular, see # # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure -# consult the online docs. You have been warned. +# consult the online docs. You have been warned. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "logs/access_log" # with ServerRoot set to "/usr/local/apache2" will be interpreted by the -# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" +# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" # will be interpreted as '/logs/access_log'. # @@ -45,11 +45,11 @@ ServerRoot "/usr/local/apache2" # ports, instead of the default. See also the # directive. # -# Change this to Listen on specific IP addresses as shown below to +# Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 -Listen 3030 +Listen 3030 # # Dynamic Shared Object (DSO) Support @@ -171,7 +171,7 @@ LoadModule version_module modules/mod_version.so LoadModule unixd_module modules/mod_unixd.so #LoadModule heartbeat_module modules/mod_heartbeat.so #LoadModule heartmonitor_module modules/mod_heartmonitor.so -#LoadModule dav_module modules/mod_dav.so +LoadModule dav_module modules/mod_dav.so LoadModule status_module modules/mod_status.so LoadModule autoindex_module modules/mod_autoindex.so #LoadModule asis_module modules/mod_asis.so @@ -189,16 +189,16 @@ LoadModule autoindex_module modules/mod_autoindex.so #LoadModule negotiation_module modules/mod_negotiation.so LoadModule dir_module modules/mod_dir.so #LoadModule imagemap_module modules/mod_imagemap.so -#LoadModule actions_module modules/mod_actions.so +LoadModule actions_module modules/mod_actions.so #LoadModule speling_module modules/mod_speling.so #LoadModule userdir_module modules/mod_userdir.so LoadModule alias_module modules/mod_alias.so -#LoadModule rewrite_module modules/mod_rewrite.so +LoadModule rewrite_module modules/mod_rewrite.so # # If you wish httpd to run as a different user or group, you must run -# httpd as root initially and it will switch. +# httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for @@ -239,7 +239,7 @@ ServerAdmin you@example.com # # Deny access to the entirety of your server's filesystem. You must -# explicitly permit access to web content directories in other +# explicitly permit access to web content directories in other # blocks below. # @@ -261,6 +261,7 @@ ServerAdmin you@example.com # DocumentRoot "/usr/local/apache2/htdocs" + # # Possible values for the Options directive are "None", "All", # or any combination of: @@ -297,8 +298,8 @@ DocumentRoot "/usr/local/apache2/htdocs" # -# The following lines prevent .htaccess and .htpasswd files from being -# viewed by Web clients. +# The following lines prevent .htaccess and .htpasswd files from being +# viewed by Web clients. # Require all denied @@ -351,8 +352,8 @@ LogLevel warn # - # Redirect: Allows you to tell clients about documents that used to - # exist in your server's namespace, but do not anymore. The client + # Redirect: Allows you to tell clients about documents that used to + # exist in your server's namespace, but do not anymore. The client # will make a new request for the document at its new location. # Example: # Redirect permanent /foo http://www.example.com/bar @@ -369,7 +370,7 @@ LogLevel warn # the filesystem path. # - # ScriptAlias: This controls which directories contain server scripts. + # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the @@ -388,6 +389,15 @@ LogLevel warn #Scriptsock cgisock + +### Configuration to allow PUT endpoint + +RewriteEngine On +RewriteCond %{REQUEST_METHOD} ^POST$ +RewriteCond %{REQUEST_URI} ^/post_test.*$ +RewriteRule .* - [R=200,L,E=no-gzip:1] + + # # "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. @@ -481,10 +491,10 @@ LogLevel warn #MaxRanges unlimited # -# EnableMMAP and EnableSendfile: On systems that support it, +# EnableMMAP and EnableSendfile: On systems that support it, # memory-mapping or the sendfile syscall may be used to deliver # files. This usually improves server performance, but must -# be turned off when serving from networked-mounted +# be turned off when serving from networked-mounted # filesystems or if support for these functions is otherwise # broken on your system. # Defaults: EnableMMAP On, EnableSendfile Off @@ -494,9 +504,9 @@ LogLevel warn # Supplemental configuration # -# The configuration files in the conf/extra/ directory can be -# included to add extra features or to modify the default configuration of -# the server, or you may simply copy their contents here and change as +# The configuration files in the conf/extra/ directory can be +# included to add extra features or to modify the default configuration of +# the server, or you may simply copy their contents here and change as # necessary. # Server-pool management (MPM specific) diff --git a/example/cumulus-tf/lambdas.tf b/example/cumulus-tf/lambdas.tf index afbcd392706..c0721709ce5 100644 --- a/example/cumulus-tf/lambdas.tf +++ b/example/cumulus-tf/lambdas.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "async_operation_fail" { source_code_hash = filebase64sha256("${path.module}/../lambdas/asyncOperations/lambda.zip") handler = "index.fail" role = module.cumulus.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" tags = local.tags @@ -23,7 +23,7 @@ resource "aws_lambda_function" "async_operation_success" { source_code_hash = filebase64sha256("${path.module}/../lambdas/asyncOperations/lambda.zip") handler = "index.success" role = module.cumulus.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" tags = local.tags @@ -42,7 +42,7 @@ resource "aws_lambda_function" "sns_s3_executions_test" { source_code_hash = filebase64sha256("${path.module}/../lambdas/snsS3Test/lambda.zip") handler = "index.handleExecutions" role = module.cumulus.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" environment { variables = { @@ -68,7 +68,7 @@ resource "aws_lambda_function" "sns_s3_granules_test" { source_code_hash = filebase64sha256("${path.module}/../lambdas/snsS3Test/lambda.zip") handler = "index.handleGranules" role = module.cumulus.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" environment { variables = { @@ -94,7 +94,7 @@ resource "aws_lambda_function" "sns_s3_pdrs_test" { source_code_hash = filebase64sha256("${path.module}/../lambdas/snsS3Test/lambda.zip") handler = "index.handlePdrs" role = module.cumulus.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" environment { variables = { @@ -120,7 +120,7 @@ resource "aws_lambda_function" "sns_s3_collections_test" { source_code_hash = filebase64sha256("${path.module}/../lambdas/snsS3Test/lambda.zip") handler = "index.handleCollections" role = module.cumulus.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" environment { variables = { @@ -146,7 +146,7 @@ resource "aws_lambda_function" "ftpPopulateTestLambda" { source_code_hash = filebase64sha256("${path.module}/../lambdas/ftpPopulateTestLambda/dist/lambda.zip") handler = "index.handler" role = module.cumulus.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = 150 memory_size = 512 @@ -186,7 +186,7 @@ resource "aws_lambda_function" "lzards_api_client_test" { source_code_hash = filebase64sha256("${path.module}/../lambdas/lzardsClientTest/dist/webpack/lambda.zip") handler = "index.handler" role = module.cumulus.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = 600 memory_size = 512 diff --git a/example/cumulus-tf/modules/s3_access_test/main.tf b/example/cumulus-tf/modules/s3_access_test/main.tf index f8d19a8d2d2..db8025c6aec 100644 --- a/example/cumulus-tf/modules/s3_access_test/main.tf +++ b/example/cumulus-tf/modules/s3_access_test/main.tf @@ -14,7 +14,7 @@ resource "aws_lambda_function" "s3_acccess_test" { source_code_hash = filebase64sha256("${path.module}/../../../lambdas/s3AccessTest/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" tags = var.tags } diff --git a/example/cumulus-tf/variables.tf b/example/cumulus-tf/variables.tf index 50303d7acac..751c59c36ad 100644 --- a/example/cumulus-tf/variables.tf +++ b/example/cumulus-tf/variables.tf @@ -350,7 +350,7 @@ variable "rds_admin_access_secret_arn" { variable "async_operation_image_version" { description = "docker image version to use for Cumulus async operations tasks" type = string - default = "48" + default = "49" } variable "cumulus_process_activity_version" { diff --git a/example/lambdas/asyncOperations/package.json b/example/lambdas/asyncOperations/package.json index 71136118295..24d57a073ba 100644 --- a/example/lambdas/asyncOperations/package.json +++ b/example/lambdas/asyncOperations/package.json @@ -5,7 +5,7 @@ "main": "index.js", "private": true, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "package": "rm -f lambda.zip && node ../../../bin/zip.js lambda.zip index.js", diff --git a/example/lambdas/ftpPopulateTestLambda/package.json b/example/lambdas/ftpPopulateTestLambda/package.json index 76381e8d22d..a76ebbec1e7 100644 --- a/example/lambdas/ftpPopulateTestLambda/package.json +++ b/example/lambdas/ftpPopulateTestLambda/package.json @@ -5,7 +5,7 @@ "main": "index.js", "private": true, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "build": "rm -rf dist && mkdir dist && cp -R granules ./dist/granules && ../../../node_modules/.bin/webpack", diff --git a/example/lambdas/lzardsClientTest/package.json b/example/lambdas/lzardsClientTest/package.json index 61a2c87c4a9..642b1d1135b 100644 --- a/example/lambdas/lzardsClientTest/package.json +++ b/example/lambdas/lzardsClientTest/package.json @@ -4,7 +4,7 @@ "description": "LZARDS API Client Test Lambda", "private": true, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "test": "true", diff --git a/example/lambdas/s3AccessTest/package.json b/example/lambdas/s3AccessTest/package.json index bf7d08d9e47..e9904eefea7 100644 --- a/example/lambdas/s3AccessTest/package.json +++ b/example/lambdas/s3AccessTest/package.json @@ -5,7 +5,7 @@ "main": "index.js", "private": true, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "test": "true", diff --git a/example/lambdas/snsS3Test/package.json b/example/lambdas/snsS3Test/package.json index 6d6d187f593..2850ece03dc 100644 --- a/example/lambdas/snsS3Test/package.json +++ b/example/lambdas/snsS3Test/package.json @@ -5,7 +5,7 @@ "main": "index.js", "private": true, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "package": "rm -f lambda.zip && node ../../../bin/zip.js lambda.zip index.js node_modules", diff --git a/example/lambdas/versionUpTest/package.json b/example/lambdas/versionUpTest/package.json index 4e4a87c9d92..a98ac3878a2 100644 --- a/example/lambdas/versionUpTest/package.json +++ b/example/lambdas/versionUpTest/package.json @@ -5,7 +5,7 @@ "main": "index.js", "private": true, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "test": "true", diff --git a/example/package.json b/example/package.json index 01d8a31b8b6..a89e98408c6 100644 --- a/example/package.json +++ b/example/package.json @@ -5,7 +5,7 @@ "private": true, "main": "index.js", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "ava": { "files": [ diff --git a/example/scripts/generate_ingest/package.json b/example/scripts/generate_ingest/package.json index 6c9b8e4da88..4106856a460 100644 --- a/example/scripts/generate_ingest/package.json +++ b/example/scripts/generate_ingest/package.json @@ -10,7 +10,7 @@ ], "types": "./index.d.ts", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "publishConfig": { "access": "private" diff --git a/example/scripts/lib/package.json b/example/scripts/lib/package.json index 778be7210d9..0fef4c49fdc 100644 --- a/example/scripts/lib/package.json +++ b/example/scripts/lib/package.json @@ -5,7 +5,7 @@ "description": "example project libs", "homepage": "https://github.com/nasa/cumulus/tree/master/example/scripts/lib", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "repository": { "type": "git", diff --git a/lambdas/db-migration/main.tf b/lambdas/db-migration/main.tf index caf9d02b15c..5445f69de0e 100644 --- a/lambdas/db-migration/main.tf +++ b/lambdas/db-migration/main.tf @@ -69,7 +69,7 @@ resource "aws_lambda_function" "db_migration" { source_code_hash = filebase64sha256(local.lambda_path) handler = "index.handler" role = aws_iam_role.db_migration.arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = var.lambda_timeout memory_size = 512 diff --git a/lambdas/db-migration/package.json b/lambdas/db-migration/package.json index 9d0ae58ad0f..d9466ee44a6 100644 --- a/lambdas/db-migration/package.json +++ b/lambdas/db-migration/package.json @@ -4,7 +4,7 @@ "description": "A Lambda function used for deploying DB migrations", "license": "Apache-2.0", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "main": "./dist/lambda/index.js", "types": "./dist/lambda/index.d.ts", diff --git a/lambdas/db-provision-user-database/main.tf b/lambdas/db-provision-user-database/main.tf index 887d1fa5775..5957007366b 100644 --- a/lambdas/db-provision-user-database/main.tf +++ b/lambdas/db-provision-user-database/main.tf @@ -14,7 +14,7 @@ resource "aws_lambda_function" "provision_database" { source_code_hash = filebase64sha256("${path.module}/dist/webpack/lambda.zip") handler = "index.handler" role = aws_iam_role.db_provision.arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" memory_size = lookup(var.lambda_memory_sizes, "ProvisionPostgresDatabase", 512) timeout = lookup(var.lambda_timeouts, "ProvisionPostgresDatabase", 500) environment { diff --git a/lambdas/db-provision-user-database/package.json b/lambdas/db-provision-user-database/package.json index 81cc1b4e5f0..0a6cdcf63d2 100644 --- a/lambdas/db-provision-user-database/package.json +++ b/lambdas/db-provision-user-database/package.json @@ -3,7 +3,7 @@ "version": "18.2.0", "description": "A Lambda function used for provisioning user databases", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "private": true, "scripts": { diff --git a/lambdas/dla-migration/main.tf b/lambdas/dla-migration/main.tf index 1c34f0259e0..63a949f9637 100644 --- a/lambdas/dla-migration/main.tf +++ b/lambdas/dla-migration/main.tf @@ -7,7 +7,7 @@ resource "aws_lambda_function" "dla_migration" { source_code_hash = filebase64sha256(local.lambda_path) handler = "index.handler" role = aws_iam_role.dla_migration_role.arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "dlaMigration", 900) memory_size = lookup(var.lambda_memory_sizes, "dlaMigration", 512) environment { diff --git a/lambdas/dla-migration/package.json b/lambdas/dla-migration/package.json index abcd2017418..1250d7c2955 100644 --- a/lambdas/dla-migration/package.json +++ b/lambdas/dla-migration/package.json @@ -4,7 +4,7 @@ "description": "A Lambda function used for DLA migrations", "license": "Apache-2.0", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "main": "./dist/lambda/index.js", "types": "./dist/lambda/index.d.ts", diff --git a/lambdas/migration-helper-async-operation/main.tf b/lambdas/migration-helper-async-operation/main.tf index 99878564577..c89559717b5 100644 --- a/lambdas/migration-helper-async-operation/main.tf +++ b/lambdas/migration-helper-async-operation/main.tf @@ -7,7 +7,7 @@ resource "aws_lambda_function" "migration_helper_async_operation" { filename = local.lambda_path source_code_hash = filebase64sha256(local.lambda_path) handler = "index.handler" - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "migrationHelperAsyncOperation", 300) memory_size = lookup(var.lambda_memory_sizes, "migrationHelperAsyncOperation", 512) diff --git a/lambdas/migration-helper-async-operation/package.json b/lambdas/migration-helper-async-operation/package.json index 315094564b5..bcc10630215 100644 --- a/lambdas/migration-helper-async-operation/package.json +++ b/lambdas/migration-helper-async-operation/package.json @@ -5,7 +5,7 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "private": true, "main": "./dist/lambda/index.js", diff --git a/lambdas/sqs-message-remover/main.tf b/lambdas/sqs-message-remover/main.tf index 5811d0d38d4..ab22004cf34 100644 --- a/lambdas/sqs-message-remover/main.tf +++ b/lambdas/sqs-message-remover/main.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "sqs_message_remover" { source_code_hash = filebase64sha256("${path.module}/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "sqsMessageRemover", 100) memory_size = lookup(var.lambda_memory_sizes, "sqsMessageRemover", 512) environment { diff --git a/lambdas/sqs-message-remover/package.json b/lambdas/sqs-message-remover/package.json index 49b16fcf334..08b5e60ebd3 100644 --- a/lambdas/sqs-message-remover/package.json +++ b/lambdas/sqs-message-remover/package.json @@ -13,7 +13,7 @@ "url": "https://github.com/nasa/cumulus" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "clean": "rm -rf dist", diff --git a/package.json b/package.json index eab659ca1bb..6762dea5eda 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "url": "https://github.com/nasa/cumulus" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "bin": { "build-tasks-doc": "./bin/build-tasks-doc.js" @@ -131,7 +131,7 @@ "md5": "^2.2.1", "mime-types": "^2.1.22", "moment": "2.29.4", - "nock": "^12.0.3", + "nock": "^13.5.4", "node-loader": "^2.0.0", "npm-package-json-lint": "^5.1.0", "nyc": "^15.1.0", diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 41f3acdc5fc..03906406a73 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -8,7 +8,7 @@ "NASA" ], "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "publishConfig": { "access": "public" diff --git a/packages/api/.babelrc b/packages/api/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/packages/api/.babelrc +++ b/packages/api/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/packages/api/ecs/async-operation/Dockerfile b/packages/api/ecs/async-operation/Dockerfile index e3d124c2198..1d2e11c3919 100644 --- a/packages/api/ecs/async-operation/Dockerfile +++ b/packages/api/ecs/async-operation/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16.19.0-buster +FROM node:20.12.2-buster USER root RUN sed -i -e '/jessie-updates/d' /etc/apt/sources.list diff --git a/packages/api/ecs/async-operation/package.json b/packages/api/ecs/async-operation/package.json index 8423bb42f8e..99f34c64773 100644 --- a/packages/api/ecs/async-operation/package.json +++ b/packages/api/ecs/async-operation/package.json @@ -32,7 +32,7 @@ "p-retry": "^2.0.0" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "private": true } diff --git a/packages/api/package.json b/packages/api/package.json index 47569a3c26b..b0c6cf77104 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -4,7 +4,7 @@ "description": "Lambda functions for handling all daac's API operations", "main": "index.js", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "build-lambda-zips": "for x in $(ls dist); do (cd dist/${x} && rm -f lambda.zip && find . | xargs node ../../../../bin/zip.js lambda.zip && echo zipped ${x}); done", diff --git a/packages/api/tests/lambdas/test-kinesis-consumer.js b/packages/api/tests/lambdas/test-kinesis-consumer.js index 90a8ea933aa..741b78d4501 100644 --- a/packages/api/tests/lambdas/test-kinesis-consumer.js +++ b/packages/api/tests/lambdas/test-kinesis-consumer.js @@ -226,7 +226,7 @@ test.serial('An SNS Fallback retry, should throw an error if message is invalid await t.throwsAsync( handler(snsEvent, {}, testCallback), - { message: 'Unexpected end of JSON input' } + { message: "Expected property name or '}' in JSON at position 1" } ); }); diff --git a/packages/async-operations/package.json b/packages/async-operations/package.json index a9aa23ded00..4bcd0af4f2d 100644 --- a/packages/async-operations/package.json +++ b/packages/async-operations/package.json @@ -5,7 +5,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "clean": "git clean -d -x -e node_modules -f", diff --git a/packages/aws-client/package.json b/packages/aws-client/package.json index 29badb823cb..21d744ae97c 100644 --- a/packages/aws-client/package.json +++ b/packages/aws-client/package.json @@ -8,7 +8,7 @@ "NASA" ], "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "files": [ "*.js", diff --git a/packages/checksum/package.json b/packages/checksum/package.json index 60425e798d8..05623495eba 100644 --- a/packages/checksum/package.json +++ b/packages/checksum/package.json @@ -3,7 +3,7 @@ "version": "18.2.0", "description": "Cumulus checksum utilities", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/cmr-client/package.json b/packages/cmr-client/package.json index ae27548df71..3c3d570c275 100644 --- a/packages/cmr-client/package.json +++ b/packages/cmr-client/package.json @@ -3,7 +3,7 @@ "version": "18.2.0", "description": "A Node.js client to NASA's Common Metadata Repository (CMR) API.", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "build-docs": "../../node_modules/.bin/jsdoc2md --heading-depth 2 --template templates/API.hbs CMR.js CMRSearchConceptQueue.js > API.md", diff --git a/packages/cmrjs/package.json b/packages/cmrjs/package.json index e586dda59a9..17d1efd96a8 100644 --- a/packages/cmrjs/package.json +++ b/packages/cmrjs/package.json @@ -3,7 +3,7 @@ "version": "18.2.0", "description": "A node SDK for CMR", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "clean": "git clean -d -x -e node_modules -f", diff --git a/packages/collection-config-store/package.json b/packages/collection-config-store/package.json index 91694467fb8..97393ad64e3 100644 --- a/packages/collection-config-store/package.json +++ b/packages/collection-config-store/package.json @@ -7,7 +7,7 @@ "NASA" ], "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "publishConfig": { "access": "public" diff --git a/packages/common/importEsm.js b/packages/common/importEsm.js new file mode 100644 index 00000000000..0dd55eb700a --- /dev/null +++ b/packages/common/importEsm.js @@ -0,0 +1,16 @@ +/** + * Asynchronously imports the 'got' module. + * + * This function uses dynamic imports to import the ESM-only 'got' module at runtime. + * This should be used for importing the non-compat module in to CommonJS TS/webpacked + * modules. + * + * @returns {Promise} A promise that resolves to the 'got' function. + * @throws {Error} If an error occurs while importing the module. + */ +const importGot = async () => { + const { default: got } = await import('got'); + return got; +}; + +module.exports = { importGot }; diff --git a/packages/common/package.json b/packages/common/package.json index 5b2e9088b18..ebb25285824 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -8,7 +8,7 @@ "NASA" ], "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "files": [ "*.js", @@ -48,6 +48,7 @@ "@cumulus/aws-client": "18.2.0", "@cumulus/errors": "18.2.0", "@cumulus/logger": "18.2.0", + "got": "^14.2.1", "ajv": "^6.12.3", "follow-redirects": "^1.2.4", "fs-extra": "^5.0.0", diff --git a/packages/common/src/importEsm.d.ts b/packages/common/src/importEsm.d.ts new file mode 100644 index 00000000000..cec307cc5fa --- /dev/null +++ b/packages/common/src/importEsm.d.ts @@ -0,0 +1,2 @@ +declare module 'importEsm'; +export {}; diff --git a/packages/common/src/index.ts b/packages/common/src/index.ts index 5f2ae6925b7..91d52c00b27 100644 --- a/packages/common/src/index.ts +++ b/packages/common/src/index.ts @@ -1,6 +1,7 @@ import BucketsConfig = require('./BucketsConfig'); export { BucketsConfig }; +export * as importEsm from './importEsm'; export * as cliUtils from './cli-utils'; export * as envUtils from './env'; export * as fakeProvider from './fake-provider'; diff --git a/packages/db/package.json b/packages/db/package.json index a0882edb5e3..635e45bf808 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -28,7 +28,7 @@ "failFast": true }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "dependencies": { "@aws-sdk/client-secrets-manager": "^3.447.0", diff --git a/packages/db/tests/test-connection.js b/packages/db/tests/test-connection.js index c3428fb62bd..b04433d092e 100644 --- a/packages/db/tests/test-connection.js +++ b/packages/db/tests/test-connection.js @@ -135,14 +135,8 @@ test('getKnexClient logs retry errors and throws expected knexTimeoutError', asy knex(t.context.tableName).where({}), { instanceOf: KnexTimeoutError } ); - const actual = [loggerWarnStub.args[0][0], loggerWarnStub.args[0][1].message]; - t.deepEqual( - actual, - [ - 'knex failed on attempted connection', - 'connect ECONNREFUSED 127.0.0.1:5400', - ] - ); + t.deepEqual(loggerWarnStub.args[0][0], 'knex failed on attempted connection'); + t.is(loggerWarnStub.args[0][1].code, 'ECONNREFUSED'); console.log(loggerWarnStub.callCount); t.true(loggerWarnStub.callCount > 1); }); diff --git a/packages/distribution-utils/package.json b/packages/distribution-utils/package.json index 6ef047da70c..33f1674f183 100644 --- a/packages/distribution-utils/package.json +++ b/packages/distribution-utils/package.json @@ -6,7 +6,7 @@ "CUMULUS" ], "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/errors/package.json b/packages/errors/package.json index 3dc14ab6136..0b5f595f3cb 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -8,7 +8,7 @@ "NASA" ], "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/es-client/package.json b/packages/es-client/package.json index b29c3cf9983..c00ebda4604 100644 --- a/packages/es-client/package.json +++ b/packages/es-client/package.json @@ -7,7 +7,7 @@ "NASA" ], "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "publishConfig": { "access": "public" diff --git a/packages/ingest/package.json b/packages/ingest/package.json index ecb7925ac17..4afe6409025 100644 --- a/packages/ingest/package.json +++ b/packages/ingest/package.json @@ -3,7 +3,7 @@ "version": "18.2.0", "description": "Ingest utilities", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "build": "rm -rf dist && mkdir dist && npm run prepare", @@ -50,7 +50,6 @@ "cksum": "^1.3.0", "encodeurl": "^1.0.2", "fs-extra": "^5.0.0", - "got": "^11.8.5", "is-ip": "^2.0.0", "is-valid-hostname": "^0.1.1", "jsftp": "https://github.com/jkovarik/jsftp.git#add_288", diff --git a/packages/ingest/src/HttpProviderClient.js b/packages/ingest/src/HttpProviderClient.js index 412e23437ca..c61a48d387f 100644 --- a/packages/ingest/src/HttpProviderClient.js +++ b/packages/ingest/src/HttpProviderClient.js @@ -4,12 +4,12 @@ const fs = require('fs'); const https = require('https'); const isIp = require('is-ip'); const { basename } = require('path'); -const { pipeline } = require('stream'); +const { pipeline } = require('stream/promises'); +const { PassThrough } = require('stream'); const Crawler = require('simplecrawler'); -const got = require('got'); const { CookieJar } = require('tough-cookie'); const { promisify } = require('util'); -const stream = require('node:stream'); +const { importGot } = require('@cumulus/common/importEsm'); const { buildS3Uri, @@ -213,6 +213,8 @@ class HttpProviderClient { * @returns {Promise.} - the path that the file was saved to */ async download(params) { + const got = await importGot(); + const { remotePath, localPath } = params; validateHost(this.host); await this.setUpGotOptions(); @@ -253,6 +255,8 @@ class HttpProviderClient { * the S3 URI and ETag of the destination file */ async sync(params) { + const got = await importGot(); + const { destinationBucket, destinationKey, fileRemotePath } = params; validateHost(this.host); await this.setUpGotOptions(); @@ -301,8 +305,9 @@ class HttpProviderClient { * @returns {Promise} the uri of the uploaded file */ async upload(params) { + const got = await importGot(); const { localPath, uploadPath } = params; - log.info(params); + log.info({ localPath, uploadPath }); await this.setUpGotOptions(); await this.downloadTLSCertificate(); const options = { @@ -315,10 +320,10 @@ class HttpProviderClient { const remoteUrl = buildURL(options); got.stream.options = options; - await promisify(pipeline)( + await pipeline( fs.createReadStream(localPath), - await got.stream.post(remoteUrl), - new stream.PassThrough() + got.stream.post(remoteUrl), + new PassThrough() ); log.info(`Finishing uploading ${localPath} to ${remoteUrl}`); diff --git a/packages/ingest/test/test-HttpProviderClient.js b/packages/ingest/test/test-HttpProviderClient.js index 0b866efdf48..83ff40d45db 100644 --- a/packages/ingest/test/test-HttpProviderClient.js +++ b/packages/ingest/test/test-HttpProviderClient.js @@ -313,17 +313,23 @@ test.serial('list fails if client wait time is set less than the response delay' ); }); -test.serial('upload() attemps to upload a file', async (t) => { +test.serial('upload() attempts to upload a file', async (t) => { const localPath = path.join(tmpdir(), randomString()); t.teardown(() => fs.unlinkSync(localPath)); - const uploadPath = path.join(randomString(), 'destinationfile.txt'); + const uploadPath = path.join('post_test', randomString(), 'destinationfile.txt'); fs.writeFileSync(localPath, randomString()); const { httpProviderClient } = t.context; - nock('http://localhost:3030') - .post(path.join('/', uploadPath)) - .reply(200); - + // This test fixture is a workaround to an ongoing issue with + // got/pipeline/msw & nock in node 20. Integration tests + // must cover the full use case + const readStream = new Readable({ + read(item) { + this.push(JSON.stringify(item)); + }, + }); + readStream.push('foobar'); + readStream.push(null); await httpProviderClient.upload({ localPath, uploadPath }); t.true(nock.isDone()); }); diff --git a/packages/ingest/tsconfig.json b/packages/ingest/tsconfig.json index f03ed0559ef..5abb44298f5 100644 --- a/packages/ingest/tsconfig.json +++ b/packages/ingest/tsconfig.json @@ -5,5 +5,5 @@ "outDir": "./" }, "include": ["src"], - "exclude": [] + "exclude": [], } diff --git a/packages/integration-tests/.babelrc b/packages/integration-tests/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/packages/integration-tests/.babelrc +++ b/packages/integration-tests/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index 03f2a613282..db29d55e3f2 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -6,7 +6,7 @@ "cumulus-test": "./bin/cli.js" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "main": "index.js", "publishConfig": { diff --git a/packages/launchpad-auth/package.json b/packages/launchpad-auth/package.json index b2756c770a3..7aa38258454 100644 --- a/packages/launchpad-auth/package.json +++ b/packages/launchpad-auth/package.json @@ -7,7 +7,7 @@ "NASA" ], "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "publishConfig": { "access": "public" diff --git a/packages/logger/package.json b/packages/logger/package.json index 5dfce6d3d41..db7615a072c 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -8,7 +8,7 @@ "NASA" ], "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/lzards-api-client/package.json b/packages/lzards-api-client/package.json index 2dece47bd35..f3ac2e3ee4a 100644 --- a/packages/lzards-api-client/package.json +++ b/packages/lzards-api-client/package.json @@ -3,7 +3,7 @@ "version": "18.2.0", "description": "A Node.js client to NASA's Level Zero and Repositories Data Store (LZARDS) API.", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "clean": "git clean -d -x -e node_modules -f", diff --git a/packages/message/package.json b/packages/message/package.json index bfb90e2e91f..89e6e9d4e9b 100644 --- a/packages/message/package.json +++ b/packages/message/package.json @@ -8,7 +8,7 @@ "NASA" ], "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "publishConfig": { "access": "public" diff --git a/packages/oauth-client/package.json b/packages/oauth-client/package.json index 08bdf9b241d..f417108e7cd 100644 --- a/packages/oauth-client/package.json +++ b/packages/oauth-client/package.json @@ -14,7 +14,7 @@ "Cumulus" ], "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "publishConfig": { "access": "public" diff --git a/packages/object-store/package.json b/packages/object-store/package.json index 32271220b4b..33e31673ad7 100644 --- a/packages/object-store/package.json +++ b/packages/object-store/package.json @@ -8,7 +8,7 @@ "NASA" ], "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "publishConfig": { "access": "public" diff --git a/packages/pvl/package.json b/packages/pvl/package.json index 258671bb4ee..d10a234c9af 100644 --- a/packages/pvl/package.json +++ b/packages/pvl/package.json @@ -4,7 +4,7 @@ "description": "Parse and serialize Parameter Value Language, a data markup language used by NASA", "main": "index.js", "engine": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "test": "../../node_modules/.bin/ava", diff --git a/packages/s3-credentials-endpoint/package.json b/packages/s3-credentials-endpoint/package.json index afd835b3765..44730ebc72a 100644 --- a/packages/s3-credentials-endpoint/package.json +++ b/packages/s3-credentials-endpoint/package.json @@ -4,7 +4,7 @@ "description": "An API Gateway Lambda to return AWS credentials for fetching objects from S3", "license": "Apache-2.0", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "build": "../../node_modules/.bin/webpack && (cd dist && rm -f lambda.zip && node ../../../bin/zip.js lambda.zip index.js)", diff --git a/packages/schemas/package.json b/packages/schemas/package.json index 5362173e256..8ec4859cbfe 100644 --- a/packages/schemas/package.json +++ b/packages/schemas/package.json @@ -8,7 +8,7 @@ "url": "https://github.com/nasa/cumulus" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/sftp-client/package.json b/packages/sftp-client/package.json index 9fb89b25a9f..e34a0cb006b 100644 --- a/packages/sftp-client/package.json +++ b/packages/sftp-client/package.json @@ -8,7 +8,7 @@ "NASA" ], "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "publishConfig": { "access": "public" diff --git a/packages/tea-map-cache/package.json b/packages/tea-map-cache/package.json index 805815c54df..fc318ab3694 100644 --- a/packages/tea-map-cache/package.json +++ b/packages/tea-map-cache/package.json @@ -4,7 +4,7 @@ "description": "Tea Bucket Map Cache Writer", "main": "index.js", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "clean": "git clean -d -x -e node_modules -f", diff --git a/packages/test-data/package.json b/packages/test-data/package.json index f5fa69010e3..6ac135b39c5 100644 --- a/packages/test-data/package.json +++ b/packages/test-data/package.json @@ -24,7 +24,7 @@ "url": "https://github.com/nasa/cumulus" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "author": "Cumulus Authors", "license": "Apache-2.0" diff --git a/packages/tf-inventory/package.json b/packages/tf-inventory/package.json index 325e03ab3b1..11a8970b2bf 100644 --- a/packages/tf-inventory/package.json +++ b/packages/tf-inventory/package.json @@ -4,7 +4,7 @@ "description": "Package to help keep track of what resources are managed by Terraform in the AWS account", "main": "index.js", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "bin": { "tf-inventory": "./bin/cli.js" diff --git a/packages/types/package.json b/packages/types/package.json index 016735daf77..f0825c0267c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -9,7 +9,7 @@ ], "types": "./index.d.ts", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "publishConfig": { "access": "public" diff --git a/tasks/add-missing-file-checksums/package.json b/tasks/add-missing-file-checksums/package.json index 9bada6ae132..b712703ec19 100644 --- a/tasks/add-missing-file-checksums/package.json +++ b/tasks/add-missing-file-checksums/package.json @@ -12,7 +12,7 @@ "directory": "tasks/add-missing-file-checksums" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "main": "dist/index.js", "directories": { @@ -45,7 +45,7 @@ }, "dependencies": { "@cumulus/aws-client": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5" + "@cumulus/cumulus-message-adapter-js": "2.2.0" }, "devDependencies": { "@cumulus/schemas": "18.2.0", diff --git a/tasks/discover-granules/.babelrc b/tasks/discover-granules/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/tasks/discover-granules/.babelrc +++ b/tasks/discover-granules/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/tasks/discover-granules/package.json b/tasks/discover-granules/package.json index be32ad0042f..e5992313f6a 100644 --- a/tasks/discover-granules/package.json +++ b/tasks/discover-granules/package.json @@ -13,7 +13,7 @@ "directory": "tasks/discover-granules" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "build": "rm -rf dist && mkdir dist && cp -R schemas dist/ && ../../node_modules/.bin/webpack", @@ -39,7 +39,7 @@ "license": "Apache-2.0", "dependencies": { "@cumulus/api-client": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/ingest": "18.2.0", "@cumulus/logger": "18.2.0", "got": "^11.8.5", diff --git a/tasks/discover-pdrs/.babelrc b/tasks/discover-pdrs/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/tasks/discover-pdrs/.babelrc +++ b/tasks/discover-pdrs/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/tasks/discover-pdrs/package.json b/tasks/discover-pdrs/package.json index 5ed65c21bc3..5f95d856f67 100644 --- a/tasks/discover-pdrs/package.json +++ b/tasks/discover-pdrs/package.json @@ -13,7 +13,7 @@ "directory": "tasks/discover-pdrs" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "build": "rm -rf dist && mkdir dist && cp -R schemas dist/ && ../../node_modules/.bin/webpack", @@ -38,7 +38,7 @@ "license": "Apache-2.0", "dependencies": { "@cumulus/aws-client": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/ingest": "18.2.0", "lodash": "^4.17.21", "p-filter": "^2.1.0" diff --git a/tasks/files-to-granules/.babelrc b/tasks/files-to-granules/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/tasks/files-to-granules/.babelrc +++ b/tasks/files-to-granules/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/tasks/files-to-granules/package.json b/tasks/files-to-granules/package.json index 730fe38006f..1788358877f 100644 --- a/tasks/files-to-granules/package.json +++ b/tasks/files-to-granules/package.json @@ -26,7 +26,7 @@ "coverage": "python ../../scripts/coverage_handler/coverage.py" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "ava": { "timeout": "15m", @@ -36,7 +36,7 @@ "license": "Apache-2.0", "dependencies": { "@cumulus/aws-client": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "lodash": "^4.17.21" }, "devDependencies": { diff --git a/tasks/hello-world/.babelrc b/tasks/hello-world/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/tasks/hello-world/.babelrc +++ b/tasks/hello-world/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/tasks/hello-world/package.json b/tasks/hello-world/package.json index 2f70338d71d..f00804f3c11 100644 --- a/tasks/hello-world/package.json +++ b/tasks/hello-world/package.json @@ -13,7 +13,7 @@ "directory": "tasks/hello-world" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "build": "rm -rf dist && mkdir dist && cp -R schemas dist/ && ../../node_modules/.bin/webpack", @@ -37,6 +37,6 @@ "dependencies": { "@cumulus/aws-client": "18.2.0", "@cumulus/common": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5" + "@cumulus/cumulus-message-adapter-js": "2.2.0" } } diff --git a/tasks/hyrax-metadata-updates/.babelrc b/tasks/hyrax-metadata-updates/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/tasks/hyrax-metadata-updates/.babelrc +++ b/tasks/hyrax-metadata-updates/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/tasks/hyrax-metadata-updates/package.json b/tasks/hyrax-metadata-updates/package.json index afab3d86af9..a0e5f013564 100644 --- a/tasks/hyrax-metadata-updates/package.json +++ b/tasks/hyrax-metadata-updates/package.json @@ -16,7 +16,7 @@ "access": "public" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "generate-task-schemas": "npx generate-task-schemas . files", @@ -44,11 +44,10 @@ "@cumulus/cmr-client": "18.2.0", "@cumulus/cmrjs": "18.2.0", "@cumulus/common": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/errors": "18.2.0", - "libxmljs": "^0.19.7", "lodash": "^4.17.21", - "xml2js": "0.5.0" + "xml2js": "0.6.2" }, "devDependencies": { "@cumulus/schemas": "18.2.0", diff --git a/tasks/lzards-backup/package.json b/tasks/lzards-backup/package.json index 811dc7bbb8b..86b34edd314 100644 --- a/tasks/lzards-backup/package.json +++ b/tasks/lzards-backup/package.json @@ -12,7 +12,7 @@ "directory": "tasks/lzards-backup" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "main": "dist/index.js", "directories": { @@ -47,7 +47,7 @@ "@cumulus/api-client": "18.2.0", "@cumulus/aws-client": "18.2.0", "@cumulus/common": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/db": "18.2.0", "@cumulus/distribution-utils": "18.2.0", "@cumulus/launchpad-auth": "18.2.0", diff --git a/tasks/move-granules/.babelrc b/tasks/move-granules/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/tasks/move-granules/.babelrc +++ b/tasks/move-granules/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/tasks/move-granules/package.json b/tasks/move-granules/package.json index 4380d728b68..76cdeaacbf0 100644 --- a/tasks/move-granules/package.json +++ b/tasks/move-granules/package.json @@ -16,7 +16,7 @@ "access": "public" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "generate-task-schemas": "npx generate-task-schemas . files", @@ -43,7 +43,7 @@ "@cumulus/aws-client": "18.2.0", "@cumulus/cmrjs": "18.2.0", "@cumulus/common": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/distribution-utils": "18.2.0", "@cumulus/errors": "18.2.0", "@cumulus/ingest": "18.2.0", diff --git a/tasks/orca-copy-to-archive-adapter/package.json b/tasks/orca-copy-to-archive-adapter/package.json index c88382bb252..50788e8c5be 100644 --- a/tasks/orca-copy-to-archive-adapter/package.json +++ b/tasks/orca-copy-to-archive-adapter/package.json @@ -14,7 +14,7 @@ "directory": "orca-copy-to-archive-adapter" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "clean": "rm -rf dist", @@ -41,7 +41,7 @@ "dependencies": { "@cumulus/aws-client": "18.2.0", "@cumulus/common": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/logger": "18.2.0", "lodash": "^4.17.15" }, diff --git a/tasks/orca-recovery-adapter/package.json b/tasks/orca-recovery-adapter/package.json index c31b081d59f..d4cde6b5390 100644 --- a/tasks/orca-recovery-adapter/package.json +++ b/tasks/orca-recovery-adapter/package.json @@ -14,7 +14,7 @@ "directory": "tasks/orca-recovery-adapter" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "clean": "rm -rf dist", @@ -41,7 +41,7 @@ "dependencies": { "@cumulus/aws-client": "18.2.0", "@cumulus/common": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/logger": "18.2.0", "@cumulus/message": "18.2.0", "lodash": "^4.17.15" diff --git a/tasks/parse-pdr/.babelrc b/tasks/parse-pdr/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/tasks/parse-pdr/.babelrc +++ b/tasks/parse-pdr/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/tasks/parse-pdr/package.json b/tasks/parse-pdr/package.json index 9e0df4a4b88..4a7c0733385 100644 --- a/tasks/parse-pdr/package.json +++ b/tasks/parse-pdr/package.json @@ -17,7 +17,7 @@ "access": "public" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "build": "rm -rf dist && mkdir dist && cp -R schemas dist/ && ../../node_modules/.bin/webpack", @@ -37,7 +37,7 @@ "@cumulus/aws-client": "18.2.0", "@cumulus/collection-config-store": "18.2.0", "@cumulus/common": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/errors": "18.2.0", "@cumulus/ingest": "18.2.0", "@cumulus/pvl": "18.2.0", diff --git a/tasks/pdr-status-check/.babelrc b/tasks/pdr-status-check/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/tasks/pdr-status-check/.babelrc +++ b/tasks/pdr-status-check/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/tasks/pdr-status-check/package.json b/tasks/pdr-status-check/package.json index d8ba4fd5e1a..3600c54a431 100644 --- a/tasks/pdr-status-check/package.json +++ b/tasks/pdr-status-check/package.json @@ -10,7 +10,7 @@ "access": "public" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "build": "rm -rf dist && mkdir dist && cp -R schemas dist/ && ../../node_modules/.bin/webpack", @@ -36,7 +36,7 @@ "dependencies": { "@cumulus/aws-client": "18.2.0", "@cumulus/common": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/errors": "18.2.0" } } diff --git a/tasks/post-to-cmr/.babelrc b/tasks/post-to-cmr/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/tasks/post-to-cmr/.babelrc +++ b/tasks/post-to-cmr/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/tasks/post-to-cmr/package.json b/tasks/post-to-cmr/package.json index 9271f4dea42..2a3feafd43c 100644 --- a/tasks/post-to-cmr/package.json +++ b/tasks/post-to-cmr/package.json @@ -16,7 +16,7 @@ "access": "public" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "generate-task-schemas": "npx generate-task-schemas . files", @@ -38,7 +38,7 @@ "@cumulus/aws-client": "18.2.0", "@cumulus/cmrjs": "18.2.0", "@cumulus/common": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/errors": "18.2.0", "@cumulus/launchpad-auth": "18.2.0", "lodash": "^4.17.21" diff --git a/tasks/queue-granules/package.json b/tasks/queue-granules/package.json index 276cfb8a8d2..60a46dedf62 100644 --- a/tasks/queue-granules/package.json +++ b/tasks/queue-granules/package.json @@ -16,7 +16,7 @@ "access": "public" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "clean": "rm -rf dist", @@ -47,7 +47,7 @@ "@cumulus/api-client": "18.2.0", "@cumulus/aws-client": "18.2.0", "@cumulus/common": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/ingest": "18.2.0", "@cumulus/message": "18.2.0", "lodash": "^4.17.21", diff --git a/tasks/queue-pdrs/.babelrc b/tasks/queue-pdrs/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/tasks/queue-pdrs/.babelrc +++ b/tasks/queue-pdrs/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/tasks/queue-pdrs/package.json b/tasks/queue-pdrs/package.json index 378bad6e72f..7fa7a598c77 100644 --- a/tasks/queue-pdrs/package.json +++ b/tasks/queue-pdrs/package.json @@ -16,7 +16,7 @@ "access": "public" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "build": "rm -rf dist && mkdir dist && cp -R schemas dist/ && ../../node_modules/.bin/webpack", @@ -36,7 +36,7 @@ "dependencies": { "@cumulus/aws-client": "18.2.0", "@cumulus/common": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/ingest": "18.2.0", "@cumulus/message": "18.2.0", "lodash": "^4.17.21" diff --git a/tasks/queue-workflow/.babelrc b/tasks/queue-workflow/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/tasks/queue-workflow/.babelrc +++ b/tasks/queue-workflow/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/tasks/queue-workflow/package.json b/tasks/queue-workflow/package.json index bb8048f89f8..71f906407fa 100644 --- a/tasks/queue-workflow/package.json +++ b/tasks/queue-workflow/package.json @@ -16,7 +16,7 @@ "access": "public" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "build": "rm -rf dist && mkdir dist && cp -R schemas dist/ && ../../node_modules/.bin/webpack", @@ -36,7 +36,7 @@ "dependencies": { "@cumulus/aws-client": "18.2.0", "@cumulus/common": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/ingest": "18.2.0", "@cumulus/message": "18.2.0", "lodash": "^4.17.21" diff --git a/tasks/send-pan/package.json b/tasks/send-pan/package.json index 853b0ff777a..257a80a6c53 100644 --- a/tasks/send-pan/package.json +++ b/tasks/send-pan/package.json @@ -14,7 +14,7 @@ "directory": "tasks/send-pan" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "clean": "rm -rf dist", @@ -41,7 +41,7 @@ "dependencies": { "@cumulus/api": "18.2.0", "@cumulus/common": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/ingest": "18.2.0", "@cumulus/logger": "18.2.0", "got": "^11.8.5" diff --git a/tasks/send-pan/tests/index.js b/tasks/send-pan/tests/index.js index 3c1d4a77804..7e1d9716f55 100644 --- a/tasks/send-pan/tests/index.js +++ b/tasks/send-pan/tests/index.js @@ -1,7 +1,6 @@ 'use strict'; const test = require('ava'); -const nock = require('nock'); const path = require('path'); const urljoin = require('url-join'); const { randomId, validateInput, validateConfig, validateOutput } = require('@cumulus/common/test-utils'); @@ -25,17 +24,19 @@ test.after.always(async (t) => await Promise.all([ test('SendPan task calls upload', async (t) => { const fileNameBase = 'test-uploadcall-pdr'; + const port = 3030; const event = { config: { provider: { id: randomId('provideId'), globalConnectionLimit: 5, - host: 'some-host.org', + host: 'localhost', + port, protocol: 'http', createdAt: 1676325180635, updatedAt: 1677776213600, }, - remoteDir: 'some-remote-dir', + remoteDir: 'post_test', }, input: { pdr: { @@ -45,21 +46,18 @@ test('SendPan task calls upload', async (t) => { }, }; - const url = `http://${event.config.provider.host}`; - const remotePath = path.join('/', event.config.remoteDir, `${fileNameBase}.pan`); + const url = `http://${event.config.provider.host}:${port}`; + const remotePath = path.join(event.config.remoteDir, `${fileNameBase}.pan`); // Message should look like this: // MESSAGE_TYPE = "SHORTPAN"; // DISPOSITION = "SUCCESSFUL"; // TIME_STAMP = 2023-03-27T18:10:56.402Z; - nock(url).post(remotePath, regex) - .reply(200); await validateInput(t, event.input); await validateConfig(t, event.config); const output = await sendPAN(event); await validateOutput(t, output); - t.true(nock.isDone()); t.is(output.pan.uri, urljoin(url, remotePath)); }); diff --git a/tasks/sf-sqs-report/.babelrc b/tasks/sf-sqs-report/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/tasks/sf-sqs-report/.babelrc +++ b/tasks/sf-sqs-report/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/tasks/sf-sqs-report/package.json b/tasks/sf-sqs-report/package.json index 0368300c1b1..9f591d149a5 100644 --- a/tasks/sf-sqs-report/package.json +++ b/tasks/sf-sqs-report/package.json @@ -16,7 +16,7 @@ "access": "public" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "build-lambda-zips": "(cd dist && rm -f lambda.zip && node ../../../bin/zip.js lambda.zip index.js)", @@ -36,7 +36,7 @@ "license": "Apache-2.0", "dependencies": { "@cumulus/aws-client": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "lodash": "^4.17.21" }, "devDependencies": { diff --git a/tasks/sync-granule/.babelrc b/tasks/sync-granule/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/tasks/sync-granule/.babelrc +++ b/tasks/sync-granule/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/tasks/sync-granule/package.json b/tasks/sync-granule/package.json index a38a6b05d20..443363a0404 100644 --- a/tasks/sync-granule/package.json +++ b/tasks/sync-granule/package.json @@ -16,7 +16,7 @@ "access": "public" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "generate-task-schemas": "npx generate-task-schemas . files", @@ -42,7 +42,7 @@ "@cumulus/aws-client": "18.2.0", "@cumulus/collection-config-store": "18.2.0", "@cumulus/common": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/errors": "18.2.0", "@cumulus/ingest": "18.2.0", "@cumulus/message": "18.2.0", diff --git a/tasks/test-processing/.babelrc b/tasks/test-processing/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/tasks/test-processing/.babelrc +++ b/tasks/test-processing/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/tasks/test-processing/package.json b/tasks/test-processing/package.json index 396d0b02415..2f01bf7f0f0 100644 --- a/tasks/test-processing/package.json +++ b/tasks/test-processing/package.json @@ -10,7 +10,7 @@ "directory": "tasks/test-processing" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "build": "../../node_modules/.bin/webpack", @@ -22,7 +22,7 @@ "license": "Apache-2.0", "dependencies": { "@cumulus/aws-client": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/integration-tests": "18.2.0" } } diff --git a/tasks/update-cmr-access-constraints/package.json b/tasks/update-cmr-access-constraints/package.json index be7e4f7c74b..43c860390f9 100644 --- a/tasks/update-cmr-access-constraints/package.json +++ b/tasks/update-cmr-access-constraints/package.json @@ -12,7 +12,7 @@ "directory": "tasks/update-cmr-access-constraints" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "main": "index.js", "directories": { @@ -38,7 +38,7 @@ "dependencies": { "@cumulus/aws-client": "18.2.0", "@cumulus/cmrjs": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "lodash": "^4.17.5" }, "devDependencies": { diff --git a/tasks/update-granules-cmr-metadata-file-links/.babelrc b/tasks/update-granules-cmr-metadata-file-links/.babelrc index 47e6906adb1..1e3ca31c340 100644 --- a/tasks/update-granules-cmr-metadata-file-links/.babelrc +++ b/tasks/update-granules-cmr-metadata-file-links/.babelrc @@ -5,7 +5,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "node": "16.19.0" + "node": "20.12.2" } }] ], diff --git a/tasks/update-granules-cmr-metadata-file-links/package.json b/tasks/update-granules-cmr-metadata-file-links/package.json index af6b4e30385..b04b3a53dd5 100644 --- a/tasks/update-granules-cmr-metadata-file-links/package.json +++ b/tasks/update-granules-cmr-metadata-file-links/package.json @@ -16,7 +16,7 @@ "access": "public" }, "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "generate-task-schemas": "npx generate-task-schemas . files", @@ -41,7 +41,7 @@ "dependencies": { "@cumulus/cmrjs": "18.2.0", "@cumulus/common": "18.2.0", - "@cumulus/cumulus-message-adapter-js": "2.0.5", + "@cumulus/cumulus-message-adapter-js": "2.2.0", "@cumulus/distribution-utils": "18.2.0", "lodash": "^4.17.15" }, diff --git a/tf-modules/archive/api.tf b/tf-modules/archive/api.tf index 06464aa7543..2e27fe85885 100644 --- a/tf-modules/archive/api.tf +++ b/tf-modules/archive/api.tf @@ -148,7 +148,7 @@ resource "aws_lambda_function" "private_api" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/app/lambda.zip") handler = "index.handler" role = aws_iam_role.lambda_api_gateway.arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "PrivateApiLambda", 100) environment { variables = merge(local.api_env_variables, {"auth_mode"="private"}) @@ -173,7 +173,7 @@ resource "aws_lambda_function" "api" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/app/lambda.zip") handler = "index.handler" role = aws_iam_role.lambda_api_gateway.arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "ApiEndpoints", 100) environment { variables = merge(local.api_env_variables, {"auth_mode"="public"}) diff --git a/tf-modules/archive/bootstrap.tf b/tf-modules/archive/bootstrap.tf index 96de70e23da..00468fe6d19 100644 --- a/tf-modules/archive/bootstrap.tf +++ b/tf-modules/archive/bootstrap.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "custom_bootstrap" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/bootstrap/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "CustomBootstrap", 300) memory_size = lookup(var.lambda_memory_sizes, "CustomBootstrap", 512) environment { diff --git a/tf-modules/archive/bulk_operation.tf b/tf-modules/archive/bulk_operation.tf index b25e96938f7..989c675b23b 100644 --- a/tf-modules/archive/bulk_operation.tf +++ b/tf-modules/archive/bulk_operation.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "bulk_operation" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/bulkOperation/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "bulkOperation", 300) memory_size = lookup(var.lambda_memory_sizes, "bulkOperation", 512) environment { diff --git a/tf-modules/archive/clean_executions.tf b/tf-modules/archive/clean_executions.tf index 7aa4d47f5e1..8fa40a9cff6 100644 --- a/tf-modules/archive/clean_executions.tf +++ b/tf-modules/archive/clean_executions.tf @@ -13,7 +13,7 @@ resource "aws_lambda_function" "clean_executions" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/cleanExecutions/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "cleanExecutions", 900) memory_size = lookup(var.lambda_memory_sizes, "cleanExecutions", 512) dead_letter_config { diff --git a/tf-modules/archive/index_from_database.tf b/tf-modules/archive/index_from_database.tf index 42eab03df83..61138dd4664 100644 --- a/tf-modules/archive/index_from_database.tf +++ b/tf-modules/archive/index_from_database.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "index_from_database" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/indexFromDatabase/lambda.zip") handler = "index.handler" role = aws_iam_role.index_from_database.arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "IndexFromDatabase", 300) memory_size = lookup(var.lambda_memory_sizes, "IndexFromDatabase", 512) environment { diff --git a/tf-modules/archive/process_dead_letter_archive.tf b/tf-modules/archive/process_dead_letter_archive.tf index 4a1598c5d1e..4c6b198f655 100644 --- a/tf-modules/archive/process_dead_letter_archive.tf +++ b/tf-modules/archive/process_dead_letter_archive.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "process_dead_letter_archive" { function_name = "${var.prefix}-processDeadLetterArchive" role = var.lambda_processing_role_arn handler = "index.handler" - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "processDeadLetterArchive", 300) memory_size = lookup(var.lambda_memory_sizes, "processDeadLetterArchive", 512) diff --git a/tf-modules/archive/reconciliation_report.tf b/tf-modules/archive/reconciliation_report.tf index dc118c6544d..36089d77949 100644 --- a/tf-modules/archive/reconciliation_report.tf +++ b/tf-modules/archive/reconciliation_report.tf @@ -6,7 +6,7 @@ resource "aws_lambda_function" "create_reconciliation_report" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/createReconciliationReport/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "CreateReconciliationReport", 300) memory_size = lookup(var.lambda_memory_sizes, "CreateReconciliationReport", 512) environment { diff --git a/tf-modules/archive/replay_sqs_messages.tf b/tf-modules/archive/replay_sqs_messages.tf index a8f55e92b7d..b75a3497681 100644 --- a/tf-modules/archive/replay_sqs_messages.tf +++ b/tf-modules/archive/replay_sqs_messages.tf @@ -57,7 +57,7 @@ resource "aws_lambda_function" "replay_sqs_messages" { function_name = "${var.prefix}-replaySqsMessages" role = aws_iam_role.replay_sqs_messages_role.arn handler = "index.handler" - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "replaySqsMessages", 300) memory_size = lookup(var.lambda_memory_sizes, "replaySqsMessages", 512) diff --git a/tf-modules/archive/sf_event_sqs_to_db_records.tf b/tf-modules/archive/sf_event_sqs_to_db_records.tf index d3d52eeccb6..331beeaabae 100644 --- a/tf-modules/archive/sf_event_sqs_to_db_records.tf +++ b/tf-modules/archive/sf_event_sqs_to_db_records.tf @@ -171,7 +171,7 @@ resource "aws_lambda_function" "sf_event_sqs_to_db_records" { function_name = "${var.prefix}-sfEventSqsToDbRecords" role = aws_iam_role.sf_event_sqs_to_db_records_lambda.arn handler = "index.handler" - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = local.sf_event_sqs_lambda_timeout memory_size = lookup(var.lambda_memory_sizes, "sfEventSqsToDbRecords", 1024) @@ -218,7 +218,7 @@ resource "aws_lambda_function" "write_db_dlq_records_to_s3" { function_name = "${var.prefix}-writeDbRecordsDLQtoS3" role = aws_iam_role.sf_event_sqs_to_db_records_lambda.arn handler = "index.handler" - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = local.sf_event_sqs_lambda_timeout memory_size = lookup(var.lambda_memory_sizes, "writeDbRecordsDLQtoS3", 512) diff --git a/tf-modules/archive/start_async_operation_lambda.tf b/tf-modules/archive/start_async_operation_lambda.tf index 8a06b67fb2d..498491e231b 100644 --- a/tf-modules/archive/start_async_operation_lambda.tf +++ b/tf-modules/archive/start_async_operation_lambda.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "start_async_operation" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/startAsyncOperation/lambda.zip") handler = "index.handler" role = aws_iam_role.start_async_operation.arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "StartAsyncOperation", 300) memory_size = lookup(var.lambda_memory_sizes, "StartAsyncOperation", 960) environment { diff --git a/tf-modules/cumulus_distribution/api.tf b/tf-modules/cumulus_distribution/api.tf index 622087cd9cb..620e483bebc 100644 --- a/tf-modules/cumulus_distribution/api.tf +++ b/tf-modules/cumulus_distribution/api.tf @@ -46,7 +46,7 @@ resource "aws_lambda_function" "api" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/distribution/lambda.zip") handler = "index.handler" role = aws_iam_role.lambda_distribution_api_gateway.arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "DistributionApiEndpoints", 100) environment { variables = local.api_env_variables diff --git a/tf-modules/distribution/main.tf b/tf-modules/distribution/main.tf index b6840046e92..eb901f6a49f 100644 --- a/tf-modules/distribution/main.tf +++ b/tf-modules/distribution/main.tf @@ -138,7 +138,7 @@ resource "aws_lambda_function" "s3_credentials" { source_code_hash = filebase64sha256(local.lambda_source_file) handler = "index.handler" role = aws_iam_role.s3_credentials_lambda[0].arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "s3-credentials-endpoint", 100) memory_size = lookup(var.lambda_memory_sizes, "s3-credentials-endpoint", 512) diff --git a/tf-modules/ingest/add-missing-file-checksums.tf b/tf-modules/ingest/add-missing-file-checksums.tf index 52c7bcfca9c..89178d40215 100644 --- a/tf-modules/ingest/add-missing-file-checksums.tf +++ b/tf-modules/ingest/add-missing-file-checksums.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "add_missing_file_checksums_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/add-missing-file-checksums/dist/webpack/lambda.zip") handler = "index.cmaHandler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "AddMissingFileChecksums", 300) memory_size = lookup(var.lambda_memory_sizes, "AddMissingFileChecksums", 512) diff --git a/tf-modules/ingest/discover-granules-task.tf b/tf-modules/ingest/discover-granules-task.tf index 97919de6efb..6338a559119 100644 --- a/tf-modules/ingest/discover-granules-task.tf +++ b/tf-modules/ingest/discover-granules-task.tf @@ -5,7 +5,7 @@ resource "aws_lambda_function" "discover_granules_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/discover-granules/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "DiscoverGranules", 300) memory_size = lookup(var.lambda_memory_sizes, "DiscoverGranules", 1024) diff --git a/tf-modules/ingest/discover-pdrs-task.tf b/tf-modules/ingest/discover-pdrs-task.tf index 9a95b5a1103..05b5f4d0927 100644 --- a/tf-modules/ingest/discover-pdrs-task.tf +++ b/tf-modules/ingest/discover-pdrs-task.tf @@ -5,7 +5,7 @@ resource "aws_lambda_function" "discover_pdrs_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/discover-pdrs/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "DiscoverPdrs", 300) memory_size = lookup(var.lambda_memory_sizes, "DiscoverPdrs", 1024) diff --git a/tf-modules/ingest/fake-processing-task.tf b/tf-modules/ingest/fake-processing-task.tf index 0f4b77f54fe..b1cd826b969 100644 --- a/tf-modules/ingest/fake-processing-task.tf +++ b/tf-modules/ingest/fake-processing-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "fake_processing_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/test-processing/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "FakeProcessing", 300) memory_size = lookup(var.lambda_memory_sizes, "FakeProcessing", 1024) diff --git a/tf-modules/ingest/files-to-granules-task.tf b/tf-modules/ingest/files-to-granules-task.tf index 5b2a1aa0031..d6b9a51295f 100644 --- a/tf-modules/ingest/files-to-granules-task.tf +++ b/tf-modules/ingest/files-to-granules-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "files_to_granules_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/files-to-granules/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "FilesToGranules", 300) memory_size = lookup(var.lambda_memory_sizes, "FilesToGranules", 1024) diff --git a/tf-modules/ingest/hello-world-task.tf b/tf-modules/ingest/hello-world-task.tf index 28cb50bf5e3..f45fa09e201 100644 --- a/tf-modules/ingest/hello-world-task.tf +++ b/tf-modules/ingest/hello-world-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "hello_world_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/hello-world/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "HelloWorld", 300) memory_size = lookup(var.lambda_memory_sizes, "HelloWorld", 512) diff --git a/tf-modules/ingest/hyrax-metadata-updates-task.tf b/tf-modules/ingest/hyrax-metadata-updates-task.tf index fbfe7eebe9d..373ca6817f4 100644 --- a/tf-modules/ingest/hyrax-metadata-updates-task.tf +++ b/tf-modules/ingest/hyrax-metadata-updates-task.tf @@ -5,7 +5,7 @@ resource "aws_lambda_function" "hyrax_metadata_updates_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/hyrax-metadata-updates/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "HyraxMetadataUpdates", 300) memory_size = lookup(var.lambda_memory_sizes, "HyraxMetadataUpdates", 512) diff --git a/tf-modules/ingest/lambda-functions.tf b/tf-modules/ingest/lambda-functions.tf index a30b85e006e..91755dbed4a 100644 --- a/tf-modules/ingest/lambda-functions.tf +++ b/tf-modules/ingest/lambda-functions.tf @@ -11,7 +11,7 @@ resource "aws_lambda_function" "fallback_consumer" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/messageConsumer/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "fallbackConsumer", 100) memory_size = lookup(var.lambda_memory_sizes, "fallbackConsumer", 512) dead_letter_config { @@ -42,7 +42,7 @@ resource "aws_lambda_function" "kinesis_inbound_event_logger" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/payloadLogger/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "KinesisInboundEventLogger", 300) memory_size = lookup(var.lambda_memory_sizes, "KinesisInboundEventLogger", 512) environment { @@ -69,7 +69,7 @@ resource "aws_lambda_function" "kinesis_outbound_event_logger" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/payloadLogger/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "KinesisOutboundEventLogger", 300) memory_size = lookup(var.lambda_memory_sizes, "KinesisOutboundEventLogger", 512) environment { @@ -96,7 +96,7 @@ resource "aws_lambda_function" "manual_consumer" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/manualConsumer/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "manualConsumer", 100) memory_size = lookup(var.lambda_memory_sizes, "manualConsumer", 512) environment { @@ -126,7 +126,7 @@ resource "aws_lambda_function" "message_consumer" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/messageConsumer/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "messageConsumer", 300) memory_size = lookup(var.lambda_memory_sizes, "messageConsumer", 512) environment { @@ -157,7 +157,7 @@ resource "aws_lambda_function" "schedule_sf" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/sfScheduler/lambda.zip") handler = "index.handleScheduleEvent" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "ScheduleSF", 100) memory_size = lookup(var.lambda_memory_sizes, "ScheduleSF", 512) dead_letter_config { @@ -188,7 +188,7 @@ resource "aws_lambda_function" "sf_semaphore_down" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/sfSemaphoreDown/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "sfSemaphoreDown", 100) memory_size = lookup(var.lambda_memory_sizes, "sfSemaphoreDown", 512) environment { @@ -216,7 +216,7 @@ resource "aws_lambda_function" "sf_sqs_report_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/sf-sqs-report/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "SfSqsReport", 300) memory_size = lookup(var.lambda_memory_sizes, "SfSqsReport", 512) @@ -248,7 +248,7 @@ resource "aws_lambda_function" "sqs2sf" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/sfStarter/lambda.zip") handler = "index.sqs2sfEventSourceHandler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "sqs2sf", local.sqs2sf_timeout) memory_size = lookup(var.lambda_memory_sizes, "sqs2sf", 512) environment { @@ -275,7 +275,7 @@ resource "aws_lambda_function" "sqs2sfThrottle" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/sfStarter/lambda.zip") handler = "index.sqs2sfThrottleHandler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "sqs2sfThrottle", 200) memory_size = lookup(var.lambda_memory_sizes, "sqs2sfThrottle", 512) environment { @@ -304,7 +304,7 @@ resource "aws_lambda_function" "sqs_message_consumer" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/sqsMessageConsumer/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "sqsMessageConsumer", 100) memory_size = lookup(var.lambda_memory_sizes, "sqsMessageConsumer", 512) environment { diff --git a/tf-modules/ingest/lzards-backup-task.tf b/tf-modules/ingest/lzards-backup-task.tf index 9c255b55cce..3f1e8722371 100644 --- a/tf-modules/ingest/lzards-backup-task.tf +++ b/tf-modules/ingest/lzards-backup-task.tf @@ -5,7 +5,7 @@ resource "aws_lambda_function" "lzards_backup_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/lzards-backup/dist/webpack/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "LzardsBackup", 900) memory_size = lookup(var.lambda_memory_sizes, "LzardsBackup", 512) diff --git a/tf-modules/ingest/move-granules-task.tf b/tf-modules/ingest/move-granules-task.tf index 7b5b7958a5c..58025adf2cc 100644 --- a/tf-modules/ingest/move-granules-task.tf +++ b/tf-modules/ingest/move-granules-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "move_granules_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/move-granules/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "MoveGranules", 300) memory_size = lookup(var.lambda_memory_sizes, "MoveGranules", 1024) diff --git a/tf-modules/ingest/orca-copy-to-archive-adapter.tf b/tf-modules/ingest/orca-copy-to-archive-adapter.tf index 15bb88d4995..2ccd163217a 100644 --- a/tf-modules/ingest/orca-copy-to-archive-adapter.tf +++ b/tf-modules/ingest/orca-copy-to-archive-adapter.tf @@ -5,7 +5,7 @@ resource "aws_lambda_function" "orca_copy_to_archive_adapter_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/orca-copy-to-archive-adapter/dist/webpack/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "OrcaCopyToArchiveAdapter", 300) memory_size = lookup(var.lambda_memory_sizes, "OrcaCopyToArchiveAdapter", 512) diff --git a/tf-modules/ingest/orca-recovery-adapter.tf b/tf-modules/ingest/orca-recovery-adapter.tf index 4efd93e32ac..36d78fc6704 100644 --- a/tf-modules/ingest/orca-recovery-adapter.tf +++ b/tf-modules/ingest/orca-recovery-adapter.tf @@ -5,7 +5,7 @@ resource "aws_lambda_function" "orca_recovery_adapter_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/orca-recovery-adapter/dist/webpack/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "OrcaRecoveryAdapter", 300) memory_size = lookup(var.lambda_memory_sizes, "OrcaRecoveryAdapter", 512) diff --git a/tf-modules/ingest/package.json b/tf-modules/ingest/package.json index b1a39cbe437..76add246e2b 100644 --- a/tf-modules/ingest/package.json +++ b/tf-modules/ingest/package.json @@ -3,7 +3,7 @@ "version": "18.2.0", "description": "Terraform module for data ingest related functionality", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "prepublish": "node scripts/write-cumulus-version.js" diff --git a/tf-modules/ingest/parse-pdr-task.tf b/tf-modules/ingest/parse-pdr-task.tf index 64d7a53c4f8..39292e11c4c 100644 --- a/tf-modules/ingest/parse-pdr-task.tf +++ b/tf-modules/ingest/parse-pdr-task.tf @@ -5,7 +5,7 @@ resource "aws_lambda_function" "parse_pdr_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/parse-pdr/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "ParsePdr", 300) memory_size = lookup(var.lambda_memory_sizes, "ParsePdr", 1024) diff --git a/tf-modules/ingest/pdr-status-check-task.tf b/tf-modules/ingest/pdr-status-check-task.tf index ff08ef8fde0..f6ea39d5aaf 100644 --- a/tf-modules/ingest/pdr-status-check-task.tf +++ b/tf-modules/ingest/pdr-status-check-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "pdr_status_check_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/pdr-status-check/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "PdrStatusCheck", 300) memory_size = lookup(var.lambda_memory_sizes, "PdrStatusCheck", 1024) diff --git a/tf-modules/ingest/post-to-cmr-task.tf b/tf-modules/ingest/post-to-cmr-task.tf index 3485dacf7cc..33abae1180b 100644 --- a/tf-modules/ingest/post-to-cmr-task.tf +++ b/tf-modules/ingest/post-to-cmr-task.tf @@ -5,7 +5,7 @@ resource "aws_lambda_function" "post_to_cmr_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/post-to-cmr/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "PostToCmr", 300) memory_size = lookup(var.lambda_memory_sizes, "PostToCmr", 512) diff --git a/tf-modules/ingest/queue-granules-task.tf b/tf-modules/ingest/queue-granules-task.tf index 81fc024e239..5114e9acf97 100644 --- a/tf-modules/ingest/queue-granules-task.tf +++ b/tf-modules/ingest/queue-granules-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "queue_granules_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/queue-granules/dist/webpack/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "QueueGranules", 300) memory_size = lookup(var.lambda_memory_sizes, "QueueGranules", 1024) diff --git a/tf-modules/ingest/queue-pdrs-task.tf b/tf-modules/ingest/queue-pdrs-task.tf index 6bfdca890c5..562a446ad69 100644 --- a/tf-modules/ingest/queue-pdrs-task.tf +++ b/tf-modules/ingest/queue-pdrs-task.tf @@ -5,7 +5,7 @@ resource "aws_lambda_function" "queue_pdrs_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/queue-pdrs/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "QueuePdrs", 300) memory_size = lookup(var.lambda_memory_sizes, "QueuePdrs", 1024) diff --git a/tf-modules/ingest/queue-workflow-task.tf b/tf-modules/ingest/queue-workflow-task.tf index 9858b15120d..93cf1b7d545 100644 --- a/tf-modules/ingest/queue-workflow-task.tf +++ b/tf-modules/ingest/queue-workflow-task.tf @@ -5,7 +5,7 @@ resource "aws_lambda_function" "queue_workflow_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/queue-workflow/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "QueueWorkflow", 300) memory_size = lookup(var.lambda_memory_sizes, "QueueWorkflow", 1024) diff --git a/tf-modules/ingest/send-pan-task.tf b/tf-modules/ingest/send-pan-task.tf index 03bf173c4d6..9f053401e01 100644 --- a/tf-modules/ingest/send-pan-task.tf +++ b/tf-modules/ingest/send-pan-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "send_pan_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/send-pan/dist/webpack/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "SendPan", 300) memory_size = lookup(var.lambda_memory_sizes, "SendPan", 512) diff --git a/tf-modules/ingest/sync-granule-task.tf b/tf-modules/ingest/sync-granule-task.tf index c5f5ab3ee54..39230f65d41 100644 --- a/tf-modules/ingest/sync-granule-task.tf +++ b/tf-modules/ingest/sync-granule-task.tf @@ -5,7 +5,7 @@ resource "aws_lambda_function" "sync_granule_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/sync-granule/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "SyncGranule", 300) memory_size = lookup(var.lambda_memory_sizes, "SyncGranule", 1024) diff --git a/tf-modules/ingest/update-cmr-access-constraints.tf b/tf-modules/ingest/update-cmr-access-constraints.tf index 4f34b8e725b..b8be30dbc67 100644 --- a/tf-modules/ingest/update-cmr-access-constraints.tf +++ b/tf-modules/ingest/update-cmr-access-constraints.tf @@ -5,7 +5,7 @@ resource "aws_lambda_function" "update_cmr_access_constraints_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/update-cmr-access-constraints/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "UpdateCmrAccessConstraints", 300) memory_size = lookup(var.lambda_memory_sizes, "UpdateCmrAccessConstraints", 512) diff --git a/tf-modules/ingest/update-granules-cmr-metadata-file-links-task.tf b/tf-modules/ingest/update-granules-cmr-metadata-file-links-task.tf index 20b85e503db..83e97cd3169 100644 --- a/tf-modules/ingest/update-granules-cmr-metadata-file-links-task.tf +++ b/tf-modules/ingest/update-granules-cmr-metadata-file-links-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "update_granules_cmr_metadata_file_links_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/update-granules-cmr-metadata-file-links/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "UpdateGranulesCmrMetadataFileLinks", 300) memory_size = lookup(var.lambda_memory_sizes, "UpdateGranulesCmrMetadataFileLinks", 1024) diff --git a/tf-modules/internal/cumulus-test-cleanup/main.tf b/tf-modules/internal/cumulus-test-cleanup/main.tf index 448fc361130..99b361033fd 100644 --- a/tf-modules/internal/cumulus-test-cleanup/main.tf +++ b/tf-modules/internal/cumulus-test-cleanup/main.tf @@ -42,7 +42,7 @@ resource "aws_lambda_function" "cumulus_test_cleanup" { function_name = "cumulus-test-cleanup" role = aws_iam_role.test_cleanup_lambda_role.arn handler = "index.handler" - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = 900 source_code_hash = filebase64sha256("${path.module}/dist/lambda.zip") diff --git a/tf-modules/internal/cumulus-test-cleanup/package.json b/tf-modules/internal/cumulus-test-cleanup/package.json index dacc81ff162..7617c600716 100644 --- a/tf-modules/internal/cumulus-test-cleanup/package.json +++ b/tf-modules/internal/cumulus-test-cleanup/package.json @@ -4,7 +4,7 @@ "description": "Nightly cron job for cleaning up integration test artifacts", "main": "index.js", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "build": "rm -rf dist && mkdir dist && ../../../node_modules/.bin/webpack", diff --git a/tf-modules/s3-replicator/main.tf b/tf-modules/s3-replicator/main.tf index b96a26d160e..68a16d8754d 100644 --- a/tf-modules/s3-replicator/main.tf +++ b/tf-modules/s3-replicator/main.tf @@ -37,7 +37,7 @@ resource "aws_lambda_function" "s3_replicator" { function_name = "${var.prefix}-s3-replicator" role = aws_iam_role.replicator_lambda_role.arn handler = "index.handler" - runtime = "nodejs16.x" + runtime = "nodejs20.x" timeout = lookup(var.lambda_timeouts, "s3-replicator", 300) memory_size = lookup(var.lambda_memory_sizes, "s3-replicator", 512) diff --git a/tf-modules/s3-replicator/package.json b/tf-modules/s3-replicator/package.json index 6cd5fdab2be..5c6b9423e58 100644 --- a/tf-modules/s3-replicator/package.json +++ b/tf-modules/s3-replicator/package.json @@ -4,7 +4,7 @@ "description": "Replicate S3 Events to alternate bucket. Solves same-region replication.", "main": "index.js", "engines": { - "node": ">=16.19.0" + "node": ">=20.12.2" }, "scripts": { "clean": "rm -rf dist", diff --git a/tf-modules/tea-map-cache/main.tf b/tf-modules/tea-map-cache/main.tf index dd8b27840dd..44a3a330aef 100644 --- a/tf-modules/tea-map-cache/main.tf +++ b/tf-modules/tea-map-cache/main.tf @@ -27,7 +27,7 @@ resource "aws_lambda_function" "tea_cache" { source_code_hash = filebase64sha256("${path.module}/../../packages/tea-map-cache/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs16.x" + runtime = "nodejs20.x" memory_size = lookup(var.lambda_memory_sizes, "TeaCache", 512) timeout = lookup(var.lambda_timeouts, "TeaCache", 120) environment {