Auto-triggering: Overwrite the payload using the auto_followup pipeline's output + priority order #291
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should allow us to have one filter that can write different payloads based on multiple parameters, to simplify BTSbot requirements as well as prepare for the next ZTF experiment where we'll auto trigger SWIFT.
ALSO, we make it possible to specify in the auto_followup section of a filter whether or not the priority system to use is ascending (higher priority is more important) or descending (lower priority is more important). We could have Kowalski fetch the full list of allocations (like we fetch the list of all filters) in the future to enforce the same thing across all filters using the same allocation, but this could be quite a lot of work just to get this system to work with SWIFT's reversed priority system. Just to be safe, we do not allow anyone to POST/PATCH a filter with the same allocation as an existing filter BUT a different priority order, to completely avoid having filters with the same follow-up payload, allocation, but different priority systems for some odd reason.