Skip to content

Commit

Permalink
Merge remote-tracking branch 'interuss/main' into fix-fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminPelletier committed Nov 21, 2024
2 parents b844e99 + 2d30372 commit 66fd2eb
Show file tree
Hide file tree
Showing 22 changed files with 103 additions and 22 deletions.
10 changes: 5 additions & 5 deletions build/dev/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ services:
start_interval: 5s

rid_bootstrapper:
image: interuss/dss:v0.18.0-rc1
command: /usr/bin/db-manager --schemas_dir=/db-schemas/rid --db_version "latest" --cockroach_host crdb
image: interuss/dss:v0.19.0-rc2
command: /usr/bin/db-manager migrate --schemas_dir=/db-schemas/rid --db_version "latest" --cockroach_host crdb
depends_on:
crdb:
condition: service_healthy
networks:
- dss_internal_network

scd_bootstrapper:
image: interuss/dss:v0.18.0-rc1
command: /usr/bin/db-manager --schemas_dir=/db-schemas/scd --db_version "latest" --cockroach_host crdb
image: interuss/dss:v0.19.0-rc2
command: /usr/bin/db-manager migrate --schemas_dir=/db-schemas/scd --db_version "latest" --cockroach_host crdb
depends_on:
crdb:
condition: service_healthy
Expand All @@ -44,7 +44,7 @@ services:

dss:
hostname: dss.uss1.localutm
image: interuss/dss:v0.18.0-rc1
image: interuss/dss:v0.19.0-rc2
volumes:
- $PWD/../test-certs:/var/test-certs:ro
- $PWD/startup/core_service.sh:/startup/core_service.sh:ro
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ v1:
pass_condition:
elements:
count:
equal_to: 8 # 6 CRDBAccess + 2 DSSOVNRequest scenarios are skipped
equal_to: 6 # 6 CRDBAccess scenarios are skipped
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ v1:
# A USS that hosts a DSS instance is also a participant in the test, even if they don't fulfill any other roles
participant_id: uss1_dss
base_url: http://dss.uss1.localutm
supports_ovn_request: true

dss_instances:
resource_type: resources.astm.f3548.v21.DSSInstancesResource
Expand All @@ -146,8 +147,10 @@ v1:
# Participants using a DSS instance they do not provide should be listed as users of that DSS (so that they can take credit for USS requirements enforced by the DSS)
- mock_uss # mock_uss uses this DSS instance; it does not provide its own instance
base_url: http://dss.uss1.localutm
supports_ovn_request: true
- participant_id: uss2_dss
base_url: http://dss.uss2.localutm
supports_ovn_request: true

# Mock USS that can be used in tests for flight planning, modifying data sharing behavior and recording interactions
mock_uss:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ scd_dss:
specification:
participant_id: uss1
base_url: http://dss.uss1.localutm
supports_ovn_request: true

scd_dss_instances:
$content_schema: monitoring/uss_qualifier/resources/definitions/ResourceDeclaration.json
Expand All @@ -199,8 +200,10 @@ scd_dss_instances:
user_participant_ids:
- mock_uss
base_url: http://dss.uss1.localutm
supports_ovn_request: true
- participant_id: uss2
base_url: http://dss.uss2.localutm
supports_ovn_request: true

# ===== DSS CockroachDB nodes =====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ scd_dss:
specification:
participant_id: uss1
base_url: http://localhost:8082
supports_ovn_request: true

scd_dss_instances:
$content_schema: monitoring/uss_qualifier/resources/definitions/ResourceDeclaration.json
Expand All @@ -198,8 +199,10 @@ scd_dss_instances:
user_participant_ids:
- mock_uss
base_url: http://localhost:8082
supports_ovn_request: true
- participant_id: uss2
base_url: http://localhost:8082
supports_ovn_request: true

# ===== DSS CockroachDB nodes =====

Expand Down
2 changes: 1 addition & 1 deletion monitoring/uss_qualifier/configurations/dev/uspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,4 @@ v1:
pass_condition:
elements:
count:
equal_to: 6 # 4 CRDBAccess + 2 DSSOVNRequest scenarios are skipped
equal_to: 4 # 4 CRDBAccess scenarios are skipped
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ function(env) {
count: {
// We currently expect this amount of skipped scenarios: making it an equality
// to make sure this is reduced if some scenarios start to be executed
equal_to: 11,
equal_to: 9,
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ function(participants) {
// A USS that hosts a DSS instance is also a participant in the test, even if they don't fulfill any other roles
participant_id: 'uss1_dss',
base_url: 'http://dss.uss1.localutm',
supports_ovn_request: true,
},
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
'mock_uss', // mock_uss uses this DSS instance; it does not provide its own instance
],
base_url: 'http://dss.uss1.localutm',
supports_ovn_request: true
},
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
{
participant_id: 'uss2_dss',
base_url: 'http://dss.uss2.localutm',
supports_ovn_request: true,
},
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import s2sphere
from loguru import logger
from s2sphere import LatLng, LatLngRect
from uas_standards.astm.f3411.v22a.api import RIDHeightReference

