-
Notifications
You must be signed in to change notification settings - Fork 21
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
Schedule Activities Based On External Events #1585
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pranav-super
had a problem deploying
to
e2e-test
October 23, 2024 21:41 — with
GitHub Actions
Failure
pranav-super
had a problem deploying
to
e2e-test
October 23, 2024 21:45 — with
GitHub Actions
Failure
pranav-super
requested review from
dandelany
and removed request for
joswig and
srschaffJPL
October 24, 2024 18:27
scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/solver/PrioritySolver.java
Outdated
Show resolved
Hide resolved
JoelCourtney
force-pushed
the
feat/proc-sched-external-events
branch
from
October 31, 2024 22:44
bd037db
to
cea3b09
Compare
JoelCourtney
had a problem deploying
to
e2e-test
October 31, 2024 22:44 — with
GitHub Actions
Failure
JoelCourtney
force-pushed
the
feat/proc-sched-external-events
branch
from
November 1, 2024 00:10
cea3b09
to
f655203
Compare
Rebased to clean up the git history |
JoelCourtney
force-pushed
the
feat/proc-sched-external-events
branch
from
November 1, 2024 00:13
f655203
to
30d99ad
Compare
skovati
requested changes
Nov 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great so far! Nice work. Just have a few questions about streamlining the filtering API we're exposing to users to simplify things.
procedural/timeline/src/main/kotlin/gov/nasa/ammos/aerie/procedural/timeline/plan/Plan.kt
Show resolved
Hide resolved
...eline/src/main/kotlin/gov/nasa/ammos/aerie/procedural/timeline/collections/ExternalEvents.kt
Show resolved
Hide resolved
skovati
reviewed
Nov 4, 2024
...a/gov/nasa/jpl/aerie/e2e/procedural/scheduling/procedures/ExternalEventsSourceQueryGoal.java
Show resolved
Hide resolved
skovati
approved these changes
Nov 4, 2024
pranav-super
force-pushed
the
feat/proc-sched-external-events
branch
from
November 4, 2024 20:57
6df592f
to
05da212
Compare
pranav-super
force-pushed
the
feat/proc-sched-external-events
branch
from
November 4, 2024 21:05
05da212
to
b9055eb
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Following the introduction of External Events in #1513, this PR introduces the ability to schedule Activities based off of External Event occurrences, using the procedural scheduler.
This PR introduces 4 new types which users can use in their definition of scheduling procedures to narrow down the external events they would like to schedule off of and which properties they would like to access:
ExternalEvent
type, which contains event-specific properties,ExternalEvents
type, which represents a filterable collection of said events,EventQuery
type, which can be used to filter the set of allExternalEvent
s associated with a given plan by theirExternalSource
, derivation group, or event type.ExternalSource
type, which can be used byEventQuery
s to narrow down the set of events being examined by a procedure to those contained in specific sources.To make this more explicitly clear, we will illustrate an example, based on the tests in
ExternalEventsTests.java
under thee2e-tests
directory.Consider this set of events:
Consider scheduling the Banananation activity
BiteBanana
off of these events.This can mean a variety of different things, depending on the exact behavior we desire:
"TestGroup"
"Test_Type"
"01"
in their key.For the sake of brevity, we will explore just one case - events belonging to the second source with the substring
"01"
in their key. This case makes use of all of the types described above.This goal does the following:
EventQuery
to select events belonging to the second source. To specify that selector, we create anExternalSource
object, whose properties are the two properties necessary to uniquely identify twoExternalSource
s in AERIE: akey
and aderivation_group_name
.plan.events(eventQuery)
. This returns all external events associated with a plan (based on the associated derivation groups), and filters them according to the passed-in query.key
) now to further match our requirements.getInterval().start
.After running it, we get the following result in AERIE:
As expected, there is a single activity, scheduled off of an
Event_01
from the second source.Verification
The changes were verified both by testing with our own models, and subsequent testing of the 4 new types listed above in a few end-to-end tests (see
ExternalEventsTests.java
under thee2e-tests
directory).Documentation
Documentation will need to be added to aerie-docs to describe how scheduling using external events work. As this feature is solely an addition, no existing documentation is invalidated; the documentation is simply expanded.
Future work
The next steps for External Event work are: