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

UAT C1259177827-ASDC_DEV2 (CPF_CERES_N20_INTERCAL_L4) #986

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Triggering Autotest Workflow Re-Run

a90350e
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Open

UAT C1259177827-ASDC_DEV2 (CPF_CERES_N20_INTERCAL_L4) #986

Triggering Autotest Workflow Re-Run
a90350e
Select commit
Loading
Failed to load commit list.
GitHub Actions / Tested with Harmony failed Sep 30, 2024 in 0s

1 fail in 32s

1 tests  ±0   0 ✅ ±0   32s ⏱️ -16s
1 suites ±0   0 💤 ±0 
1 files   ±0   1 ❌ ±0 

Results for commit a90350e. ± Comparison against earlier commit da12066.

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 30s]
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...IdabNmCJplKiv8UZ_V3Zm05f1pUhqu2W9dM4eOOh74bzTdWX_4ehyL0BTmA62ucCaqr4SwFVd69MJoSyfH74bYAIJeEGCujbTOXcMreeOQGDwKQODHhxBg'

    @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 
6a2aabf3-9eb7-4255-8acd-1bc88e868523
INFO     root:verify_collection.py:266 {'status': 'running', 'message': 'The job is being processed', 'progress': 0, 'created_at': datetime.datetime(2024, 9, 30, 8, 33, 49, 242000, tzinfo=tzlocal()), 'updated_at': datetime.datetime(2024, 9, 30, 8, 33, 49, 242000, tzinfo=tzlocal()), 'created_at_local': '2024-09-30T08:33:49+00:00', 'updated_at_local': '2024-09-30T08:33:49+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, 10, 30, 8, 33, 49, 242000, tzinfo=tzlocal()), 'data_expiration_local': '2024-10-30T08:33:49+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.