from uas_standards.interuss.automated_testing.rid.v1.observation import (
Flight,
GetDisplayDataResponse,
Expand Down Expand Up @@ -50,6 +52,7 @@ def _rect_str(rect) -> str:
VERTICAL_SPEED_PRECISION = 0.1
SPEED_PRECISION = 0.05
TIMESTAMP_ACCURACY_PRECISION = 0.05
HEIGHT_PRECISION_M = 1


@dataclass
Expand Down Expand Up @@ -1088,6 +1091,42 @@ def _evaluate_normal_sp_observation(
details=f"Timestamp accuracy in Service Provider {mapping.injected_flight.uss_participant_id}'s response for flight with injection ID {mapping.injected_flight.flight.injection_id} in test {mapping.injected_flight.test_id} with telemetry index {mapping.telemetry_index} is {mapping.observed_flight.timestamp_accuracy} which is not equal to the injected value of {injected_telemetry.timestamp_accuracy}",
)

if "height" in injected_position:
# We injected a height so expect to observe one
if "height" not in observed_position:
check.record_failed(
"A value was injected for the height field, but none was returned in Service Provider response",
details=f"{mapping.injected_flight.uss_participant_id}'s flight with injection ID {mapping.injected_flight.flight.injection_id} in test {mapping.injected_flight.test_id} had a height injected, but Service Provider did not return a height at {mapping.observed_flight.query.query.request.initiated_at}",
)
else:
if (
injected_position.height.reference.value
!= observed_position.height.reference.value
):
check.record_failed(
"Height reference reported by Service Provider does not match injected height reference",
details=f"{mapping.injected_flight.uss_participant_id}'s flight with injection ID {mapping.injected_flight.flight.injection_id} in test {mapping.injected_flight.test_id} had telemetry index {mapping.telemetry_index} at {injected_telemetry.timestamp} with height={injected_position.height.distance} {injected_position.height.reference.value}, but Service Provider reported height={observed_position.height.distance} {observed_position.height.reference.value} at {mapping.observed_flight.query.query.request.initiated_at}",
)
if not math.isclose(
injected_position.height.distance,
observed_position.height.distance,
abs_tol=HEIGHT_PRECISION_M,
):
check.record_failed(
"Height reported by Service Provider does not match injected height",
details=f"{mapping.injected_flight.uss_participant_id}'s flight with injection ID {mapping.injected_flight.flight.injection_id} in test {mapping.injected_flight.test_id} had telemetry index {mapping.telemetry_index} at {injected_telemetry.timestamp} with height={injected_position.height.distance} {injected_position.height.reference.value}, but Service Provider reported height={observed_position.height.distance} {observed_position.height.reference.value} at {mapping.observed_flight.query.query.request.initiated_at}",
)
else:
# We did not inject a height, but a height returning the magic 'unknown' value would still be seen as valid
if "height" in observed_position:
if not math.isclose(
observed_position.height.distance, -1000, abs_tol=1
):
check.record_failed(
"Injected no height, but Service Provider reported a height",
details=f"{mapping.injected_flight.uss_participant_id}'s flight with injection ID {mapping.injected_flight.flight.injection_id} in test {mapping.injected_flight.test_id} had no height injected, but Service Provider reported height={observed_position.height.distance} {observed_position.height.reference.value} at {mapping.observed_flight.query.query.request.initiated_at}",
)

# Verify that flight details queries succeeded and returned correctly-formatted data
for mapping in mappings.values():
details_queries = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ If the timestamp accuracy is not present, the USS under test is not properly imp

**[astm.f3411.v19.NET0260,Table1,5](../../../../requirements/astm/f3411/v19.md)** requires that relevant Remote ID data, consistent with the common data dictionary, be reported by the Service Provider. The observed timestamp accuracy differs from the injected one.

#### ⚠️ Service Provider height check

**[astm.f3411.v19.NET0260,Table1,13](../../../../requirements/astm/f3411/v19.md)** requires that relevant Remote ID data, consistent with the common data dictionary, be reported by the Service Provider. The reported height of the flight is unrealistic or otherwise not consistent with the injected data.

#### Successful flight details query check

**[astm.f3411.v19.NET0710,2](../../../../requirements/astm/f3411/v19.md)** and **[astm.f3411.v19.NET0340](../../../../requirements/astm/f3411/v19.md)** require a Service Provider to implement the GET flight details endpoint. This check will fail if uss_qualifier cannot query that endpoint (specified in the ISA present in the DSS) successfully.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ If the timestamp accuracy is not present, the USS under test is not properly imp

**[astm.f3411.v22a.NET0260,Table1,6](../../../../requirements/astm/f3411/v22a.md)** requires that relevant Remote ID data, consistent with the common data dictionary, be reported by the Service Provider. The observed timestamp accuracy differs from the injected one.

#### ⚠️ Service Provider height check

**[astm.f3411.v22a.NET0260,Table1,14](../../../../requirements/astm/f3411/v22a.md)** requires that relevant Remote ID data, consistent with the common data dictionary, be reported by the Service Provider. The reported height of the flight is unrealistic or otherwise not consistent with the injected data.

#### Successful flight details query check

**[astm.f3411.v22a.NET0710,2](../../../../requirements/astm/f3411/v22a.md)** and **[astm.f3411.v22a.NET0340](../../../../requirements/astm/f3411/v22a.md) require a Service Provider to implement the GET flight details endpoint. This check will fail if uss_qualifier cannot query that endpoint (specified in the ISA present in the DSS) successfully.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,22 @@ Check that the DSS has set the expected OVN correctly.
This case validates the off-nominal behaviors of the OVN request.

### Attempt to create OIR with OVN suffix request not being a UUID test step
#### [Attempt to create OIR with OVN suffix request not being a UUID rejected check](./invalid_ovn_suffix_fragment.md)
#### [Attempt to create OIR with OVN suffix request not being a UUID rejected](./invalid_ovn_suffix_fragment.md)
Check that the DSS rejects OVN suffix that are not UUIDs.
If the DSS accepts the OVN suffix, or fails with an unexpected error, this check will fail.

### Attempt to create OIR with OVN suffix request empty test step
#### [Attempt to create OIR with OVN suffix request empty rejected check](./invalid_ovn_suffix_fragment.md)
#### [Attempt to create OIR with OVN suffix request empty rejected](./invalid_ovn_suffix_fragment.md)
Check that the DSS rejects OVN suffix that are empty.
If the DSS accepts the OVN suffix, or fails with an unexpected error, this check will fail.

### Attempt to create OIR with OVN suffix request being a UUID but not v7 test step
#### [Attempt to create OIR with OVN suffix request being a UUID but not v7 rejected check](./invalid_ovn_suffix_fragment.md)
#### [Attempt to create OIR with OVN suffix request being a UUID but not v7 rejected](./invalid_ovn_suffix_fragment.md)
Check that the DSS rejects OVN suffix that are UUIDs but not v7.
If the DSS accepts the OVN suffix, or fails with an unexpected error, this check will fail.

### Attempt to create OIR with OVN suffix request being an outdated UUIDv7 test step
#### [Attempt to create OIR with OVN suffix request being an outdated UUIDv7 rejected check](./invalid_ovn_suffix_fragment.md)
#### [Attempt to create OIR with OVN suffix request being an outdated UUIDv7 rejected](./invalid_ovn_suffix_fragment.md)
Check that the DSS rejects OVN suffix that are outdated UUIDv7.
If the DSS accepts the OVN suffix, or fails with an unexpected error, this check will fail.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def run(self, context: ExecutionContext):

self.begin_test_step("Activate OIR with OVN suffix request")
req_ovn_suffix = str(uuid7())
self._activate_oir(extents, oir.ovn, req_ovn_suffix)
oir = self._activate_oir(extents, oir.ovn, req_ovn_suffix)
self._check_expected_ovn(req_ovn_suffix, oir)
self.end_test_step()

Expand Down Expand Up @@ -165,6 +165,8 @@ def _activate_oir(self, extents: List[Volume4D], ovn: str, req_ovn_suffix: str):
query_timestamps=qe.query_timestamps,
)

