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

Error during operational intent details validation breaking tests #855

Open
StevenPG opened this issue Dec 4, 2024 · 0 comments
Open

Error during operational intent details validation breaking tests #855

StevenPG opened this issue Dec 4, 2024 · 0 comments
Labels
automated-testing Related to automated testing tools bug Something isn't working P2 Normal priority

Comments

@StevenPG
Copy link

StevenPG commented Dec 4, 2024

Describe the bug
When executing the tests and erroneously providing an operational intent response without volumes or off nominal volumes, the existing codebase attempts to retrieve the altitude_lower value from a volume that does not exist. This causes an exception.

This error keeps a developer from determining the real issue upstream (why the volumes are empty, for example) and requires manual cleanup of the test data before a test can be re-run.

To reproduce
Provide a OperationalIntent response that does not include volumes or off_nominal volumes, e.g. from the test report:

...
"elapsed_s": 0.376861,
"reported": "2024-12-04T17:15:31.327490Z",
"json": {
    "operational_intent": {
        "reference": {
            "id": "56ed11c9-63bc-4d2c-8fe6-189ea991fb53",
            "manager": "77e62cfb-d5f2-4c28-9baf-afbc6944b515",
            "version": 1,
            "ovn": ".T7Y14cSfGy-dZ8Q5cuTlYzXdaVEWG8iU7opU8VSZN0_",
            "time_start": {
                "value": "2024-12-04T17:15:13.547Z",
                "format": "RFC3339"
            },
            "time_end": {
                "value": "2024-12-04T18:00:14.547Z",
                "format": "RFC3339"
            },
            "uss_base_url": "https://myUss.com",
            "uss_availability": "Normal",
            "subscription_id": "7caaa804-28ed-4866-bb13-3b2427e239a3",
            "state": "Accepted"
        },
        "details": {
            "volumes": [],
            "off_nominal_volumes": [],
            "priority": 0
        }
    }
},
"body": null
},
"query_type": "astm.f3548.v21.uss.getOperationalIntentDetails",
"participant_id": "uss1_core"
...

Difference from expected behavior
Providing this response results in an error rather than an expected validation and failure.

Traceback (most recent call last):
    File "/app/monitoring/uss_qualifier/suites/suite.py", line 158, in _run_test_scenario
      scenario.run(context)
    File "/app/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.py", line 228, in run
      flight_1_oi_ref = self._attempt_modify_planned_flight_conflict()
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/app/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.py", line 353, in _attempt_modify_planned_flight_conflict
      flight_1_oi_ref = validator.expect_shared(
                        ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/app/monitoring/uss_qualifier/scenarios/astm/utm/test_steps.py", line 217, in expect_shared
      self._check_op_intent_details(flight_info, oi_ref)
    File "/app/monitoring/uss_qualifier/scenarios/astm/utm/test_steps.py", line 434, in _check_op_intent_details
      error_text = validate_op_intent_details(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/app/monitoring/uss_qualifier/scenarios/astm/utm/evaluation.py", line 32, in validate_op_intent_details
      resp_alts = vol4c.meter_altitude_bounds
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/app/monitoring/monitorlib/geotemporal.py", line 366, in meter_altitude_bounds
      alt_lo = min(
               ^^^^
  ValueError: min() iterable argument is empty

Possible solution
A solution is simply to check for the length of volume responses in evaluation.py.

I will link the PR here: #856

@StevenPG StevenPG added the bug Something isn't working label Dec 4, 2024
@BenjaminPelletier BenjaminPelletier added automated-testing Related to automated testing tools P2 Normal priority labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated-testing Related to automated testing tools bug Something isn't working P2 Normal priority
Projects
None yet
Development

No branches or pull requests

2 participants