UAT C1256946216-ASDC_DEV2 (CLARREO_SIMTEST_L1A) #1130
GitHub Actions / Tested with Harmony
failed
Dec 19, 2024 in 0s
1 fail in 1m 50s
Annotations
Check warning on line 0 in tests.verify_collection
github-actions / Tested with Harmony
test_concatenate[C1256946216-ASDC_DEV2] (tests.verify_collection) failed
test-results/test_report.xml [took 1m 48s]
Raw output
AssertionError: assert 1 == 2
+ where 1 = len(<class 'netCDF4.Variable'>\nvlen subset_files(subset_index)\n long_name: List of subsetted files used to create this merge product.\nvlen data type: <class 'str'>\nunlimited dimensions: \ncurrent shape = (1,))
collection_concept_id = 'C1256946216-ASDC_DEV2'
harmony_env = <Environment.UAT: 3>
bearer_token = 'eyJ0eXAiOiJKV1QiLCJvcmlnaW4iOiJFYXJ0aGRhdGEgTG9naW4iLCJzaWciOiJlZGxqd3RwdWJrZXlfdWF0IiwiYWxnIjoiUlMyNTYifQ.eyJ0eXBlIj...h4aAV-jV1Q6i4c_ze44KyaSwCIzL9HHovpL2Tewr4XYcAXUNC9iy7q3Xdsmz3ZdFI7mnQx4R8SdSoeWgklpUPCEEcOxdm1pVfwZNGVE6OPMxOyhX7nRFtg'
@pytest.mark.timeout(600)
def test_concatenate(collection_concept_id, harmony_env, bearer_token):
max_results = 2
harmony_client = harmony.Client(env=harmony_env, token=bearer_token)
collection = harmony.Collection(id=collection_concept_id)
latest_granule_ids = get_latest_granules(collection_concept_id, max_results, harmony_env, bearer_token)
if latest_granule_ids is None:
if harmony_env == harmony.config.Environment.UAT:
pytest.skip(f"No granules found for UAT collection {collection_concept_id}")
raise Exception('Bad Request', 'Error: No matching granules found.')
request = harmony.Request(
collection=collection,
concatenate=True,
max_results=max_results,
granule_id=latest_granule_ids,
skip_preview=True,
format="application/x-netcdf4",
)
request.is_valid()
logging.info("Sending harmony request %s", harmony_client.request_as_url(request))
try:
job1_id = harmony_client.submit(request)
except Exception as ex:
if str(ex) == "('Bad Request', 'Error: No matching granules found.')":
if harmony_env == harmony.config.Environment.UAT:
pytest.skip(f"No granules found for UAT collection {collection_concept_id}")
raise ex
logging.info(f'\n{job1_id}')
logging.info(harmony_client.status(job1_id))
logging.info('\nWaiting for the job to finish')
results = harmony_client.result_json(job1_id)
logging.info('\nDownloading results:')
futures = harmony_client.download_all(job1_id)
file_names = [f.result() for f in futures]
logging.info('\nDone downloading.')
filename = file_names[0]
# Handle time dimension and variables dropping
merge_dataset = netCDF4.Dataset(filename, 'r')
headers = {
"Authorization": f"Bearer {bearer_token}"
}
original_files = merge_dataset.variables['subset_files']
history_json = json.loads(merge_dataset.history_json)
> assert len(original_files) == max_results
E AssertionError: assert 1 == 2
E + where 1 = len(<class 'netCDF4.Variable'>\nvlen subset_files(subset_index)\n long_name: List of subsetted files used to create this merge product.\nvlen data type: <class 'str'>\nunlimited dimensions: \ncurrent shape = (1,))
verify_collection.py:273: AssertionError
--------------------------------- Captured Log ---------------------------------
INFO root:verify_collection.py:238 Sending harmony request https://harmony.uat.earthdata.nasa.gov/C1256946216-ASDC_DEV2/ogc-api-coverages/1.0.0/collections/parameter_vars/coverage/rangeset?forceAsync=true&granuleId=G1262213008-ASDC_DEV2&granuleId=G1262213002-ASDC_DEV2&format=application%2Fx-netcdf4&maxResults=2&concatenate=true&skipPreview=true&variable=all
INFO root:verify_collection.py:248
f60ba1bc-ad94-4b58-81c6-7bfcf81521ca
INFO root:verify_collection.py:250 {'status': 'running', 'message': 'The job is being processed', 'progress': 9, 'created_at': datetime.datetime(2024, 12, 19, 20, 31, 58, 465000, tzinfo=tzlocal()), 'updated_at': datetime.datetime(2024, 12, 19, 20, 31, 59, 202000, tzinfo=tzlocal()), 'created_at_local': '2024-12-19T20:31:58+00:00', 'updated_at_local': '2024-12-19T20:31:59+00:00', 'request': 'https://harmony.uat.earthdata.nasa.gov/C1256946216-ASDC_DEV2/ogc-api-coverages/1.0.0/collections/parameter_vars/coverage/rangeset?forceAsync=true&granuleId=G1262213008-ASDC_DEV2%2CG1262213002-ASDC_DEV2&format=application%2Fx-netcdf4&maxResults=2&concatenate=true&skipPreview=true&variable=all', 'num_input_granules': 2, 'data_expiration': datetime.datetime(2025, 1, 18, 20, 31, 58, 465000, tzinfo=tzlocal()), 'data_expiration_local': '2025-01-18T20:31:58+00:00'}
INFO root:verify_collection.py:252
Waiting for the job to finish
INFO root:verify_collection.py:256
Downloading results:
INFO root:verify_collection.py:260
Done downloading.
Loading