Skip to content

Commit 18ecd71

Browse files
committed
PR comments
1 parent 8cbf0e9 commit 18ecd71

File tree

9 files changed

+88
-44
lines changed

9 files changed

+88
-44
lines changed

monitoring/uss_qualifier/scenarios/astm/utm/dss/synchronization/subscription_synchronization.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,16 @@ Verify that the version of the subscription returned by every DSS is as expected
109109

110110
This test step attempts to mutate the subscription on every secondary DSS instance (that is, instances through which the subscription has not been created) to confirm that such mutations are properly propagated to every DSS.
111111

112+
#### 🛑 Subscription can be mutated on secondary DSS check
113+
114+
If the secondary DSS does not allow the subscription to be mutated, either the secondary DSS or the primary DSS are in violation of one or both of the following requirements:
115+
116+
**[astm.f3548.v21.DSS0210,1b](../../../../../requirements/astm/f3548/v21.md)**, if the `manager` of the subscription fails to be taken into account (either because the primary DSS did not propagated it, or because the secondary failed to consider it);
117+
**[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**, if the secondary DSS fails to properly implement the API to mutate subscriptions.
118+
112119
#### [Update subscription](../fragments/sub/crud/update.md)
113120

114-
Confirm that the subscription can be mutated on a secondary DSS.
121+
Confirm that the secondary DSS handles the update properly.
115122

116123
#### [Subscription is synchronized](../fragments/sub/sync.md)
117124

@@ -156,7 +163,7 @@ Verify that the version of the subscription returned by the DSS is as expected
156163

157164
Attempt to query and search for the deleted subscription in various ways
158165

159-
#### 🛑 Secondary DSS should not return the deleted subscription check
166+
#### 🛑 DSS should not return the deleted subscription check
160167

161168
If a DSS returns a subscription that was previously successfully deleted from the primary DSS,
162169
either one of the primary DSS or the DSS that returned the subscription is in violation of **[astm.f3548.v21.DSS0210,1a](../../../../../requirements/astm/f3548/v21.md)**.
@@ -177,15 +184,9 @@ Verify that the subscription returned by the DSS via the deletion is properly fo
177184

178185
Verify that the version of the subscription returned by the DSS is as expected
179186

180-
#### 🛑 Secondary DSS should not return the deleted subscription check
187+
#### 🛑 DSS should not return the deleted subscription check
181188

182189
If a DSS returns a subscription that was previously successfully deleted from the primary DSS,
183190
either one of the primary DSS or the DSS that returned the subscription is in violation of **[astm.f3548.v21.DSS0210,1a](../../../../../requirements/astm/f3548/v21.md)**.
184191

185-
#### 🛑 Primary DSS should not return the deleted subscription check
186-
187-
If the primary DSS returns a subscription that was previously successfully deleted from a secondary DSS,
188-
either one of the secondary or primary DSS is in violation of **[astm.f3548.v21.DSS0210,1a](../../../../../requirements/astm/f3548/v21.md)**.
189-
190-
191192
## [Cleanup](../clean_workspace.md)

monitoring/uss_qualifier/scenarios/astm/utm/dss/synchronization/subscription_synchronization.py

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,6 @@ def _ensure_no_active_subs_exist(self):
220220
def _step_create_subscriptions(self):
221221
# Create the 'main' test subscription:
222222
main_sub = self._create_sub_with_params(self._sub_params)
223-
if main_sub is None:
224-
return
225223

226224
self._current_subscription = main_sub
227225

@@ -230,14 +228,12 @@ def _step_create_subscriptions(self):
230228
params = self._sub_params.copy()
231229
params.sub_id = sub_id
232230
extra_sub = self._create_sub_with_params(params)
233-
if extra_sub is None:
234-
return
235231
self._subs_for_deletion[sub_id] = extra_sub
236232
self._subs_for_deletion_params[sub_id] = params
237233

238234
def _create_sub_with_params(
239235
self, creation_params: SubscriptionParams
240-
) -> Optional[Subscription]:
236+
) -> Subscription:
241237

