Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Added ignore unreachable option to the serial variable Feature #37309 #37587
This change permit to pass an ignore unreachable option to serial variable.
_get_serialized_batches now return 2 lists
But this create a validation problem, we need to be sure that ignore length is the same of serial and raise an exception.
As we know, the problem is that the executor consider unreachable as failed, if we want to not consider this behavior, we need to pass in someway an option for the executor.
The useful thing of this implementation is that is fully compatible with old implementations and we do not need to modify anything else, you can use:
I already added modification to the documentation, it need a review and possibly some improvement on it.
I'm not sure I like this syntax. Having to use a positional type argument for this will cause problems. I'd prefer that instead of a list a dict were used so the fields would be labeled.
I think the positional is the most simple way to implement the future. The code use always the first position for the group and second for the True, False (1,0)
If you use a dictionary you need an ordered dict, otherwise you can't loop over the inserted values in sequence.
I do not think we could have confusion with positional, we are responsible users and the documentation can explain the context. Also, the default context is always to use 0 if 1 is not explicit, so we will have always the standard behaviour.
P.S. Sorry for some typos, English is not my first language.
Anyway this is the eventual code for a dict
If we have
And result will be 2 lists:
It is possible also to permit the use of list with positional on serial variable if we like.
This piece of code need also to be improved with a check of a wrong value like this
At this point should be better to write a function for this process with related unit tests.