return oir

def _create_invalid_oir_attempt(self, extents: List[Volume4D], req_ovn_suffix: str):
with self.check(
"Attempt to create OIR with invalid requested OVN suffix query rejected",
Expand Down
7 changes: 6 additions & 1 deletion monitoring/uss_qualifier/suites/astm/netrid/f3411_19.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<th><a href="../../README.md#checked-in">Checked in</a></th>
</tr>
<tr>
<td rowspan="71" style="vertical-align:top;"><a href="../../../requirements/astm/f3411/v19.md">astm<br>.f3411<br>.v19</a></td>
<td rowspan="72" style="vertical-align:top;"><a href="../../../requirements/astm/f3411/v19.md">astm<br>.f3411<br>.v19</a></td>
<td><a href="../../../requirements/astm/f3411/v19.md">DSS0010</a></td>
<td>Implemented</td>
<td><a href="../../../scenarios/astm/netrid/v19/dss/token_validation.md">ASTM NetRID DSS: Token Validation</a></td>
Expand Down Expand Up @@ -261,6 +261,11 @@
<td>Implemented</td>
<td><a href="../../../scenarios/astm/netrid/v19/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../../requirements/astm/f3411/v19.md">NET0260,Table1,13</a></td>
<td>Implemented</td>
<td><a href="../../../scenarios/astm/netrid/v19/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../../requirements/astm/f3411/v19.md">NET0260,Table1,15</a></td>
<td>Implemented</td>
Expand Down
7 changes: 6 additions & 1 deletion monitoring/uss_qualifier/suites/astm/netrid/f3411_22a.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<th><a href="../../README.md#checked-in">Checked in</a></th>
</tr>
<tr>
<td rowspan="96" style="vertical-align:top;"><a href="../../../requirements/astm/f3411/v22a.md">astm<br>.f3411<br>.v22a</a></td>
<td rowspan="97" style="vertical-align:top;"><a href="../../../requirements/astm/f3411/v22a.md">astm<br>.f3411<br>.v22a</a></td>
<td><a href="../../../requirements/astm/f3411/v22a.md">DSS0010</a></td>
<td>Implemented</td>
<td><a href="../../../scenarios/astm/netrid/v22a/dss/token_validation.md">ASTM NetRID DSS: Token Validation</a></td>
Expand Down Expand Up @@ -276,6 +276,11 @@
<td>Implemented</td>
<td><a href="../../../scenarios/astm/netrid/v22a/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../../requirements/astm/f3411/v22a.md">NET0260,Table1,14</a></td>
<td>Implemented</td>
<td><a href="../../../scenarios/astm/netrid/v22a/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../../requirements/astm/f3411/v22a.md">NET0260,Table1,16</a></td>
<td>Implemented</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<th><a href="../README.md#checked-in">Checked in</a></th>
</tr>
<tr>
<td rowspan="96" style="vertical-align:top;"><a href="../../requirements/astm/f3411/v22a.md">astm<br>.f3411<br>.v22a</a></td>
<td rowspan="97" style="vertical-align:top;"><a href="../../requirements/astm/f3411/v22a.md">astm<br>.f3411<br>.v22a</a></td>
<td><a href="../../requirements/astm/f3411/v22a.md">DSS0010</a></td>
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v22a/dss/token_validation.md">ASTM NetRID DSS: Token Validation</a></td>
Expand Down Expand Up @@ -272,6 +272,11 @@
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v22a/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../requirements/astm/f3411/v22a.md">NET0260,Table1,14</a></td>
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v22a/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../requirements/astm/f3411/v22a.md">NET0260,Table1,16</a></td>
<td>Implemented</td>
Expand Down
7 changes: 6 additions & 1 deletion monitoring/uss_qualifier/suites/uspace/required_services.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<th><a href="../README.md#checked-in">Checked in</a></th>
</tr>
<tr>
<td rowspan="96" style="vertical-align:top;"><a href="../../requirements/astm/f3411/v22a.md">astm<br>.f3411<br>.v22a</a></td>
<td rowspan="97" style="vertical-align:top;"><a href="../../requirements/astm/f3411/v22a.md">astm<br>.f3411<br>.v22a</a></td>
<td><a href="../../requirements/astm/f3411/v22a.md">DSS0010</a></td>
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v22a/dss/token_validation.md">ASTM NetRID DSS: Token Validation</a></td>
Expand Down Expand Up @@ -273,6 +273,11 @@
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v22a/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../requirements/astm/f3411/v22a.md">NET0260,Table1,14</a></td>
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v22a/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../requirements/astm/f3411/v22a.md">NET0260,Table1,16</a></td>
<td>Implemented</td>
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ scipy==1.13.0
shapely==1.7.1
structlog==21.5.0 # deployment_manager
termcolor==1.1.0
uas_standards==3.2.2
uas_standards==3.3.0
uuid6==2024.7.10
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1621,9 +1621,9 @@ tzdata==2024.1 \
--hash=sha256:2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd \
--hash=sha256:9068bc196136463f5245e51efda838afa15aaeca9903f49050dfa2679db4d252
# via pandas
uas-standards==3.2.2 \
--hash=sha256:c9cee8f30e6f238570ad4aa83029d4c48d4e8ea38651907d0a51ceaea0ab3b38 \
--hash=sha256:de710dec3a8f6e7ee66ae3cc386416dce52e862efba519ba9de64fea76f9e048
uas-standards==3.3.0 \
--hash=sha256:38f3010d3a946349ad12652190c54d6c190f676ec6d3a31555e59321b7b20b13 \
--hash=sha256:8ff8e3befa0230374a8e3d7362a7d5bbe6e5f17028c2bdc484603f696f963e52
# via -r requirements.in
urllib3==2.2.1 \
--hash=sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d \
Expand Down

0 comments on commit 66fd2eb

Please sign in to comment.