242238
# TODO migrate to the try/except pattern for queries
243239
newly_created = self._dss.upsert_subscription(
@@ -255,7 +251,6 @@ def _create_sub_with_params(
255251
details=f"Subscription creation failed with status code {newly_created.status_code}",
256252
query_timestamps=[newly_created.request.timestamp],
257253
)
258-
return None
259254

260255
with self.check(
261256
"Create subscription response is correct", [self._primary_pid]
@@ -555,14 +550,22 @@ def _compare_upsert_resp_with_params(
555550
)
556551

557552
def _mutate_subscription_with_dss(
558-
self, dss_instance: DSSInstance, new_params: SubscriptionParams
559-
) -> bool:
553+
self,
554+
dss_instance: DSSInstance,
555+
new_params: SubscriptionParams,
556+
is_primary: bool,
557+
):
560558
"""
561559
Mutate the subscription on the given DSS instance using the given parameters.
562560
Also updates the internal state of the scenario to reflect the new subscription.
563561
Returns True if the subscription was successfully mutated, False otherwise.
564562
"""
565-
with self.check("Subscription can be mutated", [self._primary_pid]) as check:
563+
check = (
564+
"Subscription can be mutated"
565+
if is_primary
566+
else "Subscription can be mutated on secondary DSS"
567+
)
568+
with self.check(check, [self._primary_pid]) as check:
566569
mutated_sub_response = dss_instance.upsert_subscription(
567570
version=self._current_subscription.version,
568571
**new_params,
@@ -574,7 +577,6 @@ def _mutate_subscription_with_dss(
574577
details=f"Subscription mutation failed with status code {mutated_sub_response.status_code}",
575578
query_timestamps=[mutated_sub_response.request.timestamp],
576579
)
577-
return False
578580

579581
# Check that what we get back is valid and corresponds to what we want to create
580582
self._compare_upsert_resp_with_params(
@@ -584,27 +586,25 @@ def _mutate_subscription_with_dss(
584586
self._current_subscription = mutated_sub_response.subscription
585587
# Update the parameters we used for that subscription
586588
self._sub_params = new_params
587-
return True
588589

589590
def _step_mutate_subscriptions_broadcast_shift_time(self):
590591
"""Mutate the subscription on the primary DSS by adding 10 seconds to its start and end times"""
591592

592593
sp = self._sub_params
593594
new_params = shift_time_params(sp, timedelta(seconds=10))
594-
self._mutate_subscription_with_dss(self._dss, new_params)
595+
self._mutate_subscription_with_dss(self._dss, new_params, is_primary=True)
595596

596597
def _step_mutate_subscriptions_secondaries_shift_time(self):
597598
"""Mutate the subscription on every secondary DSS by adding 10 seconds to its start and end times,
598599
then checking on every DSS that the response is valid and corresponds to the expected parameters."""
599600

600601
for secondary_dss in self._dss_read_instances:
601602
# Mutate the subscription on the secondary DSS
602-
if not self._mutate_subscription_with_dss(
603+
self._mutate_subscription_with_dss(
603604
secondary_dss,
604605
shift_time_params(self._sub_params, timedelta(seconds=10)),
605-
):
606-
# If the mutation failed but the scenario has not terminated, we end this step here.
607-
return
606+
is_primary=False,
607+
)
608608
# Check that the mutation was propagated to every DSS:
609609
self._query_secondaries_and_compare(self._sub_params)
610610

@@ -674,29 +674,42 @@ def _step_delete_subscriptions_on_secondaries(self):
674674
# If the deletion failed but the scenario has not terminated, we end this step here.
675675
return
676676
# Check that the primary knows about the deletion:
677-
self._confirm_dss_has_no_sub(self._dss, sub_id, is_primary=True)
677+
self._confirm_dss_has_no_sub(
678+
self._dss, sub_id, secondary_dss.participant_id
679+
)
678680
# Check that the deletion was propagated to every DSS:
679-
self._confirm_no_secondary_has_sub(sub_id)
681+
self._confirm_no_secondary_has_sub(sub_id, secondary_dss.participant_id)
680682

681683
def _step_get_deleted_sub(self):
682-
self._confirm_no_secondary_has_sub(self._sub_id)
684+
self._confirm_no_secondary_has_sub(self._sub_id, self._dss.participant_id)
683685

684-
def _confirm_no_secondary_has_sub(self, sub_id: str):
686+
def _confirm_no_secondary_has_sub(
687+
self, sub_id: str, deleted_on_participant_id: str
688+
):
689+
"""Confirm that no secondary DSS has the subscription.
690+
deleted_on_participant_id specifies the participant_id of the DSS where the subscription was deleted."""
685691
for secondary_dss in self._dss_read_instances:
686-
self._confirm_dss_has_no_sub(secondary_dss, sub_id, is_primary=False)
692+
self._confirm_dss_has_no_sub(
693+
secondary_dss, sub_id, deleted_on_participant_id
694+
)
687695

688696
def _confirm_dss_has_no_sub(
689-
self, dss_instance: DSSInstance, sub_id: str, is_primary: bool = False
697+
self,
698+
dss_instance: DSSInstance,
699+
sub_id: str,
700+
other_participant_id: Optional[str],
690701
):
691-
check_name = (
692-
"Primary DSS should not return the deleted subscription"
693-
if is_primary
694-
else "Secondary DSS should not return the deleted subscription"
702+
"""Confirm that a DSS has no subscription.
703+
other_participant_id may be specified if a failed check may be caused by it."""
704+
participants = (
705+
[dss_instance.participant_id, other_participant_id]
706+
if other_participant_id
707+
else None
695708
)
696709
fetched_sub = dss_instance.get_subscription(sub_id)
697710
with self.check(
698-
check_name,
699-
[dss_instance.participant_id],
711+
"DSS should not return the deleted subscription",
712+
participants,
700713
) as check:
701714
if fetched_sub.status_code != 404:
702715
check.record_failed(

monitoring/uss_qualifier/scenarios/astm/utm/dss/test_step_fragments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def cleanup_sub(
5151
if existing_sub.status_code not in [200, 404]:
5252
check.record_failed(
5353
summary=f"Could not query subscription {sub_id}",
54-
details=f"When attempting to query subscription {sub_id} from the DSS, received {existing_sub.status_code}: {existing_sub.json_result}",
54+
details=f"When attempting to query subscription {sub_id} from the DSS, received {existing_sub.status_code}: {existing_sub.error_message}",
5555
query_timestamps=[existing_sub.request.timestamp],
5656
)
5757

monitoring/uss_qualifier/suites/astm/utm/dss_probing.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<th><a href="../../README.md#checked-in">Checked in</a></th>
2222
</tr>
2323
<tr>
24-
<td rowspan="16" style="vertical-align:top;"><a href="../../../requirements/astm/f3548/v21.md">astm<br>.f3548<br>.v21</a></td>
24+
<td rowspan="17" style="vertical-align:top;"><a href="../../../requirements/astm/f3548/v21.md">astm<br>.f3548<br>.v21</a></td>
2525
<td><a href="../../../requirements/astm/f3548/v21.md">DSS0005,1</a></td>
2626
<td>Implemented</td>
2727
<td><a href="../../../scenarios/astm/utm/op_intent_ref_access_control.md">ASTM F3548-21 UTM DSS Operational Intent Reference Access Control</a><br><a href="../../../scenarios/astm/utm/dss/subscription_simple.md">ASTM SCD DSS: Subscription Simple</a><br><a href="../../../scenarios/astm/utm/dss/synchronization/subscription_synchronization.md">ASTM SCD DSS: Subscription Synchronization</a><br><a href="../../../scenarios/astm/utm/dss/subscription_validation.md">ASTM SCD DSS: Subscription Validation</a></td>
@@ -56,6 +56,11 @@
5656
<td>Implemented</td>
5757
<td><a href="../../../scenarios/astm/utm/dss/synchronization/subscription_synchronization.md">ASTM SCD DSS: Subscription Synchronization</a></td>
5858
</tr>
59+
<tr>
60+
<td><a href="../../../requirements/astm/f3548/v21.md">DSS0210,1b</a></td>
61+
<td>Implemented</td>
62+
<td><a href="../../../scenarios/astm/utm/dss/synchronization/subscription_synchronization.md">ASTM SCD DSS: Subscription Synchronization</a></td>
63+
</tr>
5964
<tr>
6065
<td><a href="../../../requirements/astm/f3548/v21.md">DSS0210,1c</a></td>
6166
<td>Implemented</td>

monitoring/uss_qualifier/suites/astm/utm/f3548_21.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<th><a href="../../README.md#checked-in">Checked in</a></th>
3636
</tr>
3737
<tr>
38-
<td rowspan="42" style="vertical-align:top;"><a href="../../../requirements/astm/f3548/v21.md">astm<br>.f3548<br>.v21</a></td>
38+
<td rowspan="43" style="vertical-align:top;"><a href="../../../requirements/astm/f3548/v21.md">astm<br>.f3548<br>.v21</a></td>
3939
<td><a href="../../../requirements/astm/f3548/v21.md">DSS0005,1</a></td>
4040
<td>Implemented</td>
4141
<td><a href="../../../scenarios/astm/utm/prep_planners.md">ASTM F3548 flight planners preparation</a><br><a href="../../../scenarios/astm/utm/op_intent_ref_access_control.md">ASTM F3548-21 UTM DSS Operational Intent Reference Access Control</a><br><a href="../../../scenarios/astm/utm/dss/subscription_simple.md">ASTM SCD DSS: Subscription Simple</a><br><a href="../../../scenarios/astm/utm/dss/synchronization/subscription_synchronization.md">ASTM SCD DSS: Subscription Synchronization</a><br><a href="../../../scenarios/astm/utm/dss/subscription_validation.md">ASTM SCD DSS: Subscription Validation</a><br><a href="../../../scenarios/astm/utm/off_nominal_planning/down_uss.md">Off-Nominal planning: down USS</a><br><a href="../../../scenarios/astm/utm/off_nominal_planning/down_uss_equal_priority_not_permitted.md">Off-Nominal planning: down USS with equal priority conflicts not permitted</a></td>
@@ -75,6 +75,11 @@
7575
<td>Implemented</td>
7676
<td><a href="../../../scenarios/astm/utm/dss/synchronization/subscription_synchronization.md">ASTM SCD DSS: Subscription Synchronization</a></td>
7777
</tr>
78+
<tr>
79+
<td><a href="../../../requirements/astm/f3548/v21.md">DSS0210,1b</a></td>
80+
<td>Implemented</td>
81+
<td><a href="../../../scenarios/astm/utm/dss/synchronization/subscription_synchronization.md">ASTM SCD DSS: Subscription Synchronization</a></td>
82+
</tr>
7883
<tr>
7984
<td><a href="../../../requirements/astm/f3548/v21.md">DSS0210,1c</a></td>
8085
<td>Implemented</td>

monitoring/uss_qualifier/suites/faa/uft/message_signing.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<th><a href="../../README.md#checked-in">Checked in</a></th>
1919
</tr>
2020
<tr>
21-
<td rowspan="42" style="vertical-align:top;"><a href="../../../requirements/astm/f3548/v21.md">astm<br>.f3548<br>.v21</a></td>
21+
<td rowspan="43" style="vertical-align:top;"><a href="../../../requirements/astm/f3548/v21.md">astm<br>.f3548<br>.v21</a></td>
2222
<td><a href="../../../requirements/astm/f3548/v21.md">DSS0005,1</a></td>
2323
<td>Implemented</td>
2424
<td><a href="../../../scenarios/astm/utm/prep_planners.md">ASTM F3548 flight planners preparation</a><br><a href="../../../scenarios/astm/utm/op_intent_ref_access_control.md">ASTM F3548-21 UTM DSS Operational Intent Reference Access Control</a><br><a href="../../../scenarios/astm/utm/dss/subscription_simple.md">ASTM SCD DSS: Subscription Simple</a><br><a href="../../../scenarios/astm/utm/dss/synchronization/subscription_synchronization.md">ASTM SCD DSS: Subscription Synchronization</a><br><a href="../../../scenarios/astm/utm/dss/subscription_validation.md">ASTM SCD DSS: Subscription Validation</a><br><a href="../../../scenarios/astm/utm/off_nominal_planning/down_uss.md">Off-Nominal planning: down USS</a><br><a href="../../../scenarios/astm/utm/off_nominal_planning/down_uss_equal_priority_not_permitted.md">Off-Nominal planning: down USS with equal priority conflicts not permitted</a></td>
@@ -58,6 +58,11 @@
5858
<td>Implemented</td>
5959
<td><a href="../../../scenarios/astm/utm/dss/synchronization/subscription_synchronization.md">ASTM SCD DSS: Subscription Synchronization</a></td>
6060
</tr>
61+
<tr>
62+
<td><a href="../../../requirements/astm/f3548/v21.md">DSS0210,1b</a></td>
63+
<td>Implemented</td>
64+
<td><a href="../../../scenarios/astm/utm/dss/synchronization/subscription_synchronization.md">ASTM SCD DSS: Subscription Synchronization</a></td>
65+
</tr>
6166
<tr>
6267
<td><a href="../../../requirements/astm/f3548/v21.md">DSS0210,1c</a></td>
6368
<td>Implemented</td>

monitoring/uss_qualifier/suites/interuss/dss/all_tests.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@
408408
<td><a href="../../../scenarios/astm/netrid/v22a/dss/heavy_traffic_concurrent.md">ASTM NetRID DSS: Concurrent Requests</a><br><a href="../../../scenarios/astm/netrid/v22a/dss/isa_expiry.md">ASTM NetRID DSS: ISA Expiry</a><br><a href="../../../scenarios/astm/netrid/v22a/dss/isa_subscription_interactions.md">ASTM NetRID DSS: ISA Subscription Interactions</a><br><a href="../../../scenarios/astm/netrid/v22a/dss/isa_simple.md">ASTM NetRID DSS: Simple ISA</a><br><a href="../../../scenarios/astm/netrid/v22a/dss/isa_validation.md">ASTM NetRID DSS: Submitted ISA Validations</a><br><a href="../../../scenarios/astm/netrid/v22a/dss/subscription_simple.md">ASTM NetRID DSS: Subscription Simple</a><br><a href="../../../scenarios/astm/netrid/v22a/dss/subscription_validation.md">ASTM NetRID DSS: Subscription Validation</a><br><a href="../../../scenarios/astm/netrid/v22a/dss/token_validation.md">ASTM NetRID DSS: Token Validation</a></td>
409409
</tr>
410410
<tr>
411-
<td rowspan="16" style="vertical-align:top;"><a href="../../../requirements/astm/f3548/v21.md">astm<br>.f3548<br>.v21</a></td>
411+
<td rowspan="17" style="vertical-align:top;"><a href="../../../requirements/astm/f3548/v21.md">astm<br>.f3548<br>.v21</a></td>
412412
<td><a href="../../../requirements/astm/f3548/v21.md">DSS0005,1</a></td>
413413
<td>Implemented</td>
414414
<td><a href="../../../scenarios/astm/utm/op_intent_ref_access_control.md">ASTM F3548-21 UTM DSS Operational Intent Reference Access Control</a><br><a href="../../../scenarios/astm/utm/dss/subscription_simple.md">ASTM SCD DSS: Subscription Simple</a><br><a href="../../../scenarios/astm/utm/dss/synchronization/subscription_synchronization.md">ASTM SCD DSS: Subscription Synchronization</a><br><a href="../../../scenarios/astm/utm/dss/subscription_validation.md">ASTM SCD DSS: Subscription Validation</a></td>
@@ -443,6 +443,11 @@
443443
<td>Implemented</td>
444444
<td><a href="../../../scenarios/astm/utm/dss/synchronization/subscription_synchronization.md">ASTM SCD DSS: Subscription Synchronization</a></td>
445445
</tr>
446+
<tr>
447+
<td><a href="../../../requirements/astm/f3548/v21.md">DSS0210,1b</a></td>
448+
<td>Implemented</td>
449+
<td><a href="../../../scenarios/astm/utm/dss/synchronization/subscription_synchronization.md">ASTM SCD DSS: Subscription Synchronization</a></td>
450+
</tr>
446451
<tr>
447452
<td><a href="../../../requirements/astm/f3548/v21.md">DSS0210,1c</a></td>
448453
<td>Implemented</td>

monitoring/uss_qualifier/suites/uspace/flight_auth.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<th><a href="../README.md#checked-in">Checked in</a></th>
2020
</tr>
2121
<tr>
22-
<td rowspan="42" style="vertical-align:top;"><a href="../../requirements/astm/f3548/v21.md">astm<br>.f3548<br>.v21</a></td>
22+
<td rowspan="43" style="vertical-align:top;"><a href="../../requirements/astm/f3548/v21.md">astm<br>.f3548<br>.v21</a></td>
2323
<td><a href="../../requirements/astm/f3548/v21.md">DSS0005,1</a></td>
2424
<td>Implemented</td>
2525
<td><a href="../../scenarios/astm/utm/prep_planners.md">ASTM F3548 flight planners preparation</a><br><a href="../../scenarios/astm/utm/op_intent_ref_access_control.md">ASTM F3548-21 UTM DSS Operational Intent Reference Access Control</a><br><a href="../../scenarios/astm/utm/dss/subscription_simple.md">ASTM SCD DSS: Subscription Simple</a><br><a href="../../scenarios/astm/utm/dss/synchronization/subscription_synchronization.md">ASTM SCD DSS: Subscription Synchronization</a><br><a href="../../scenarios/astm/utm/dss/subscription_validation.md">ASTM SCD DSS: Subscription Validation</a><br><a href="../../scenarios/astm/utm/off_nominal_planning/down_uss.md">Off-Nominal planning: down USS</a><br><a href="../../scenarios/astm/utm/off_nominal_planning/down_uss_equal_priority_not_permitted.md">Off-Nominal planning: down USS with equal priority conflicts not permitted</a></td>
@@ -59,6 +59,11 @@
5959
<td>Implemented</td>
6060
<td><a href="../../scenarios/astm/utm/dss/synchronization/subscription_synchronization.md">ASTM SCD DSS: Subscription Synchronization</a></td>
6161
</tr>
62+
<tr>
63+
<td><a href="../../requirements/astm/f3548/v21.md">DSS0210,1b</a></td>
64+
<td>Implemented</td>
65+
<td><a href="../../scenarios/astm/utm/dss/synchronization/subscription_synchronization.md">ASTM SCD DSS: Subscription Synchronization</a></td>
66+
</tr>
6267
<tr>
6368
<td><a href="../../requirements/astm/f3548/v21.md">DSS0210,1c</a></td>
6469
<td>Implemented</td>

0 commit comments

Comments
 (0)