Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate log size #3494

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
325abb9
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Jun 21, 2023
1152057
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Jun 22, 2023
b3f9602
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Jul 11, 2023
475be2e
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Jul 19, 2023
5f7f84d
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Jul 28, 2023
6c74061
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Jul 28, 2023
9124ea1
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Aug 3, 2023
bfd296f
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Aug 8, 2023
e14aa1d
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Aug 9, 2023
8499fa7
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Aug 15, 2023
d51e64b
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Aug 22, 2023
f498183
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Aug 25, 2023
d4ecffc
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Aug 28, 2023
7a63fc4
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Aug 29, 2023
0fe5bb9
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Sep 11, 2023
e62fd8a
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Sep 13, 2023
775d37c
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Oct 3, 2023
0c57598
first commit for 3177
Nnaga1 Oct 3, 2023
6d00bf4
small fix
Nnaga1 Oct 4, 2023
718c3bc
trying to reduce log noise
Oct 16, 2023
c2732eb
test only changes
Oct 16, 2023
cf21e8e
test only changes
Oct 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ Users/clients that do not make use of these endpoints will not be impacted.
- Updated `@cumulus/ingest/lock` to check expired locks based on `provider.maxDownloadTime`

### Changed

- **CUMULUS-3177**
- changed removeFromCmr function for granule bulkDelete to not return and instead catch the error
when the granule is not found in CMR
- updated unit and integration tests to reflect the above changes
- **CUMULUS-3351**
- Updated `constructOnlineAccessUrls()` to group CMR online access URLs by link type.
- **CUMULUS-3392**
Expand Down
4 changes: 1 addition & 3 deletions bamboo/bootstrap-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ export COMPOSE_FILE=./bamboo/docker-compose.yml
## Set container_id for docker compose to use to identify the compose stack per planKey
docker_command="docker exec -t ${container_id}-build_env-1 /bin/bash -c"

docker ps -a

## Setup the compose stack
docker compose -p ${container_id} down
docker compose -p ${container_id} rm -f
docker compose -p ${container_id} up -d
docker compose -p ${container_id} up -d --quiet-pull

docker ps -a
while ! docker container inspect ${container_id}-build_env-1; do
echo 'Waiting for build env to be available';
docker ps -a
Expand Down
1 change: 0 additions & 1 deletion bamboo/cleanup-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ container_id=${container_id/-/}

export COMPOSE_FILE=./bamboo/docker-compose.yml

docker ps -a
docker compose -p ${container_id} down
docker compose -p ${container_id} rm -f
2 changes: 1 addition & 1 deletion bamboo/extract-ts-build-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ fi

echo "***Extracting build cache of compiled TS code"

tar xvf $TS_BUILD_CACHE_FILE
tar -xf $TS_BUILD_CACHE_FILE
2 changes: 1 addition & 1 deletion bamboo/unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ set -ex
docker ps -a ## Show running containers for output logs

docker exec -i ${container_id}-build_env-1 /bin/bash -c "cd $UNIT_TEST_BUILD_DIR && npm run db:local:reset"
docker exec -i ${container_id}-build_env-1 /bin/bash -c "cd $UNIT_TEST_BUILD_DIR && npm run test:coverage"
docker exec -i ${container_id}-build_env-1 /bin/bash -c "cd $UNIT_TEST_BUILD_DIR && npm run test:coverage -- --since master"
docker exec -i ${container_id}-build_env-1 /bin/bash -c "cd $UNIT_TEST_BUILD_DIR && npm run coverage -- --noRerun"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lint-package-json": "npmPkgJsonLint .",
"test": "lerna run --ignore @cumulus/cumulus-integration-tests --concurrency 1 test",
"test:ci": "./scripts/run_ci_unit_coverage.sh",
"test:coverage": "lerna run --ignore @cumulus/cumulus-integration-tests --concurrency 1 test:coverage",
"test:coverage": "lerna run --ignore @cumulus/cumulus-integration-tests --since master --concurrency 1 test:coverage",
"coverage": "lerna run --ignore @cumulus/cumulus-integration-tests --concurrency 1 --since master coverage -- -- ",
"tsc": "lerna run tsc",
"tsc:listEmittedFiles": "lerna run tsc:listEmittedFiles --stream --no-prefix",
Expand Down
12 changes: 9 additions & 3 deletions packages/api/lib/granule-remove-from-cmr.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,25 @@ const { constructCollectionId } = require('@cumulus/message/Collections');
* @private
*/
const _removeGranuleFromCmr = async (granule, collectionId) => {
let metadata = false;
log.info(`granules.removeGranuleFromCmrByGranule granule_id: ${granule.granule_id}, colletion_id: ${collectionId}`);
if (!granule.published || !granule.cmr_link) {
log.warn(`Granule ${granule.granule_id} in Collection ${collectionId} is not published to CMR, so cannot be removed from CMR`);
return;
}

const cmrSettings = await cmrjsCmrUtils.getCmrSettings();
const cmr = new CMR(cmrSettings);
const metadata = await cmr.getGranuleMetadata(granule.cmr_link);
if (granule.cmr_link) {
metadata = await cmr.getGranuleMetadata(granule.cmr_link);
}

// Use granule UR to delete from CMR
if (metadata) {
await cmr.deleteGranule(metadata.title, collectionId);
try {
await cmr.deleteGranule(metadata.title, collectionId);
} catch (error) {
log.warn(`Granule ${granule.granule_id} in Collection ${collectionId} is not published to CMR, so cannot be removed from CMR`);
}
}
};

Expand Down