Skip to content

UAT C1259177827-ASDC_DEV2 (CPF_CERES_N20_INTERCAL_L4) #1026

UAT C1259177827-ASDC_DEV2 (CPF_CERES_N20_INTERCAL_L4)

UAT C1259177827-ASDC_DEV2 (CPF_CERES_N20_INTERCAL_L4) #1026

GitHub Actions / Tested with Harmony failed Nov 11, 2024 in 0s

1 fail in 44s

1 tests  ±0   0 ✅ ±0   44s ⏱️ +14s
1 suites ±0   0 💤 ±0 
1 files   ±0   1 ❌ ±0 

Results for commit 43b348a. ± Comparison against earlier commit d68ae00.

Annotations

Check warning on line 0 in tests.verify_collection

See this annotation in the file changed.

@github-actions github-actions / Tested with Harmony

test_concatenate[C1259177827-ASDC_DEV2] (tests.verify_collection) failed

test-results/test_report.xml [took 42s]
Raw output
AssertionError: assert 1 == 2
 +  where 1 = len(<class 'netCDF4._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 = 'C1259177827-ASDC_DEV2'
harmony_env = <Environment.UAT: 3>
bearer_token = 'eyJ0eXAiOiJKV1QiLCJvcmlnaW4iOiJFYXJ0aGRhdGEgTG9naW4iLCJzaWciOiJlZGxqd3RwdWJrZXlfdWF0IiwiYWxnIjoiUlMyNTYifQ.eyJ0eXBlIj...c6LKcNf4V62gRZ31brDA-4hQMtfEyOzpvQ9hxFnkUEusvI3Y-oYbHVtSa5l7m9KNKjC-lgIvrK7TTs8_80NQDFkGniixoYSbz0AcEjM2fh7TTJfNYzGOCA'

    @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._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,))

tests/verify_collection.py:289: AssertionError
--------------------------------- Captured Log ---------------------------------
INFO     root:verify_collection.py:254 Sending harmony request https://harmony.uat.earthdata.nasa.gov/C1259177827-ASDC_DEV2/ogc-api-coverages/1.0.0/collections/all/coverage/rangeset?forceAsync=true&granuleId=G1259799632-ASDC_DEV2&granuleId=G1259974827-ASDC_DEV2&format=application%2Fx-netcdf4&maxResults=2&concatenate=true&skipPreview=true
INFO     root:verify_collection.py:264 
d0c2c12d-530f-490e-a1a6-e474f064c47c
INFO     root:verify_collection.py:266 {'status': 'running', 'message': 'The job is being processed', 'progress': 0, 'created_at': datetime.datetime(2024, 11, 11, 8, 17, 5, 262000, tzinfo=tzlocal()), 'updated_at': datetime.datetime(2024, 11, 11, 8, 17, 5, 262000, tzinfo=tzlocal()), 'created_at_local': '2024-11-11T08:17:05+00:00', 'updated_at_local': '2024-11-11T08:17:05+00:00', 'request': 'https://harmony.uat.earthdata.nasa.gov/C1259177827-ASDC_DEV2/ogc-api-coverages/1.0.0/collections/all/coverage/rangeset?forceAsync=true&granuleId=G1259799632-ASDC_DEV2%2CG1259974827-ASDC_DEV2&format=application%2Fx-netcdf4&maxResults=2&concatenate=true&skipPreview=true', 'num_input_granules': 2, 'data_expiration': datetime.datetime(2024, 12, 11, 8, 17, 5, 262000, tzinfo=tzlocal()), 'data_expiration_local': '2024-12-11T08:17:05+00:00'}
INFO     root:verify_collection.py:268 
Waiting for the job to finish
INFO     root:verify_collection.py:272 
Downloading results:
INFO     root:verify_collection.py:276 
Done downloading.