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

[uss_qualifier] Remove test step management from OpIntentValidator #428

Merged
merged 11 commits into from
Jan 9, 2024

Conversation

BenjaminPelletier
Copy link
Member

As part of #380, this PR moves test step management (beginning test steps and ending test steps) from inside OpIntentValidator to outside OpIntentValidator (almost always directly within the scenario). This usually results in combining a flight planning action/fragment with a sharing validation action/fragment within the same test step, and this should make test steps monotonic again (if test step B follows test step A, then the latest event in A should be earlier than the earliest step in B).

@BenjaminPelletier BenjaminPelletier marked this pull request as ready for review December 20, 2023 17:58
Copy link
Contributor

@mickmis mickmis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function expect_removed seems to be missing its implementation. Otherwise LGTM.

@@ -337,9 +335,9 @@ def _operational_intent_shared_check(
self,
flight_intent: Union[InjectFlightRequest | FlightInfo],
skip_if_not_found: bool,
) -> OperationalIntentReference:
) -> Optional[OperationalIntentReference]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note FYI: this partially addresses a bug recently introduced. I was planning to make a PR to fix it, but the idea is that if this function returns None, the flow of the calling function should be stopped (previously: the test step ends). The issue does not pop up on the CI unfortunately, but this introduced a regression for some USSes implementation that we addressed in the last months.

@@ -131,12 +127,18 @@ def _begin_step(self):
query_timestamps=[self._after_query.request.timestamp],
)

def expect_removed(self, flight_id: EntityID) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like expect_removed is missing its implementation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eek, thanks -- will fix.

@BenjaminPelletier BenjaminPelletier marked this pull request as draft December 21, 2023 17:33
@BenjaminPelletier
Copy link
Member Author

Note: I'm intending to resync this PR after #444 is merged

@BenjaminPelletier BenjaminPelletier marked this pull request as ready for review December 27, 2023 19:24
@BenjaminPelletier
Copy link
Member Author

@mickmis ready for a second round, I think -- please do be skeptical when reviewing as I've had to merge and patch a couple different times and very well may have missed something or done something wrong, especially since this PR isn't simple to begin with.

Copy link
Contributor

@mickmis mickmis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did my best to be thorough, and LGTM, nice to see the step fragments finally applied to the validator :)

@@ -78,7 +78,6 @@ def plan_flight_intent(

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this there is modify_planned_flight_intent as well that has a test_step parameter that should be removed. The function is not used anywhere though so that should not imply additional changes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good; done.

@BenjaminPelletier BenjaminPelletier merged commit 4ac63f9 into interuss:main Jan 9, 2024
9 checks passed
@BenjaminPelletier BenjaminPelletier deleted the opintentvalidator branch January 9, 2024 18:46
github-actions bot added a commit that referenced this pull request Jan 9, 2024
)

* Remove test step management from OpIntentValidator

* Finish implementation

* Fix merge issues

* Fix hygiene

* Fix hygiene fix

* Remove test_step from unused function per comments 4ac63f9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants