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

OPS C2800153738-LARC (g3baer) #3312

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

Add C2800153738-LARC

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

OPS C2800153738-LARC (g3baer) #3312

Add C2800153738-LARC
54aa84b
Select commit
Loading
Failed to load commit list.
GitHub Actions / Tested with Harmony failed Dec 26, 2024 in 0s

2 fail in 10m 51s

2 tests  ±0   0 ✅ ±0   10m 51s ⏱️ - 8m 15s
1 suites ±0   0 💤 ±0 
1 files   ±0   2 ❌ ±0 

Results for commit 54aa84b. ± Comparison against earlier commit ee28888.

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_spatial_subset[C2800153738-LARC] (tests.verify_collection) failed

test-results/test_report.xml [took 2s]
Raw output
KeyError: 'SpatialExtent'
granule_umm_json = {'meta': {'collection-concept-id': 'C2800153738-LARC', 'concept-id': 'G2969119081-LARC', 'concept-type': 'granule', 'f...pecification': {'Name': 'UMM-G', 'URL': 'https://cdn.earthdata.nasa.gov/umm/granule/v1.6.6', 'Version': '1.6.6'}, ...}}

    def get_bounding_box(granule_umm_json):
        # Find Bounding box for granule
        try:
    
            longitude_list = []
            latitude_list = []
>           polygons = granule_umm_json['umm']['SpatialExtent']['HorizontalSpatialDomain']['Geometry'].get(
                'GPolygons')
E               KeyError: 'SpatialExtent'

verify_collection.py:204: KeyError

During handling of the above exception, another exception occurred:

collection_concept_id = 'C2800153738-LARC', env = 'ops'
granule_json = {'meta': {'collection-concept-id': 'C2800153738-LARC', 'concept-id': 'G2969119081-LARC', 'concept-type': 'granule', 'f...pecification': {'Name': 'UMM-G', 'URL': 'https://cdn.earthdata.nasa.gov/umm/granule/v1.6.6', 'Version': '1.6.6'}, ...}}
collection_variables = [{'associations': {'collections': [{'concept-id': 'C2800153738-LARC'}]}, 'meta': {'association-details': {'collections...escription': 'Extracted from _FillValue metadata attribute', 'Type': 'SCIENCE_FILLVALUE', 'Value': -9999}], ...}}, ...]
harmony_env = <Environment.PROD: 4>
tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_spatial_subset_C2800153730')
bearer_token = 'eyJ0eXAiOiJKV1QiLCJvcmlnaW4iOiJFYXJ0aGRhdGEgTG9naW4iLCJzaWciOiJlZGxqd3RwdWJrZXlfb3BzIiwiYWxnIjoiUlMyNTYifQ.eyJ0eXBlIj...0nlL-K596RCI-k0gbQsTkkjAtWl2o7dAugcj3VuU0Wx3jDeAYyzGA-P2mt852xfkroyDelavsXnCL4W8iyrZudHxVJ4wLhdsH-xJn6npOrQ_-SuR9UtewA'
skip_spatial = set()

    @pytest.mark.timeout(1200)
    def test_spatial_subset(collection_concept_id, env, granule_json, collection_variables,
                            harmony_env, tmp_path: pathlib.Path, bearer_token, skip_spatial):
        test_spatial_subset.__doc__ = f"Verify spatial subset for {collection_concept_id} in {env}"
    
        if collection_concept_id in skip_spatial:
            pytest.skip(f"Known collection to skip for spatial testing {collection_concept_id}")
    
        logging.info("Using granule %s for test", granule_json['meta']['concept-id'])
    
        # Compute a box that is smaller than the granule extent bounding box
>       north, south, east, west = get_bounding_box(granule_json)

verify_collection.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

granule_umm_json = {'meta': {'collection-concept-id': 'C2800153738-LARC', 'concept-id': 'G2969119081-LARC', 'concept-type': 'granule', 'f...pecification': {'Name': 'UMM-G', 'URL': 'https://cdn.earthdata.nasa.gov/umm/granule/v1.6.6', 'Version': '1.6.6'}, ...}}

    def get_bounding_box(granule_umm_json):
        # Find Bounding box for granule
        try:
    
            longitude_list = []
            latitude_list = []
            polygons = granule_umm_json['umm']['SpatialExtent']['HorizontalSpatialDomain']['Geometry'].get(
                'GPolygons')
            lines = granule_umm_json['umm']['SpatialExtent']['HorizontalSpatialDomain']['Geometry'].get('Lines')
            if polygons:
                for polygon in polygons:
                    points = polygon['Boundary']['Points']
                    for point in points:
                        longitude_list.append(point.get('Longitude'))
                        latitude_list.append(point.get('Latitude'))
                    break
            elif lines:
                points = lines[0].get('Points')
                for point in points:
                    longitude_list.append(point.get('Longitude'))
                    latitude_list.append(point.get('Latitude'))
    
            if not longitude_list or not latitude_list:  # Check if either list is empty
                raise ValueError("Empty longitude or latitude list")
    
            north = max(latitude_list)
            south = min(latitude_list)
            west = min(longitude_list)
            east = max(longitude_list)
    
        except (KeyError, ValueError):
    
>           bounding_box = granule_umm_json['umm']['SpatialExtent']['HorizontalSpatialDomain']['Geometry'][
                'BoundingRectangles'][0]
E           KeyError: 'SpatialExtent'

verify_collection.py:230: KeyError
--------------------------------- Captured Log ---------------------------------
INFO     root:verify_collection.py:441 Using granule G2969119081-LARC for test

