Open BenjaminPelletier opened 2 months ago
@BenjaminPelletier, regarding point 2. above: I'm assuming that passing parse_result=True
in op_intent_from_flightrecord
is not going to be a sufficient fix: If I do set the flag to true, the flight planning request fails (at least on f3548_self_contained
) – This makes sense if we're trying to build incorrect objects, just mentiong in case we would actually expect the parsing to succeed.
I'll look into a way of obtaining a proper f3548_v21.OperationalIntent
object that does not involve parsing the object.
Yep, it's a larger conceptual issue -- can't parse an intentionally-invalid object.
base_object
. This seems to work.If mutation is not desirable I assume we could use copy.deepcopy(), although I have not tested this yet.
@BenjaminPelletier this should be solved as the problems identifies by this issue have been addressed by #775 and #774, but could you by any change confirm this on the environment where the problem was originally discovered? I'll leave the issue open until then.
Observed behavior USS under test fails Awareness of relevant operational intents scenario because mock_uss has a pre-existing operational intent with intentionally-incorrect data (priority = 1.2) from the previous scenario, Data Validation of GET operational intents by USS, and the USS under test (correctly) cannot parse this invalid operational intent.
Test check N/A
Difference from expected behavior
.reference
field access) -- we should not attempt to treat a plain dict like an ImplicitDict type a. The underlying issue is that the addition of theparse_result
argument broke the type-hint contract of the function. Theapply_overrides
type hinting indicates that it returns an ImplicitDictType (specifically, the same type as the providedbase_object
), but whenparse_result
is false, it does not do this -- instead, it returns a plain dict. This is a problem whenop_intent_from_flightrecord
should be returning anf3548_v21.OperationalIntent
and instead returns a dict.Additional context See attached report for an example of this problem:
sequence.zip