Check warning on line 0 in tests.verify_collection

See this annotation in the file changed.

@github-actions github-actions / Tested with Harmony

test_temporal_subset[C2800153738-LARC] (tests.verify_collection) failed

test-results/test_report.xml [took 10m 46s]
Raw output
Exception: ('Forbidden', 'Error: You are not authorized to access the requested resource')
collection_concept_id = 'C2800153738-LARC', env = 'ops'
granule_json = {'meta': {'collection-concept-id': 'C2800153738-LARC', 'concept-id': 'G2969119081-LARC', 'concept-type': 'granule', 'f...pecification': {'Name': 'UMM-G', 'URL': 'https://cdn.earthdata.nasa.gov/umm/granule/v1.6.6', 'Version': '1.6.6'}, ...}}
collection_variables = [{'associations': {'collections': [{'concept-id': 'C2800153738-LARC'}]}, 'meta': {'association-details': {'collections...escription': 'Extracted from _FillValue metadata attribute', 'Type': 'SCIENCE_FILLVALUE', 'Value': -9999}], ...}}, ...]
harmony_env = <Environment.PROD: 4>
tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_temporal_subset_C280015370')
bearer_token = 'eyJ0eXAiOiJKV1QiLCJvcmlnaW4iOiJFYXJ0aGRhdGEgTG9naW4iLCJzaWciOiJlZGxqd3RwdWJrZXlfb3BzIiwiYWxnIjoiUlMyNTYifQ.eyJ0eXBlIj...0nlL-K596RCI-k0gbQsTkkjAtWl2o7dAugcj3VuU0Wx3jDeAYyzGA-P2mt852xfkroyDelavsXnCL4W8iyrZudHxVJ4wLhdsH-xJn6npOrQ_-SuR9UtewA'
skip_temporal = {'C2036882456-POCLOUD', 'C2205121315-POCLOUD'}

    @pytest.mark.timeout(1200)
    def test_temporal_subset(collection_concept_id, env, granule_json, collection_variables,
                            harmony_env, tmp_path: pathlib.Path, bearer_token, skip_temporal):
        test_spatial_subset.__doc__ = f"Verify temporal subset for {collection_concept_id} in {env}"
    
        if collection_concept_id in skip_temporal:
            pytest.skip(f"Known collection to skip for temporal testing {collection_concept_id}")
    
        logging.info("Using granule %s for test", granule_json['meta']['concept-id'])
    
        start_time = granule_json['umm']["TemporalExtent"]["RangeDateTime"]["BeginningDateTime"]
        end_time = granule_json['umm']["TemporalExtent"]["RangeDateTime"]["EndingDateTime"]
        temporal_subset = get_half_temporal_extent(start_time, end_time)
    
        # Build harmony request
        harmony_client = harmony.Client(env=harmony_env, token=bearer_token)
        request_collection = harmony.Collection(id=collection_concept_id)
        harmony_request = harmony.Request(collection=request_collection,
                                          granule_id=[granule_json['meta']['concept-id']],
                                          temporal=temporal_subset)
    
        logging.info("Sending harmony request %s", harmony_client.request_as_url(harmony_request))
    
        # Submit harmony request and download result
        job_id = harmony_client.submit(harmony_request)
        logging.info("Submitted harmony job %s", job_id)
    
>       harmony_client.wait_for_processing(job_id, show_progress=False)

verify_collection.py:591: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../../.cache/pypoetry/virtualenvs/l2ss-py-autotest-iYz8Sff2-py3.10/lib/python3.10/site-packages/harmony/harmony.py:1144: in wait_for_processing
    progress, status, message = self.progress(job_id)
../../../../.cache/pypoetry/virtualenvs/l2ss-py-autotest-iYz8Sff2-py3.10/lib/python3.10/site-packages/harmony/harmony.py:1091: in progress
    self._handle_error_response(response)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <harmony.harmony.Client object at 0x7efc341e2fe0>
response = <Response [403]>

    def _handle_error_response(self, response: Response):
        """Raises the appropriate exception based on the response
        received from Harmony. Tries to pull out an error message
        from a Harmony JSON response when possible.
    
        Args:
            response: The Response from Harmony
    
        Raises:
            Exception with a Harmony error message or a more generic
            HTTPError
        """
        if 'application/json' in response.headers.get('Content-Type', ''):
            exception_message = None
            try:
                response_json = response.json()
                if hasattr(response_json, 'get'):
                    exception_message = response_json.get('description')
                    if not exception_message:
                        exception_message = response_json.get('error')
            except JSONDecodeError:
                pass
            if exception_message:
>               raise Exception(response.reason, exception_message)
E               Exception: ('Forbidden', 'Error: You are not authorized to access the requested resource')

../../../../.cache/pypoetry/virtualenvs/l2ss-py-autotest-iYz8Sff2-py3.10/lib/python3.10/site-packages/harmony/harmony.py:915: Exception
--------------------------------- Captured Log ---------------------------------
INFO     root:verify_collection.py:572 Using granule G2969119081-LARC for test
INFO     root:verify_collection.py:585 Sending harmony request https://harmony.earthdata.nasa.gov/C2800153738-LARC/ogc-api-coverages/1.0.0/collections/parameter_vars/coverage/rangeset?forceAsync=true&subset=time%28%222024-03-08T17%3A59%3A59.750000%22%3A%222024-03-24T05%3A59%3A59.250000%22%29&granuleId=G2969119081-LARC&variable=all
INFO     root:verify_collection.py:589 Submitted harmony job 967e893a-273d-4c51-8c9f-3c26edf41463