-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #436 from NASA-AMMOS/release/v1-0-0
Release Version 1.0.0
- Loading branch information
Showing
7 changed files
with
171 additions
and
9 deletions.
There are no files selected for viewing
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
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
161 changes: 161 additions & 0 deletions
161
docs/source/user-guide/upgrade-guides/0-13-2-to-1-0-0.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
# 0.13.2 to 1.0.0 | ||
|
||
This document describes the upgrade instructions from `0.13.2` to `1.0.0`. | ||
|
||
## Activity Directive New Primary Key ([#380](https://github.com/NASA-AMMOS/aerie/pull/380)) | ||
|
||
Before this change an `activity_directive` was just uniquely identified by `id` across different plans. | ||
Now an `activity_directive` is uniquely identified with both an `id` and a `plan_id`. | ||
Any API call that queries or mutates an `activity_directive` now needs to include both an `id` and `plan_id`. | ||
|
||
For example see this update to an `activity_directive` mutation. Notice we include both the `id` and `plan_id` in the primary key columns field (pk_columns) to uniquely identify the activity. | ||
|
||
``` | ||
mutation UpdateActivityDirective( | ||
$id: Int! | ||
$plan_id: Int! | ||
$activityDirectiveSetInput: activity_directive_set_input! | ||
) { | ||
update_activity_directive_by_pk( | ||
pk_columns: { id: $id, plan_id: $plan_id } | ||
_set: $activityDirectiveSetInput | ||
) { | ||
id | ||
} | ||
} | ||
``` | ||
|
||
## Improved Test Ergonomics ([#382](https://github.com/NASA-AMMOS/aerie/pull/382)) | ||
|
||
Previously if a unit test needed to spawn activities it would need a lot of boilerplate. Now unit tests that spawn activities are no different from other unit tests that use the `MerlinExtension`. To update your existing tests you need to do the following: | ||
|
||
1. The constructor of the unit test class should take a single `Registrar` parameter, rather than the `MerlinTestContext` | ||
1. Previous uses of `ctx.registrar()` can use this registrar argument instead | ||
1. Previous uses of `ctx.use()` can safely be deleted - they are no longer necessary | ||
|
||
It is also recommended to use the `@ExtendWith(MerlinExtension.class)` annotation instead of the `@RegisterExtension` static method. | ||
|
||
Please reference [this diff](https://github.com/NASA-AMMOS/aerie/commit/de36ac4983dbc830b3691077439758fdd0491eee#diff-d2f70599d51fd583111cde71d52820ccaec50abc4d13ae62c30e5ae10b97d8b9) which makes these updates to one of our example mission models. | ||
|
||
## Move 'TaskFactory' from Framework to Protocol ([#382](https://github.com/NASA-AMMOS/aerie/pull/382)) | ||
|
||
So the simulation can manage task creation the `TaskFactory` has been moved to the Merlin protocol. | ||
|
||
Any reference to: | ||
|
||
```java | ||
gov.nasa.jpl.aerie.merlin.framework.Context.TaskFactory | ||
``` | ||
|
||
Need to change to: | ||
|
||
```java | ||
gov.nasa.jpl.aerie.merlin.protocol.model.TaskFactory | ||
``` | ||
|
||
## Remove 'RootModel' ([#382](https://github.com/NASA-AMMOS/aerie/pull/382)) | ||
|
||
Previously a mission model needed to be wrapped in a `RootModel` prior to simulation. Because task creation has been moved to the simulation engine, the `RootModel` is no longer necessary. | ||
|
||
## Update Constraint Boolean Operator Names ([#407](https://github.com/NASA-AMMOS/aerie/pull/407)) | ||
|
||
The constraints DSL has renamed some boolean operators to be more clear. You should rename the following: | ||
|
||
1. `All` -> `And` | ||
1. `Any` -> `Or` | ||
1. `Invert` -> `Not` | ||
|
||
For example the following constraint uses the new operators: | ||
|
||
```ts | ||
export default (): Constraint => { | ||
return Windows.Not( // Used to be '.Invert' | ||
Windows.Or( // Used to be '.Any' | ||
Discrete.Resource("/resource/A").equal("OPEN"), | ||
Windows.And( // Used to be '.All' | ||
Discrete.Resource("/resource/B").equal("FALSE"), | ||
Discrete.Resource("/resource/C").equal("FALSE") | ||
) | ||
) | ||
); | ||
}; | ||
``` | ||
|
||
## Global Scheduling Conditions Mutex ([#410](https://github.com/NASA-AMMOS/aerie/pull/410)) | ||
|
||
Previously the scheduler would avoid placing activities of the same type overlapping each other. Now by default the scheduler is allowed to place overlapping activities of the same type. If you want mutual exclusion you need to use a global scheduling condition. Please see our [documentation on global scheduling conditions](https://nasa-ammos.github.io/aerie/develop/user-guide/ui-api-guide/scheduling/scheduling-conditions.html#authoring-scheduling-global-conditions) for more detailed instructions. | ||
|
||
## Rename "condition" table to "constraint" ([#419](https://github.com/NASA-AMMOS/aerie/pull/419)) | ||
|
||
The "condition" table has been renamed to "constraint" to avoid confusion with global scheduling conditions. Any API queries or mutations that used "condition" before will need to be updated. For example the following query uses the new "constraint" name: | ||
|
||
``` | ||
query GetConstraints { | ||
constraint { # Used to be 'condition' | ||
definition | ||
description | ||
id | ||
model_id | ||
name | ||
plan_id | ||
summary | ||
} | ||
} | ||
``` | ||
|
||
## SimulationResults Java Class No Longer Provides 'resourceSamples' Field ([#423](https://github.com/NASA-AMMOS/aerie/pull/423)) | ||
|
||
Prior to this change, the `resourceSamples` field was derived from `realProfiles` and `discreteProfiles` via the `takeSample`s method - upon calling the `SimulationResults` constructor, `takeSamples` would be called eagerly. In typical usage, `resourceSamples` is unused - the simulation results are written to the database using the `realProfiles` and `discreteProfiles` directly. The only time it is used (outside of testing) is via the explicit `resourceSamples` Hasura action. | ||
|
||
Any test code that refers to `resourceSamples` will need to get that information from `realProfiles` and `discreteProfiles` instead. You can use the following "drop in" method if you still want to use `resourceSamples` in your Java code: | ||
|
||
```java | ||
static Map<String, List<Pair<Duration, SerializedValue>>> takeSamples(SimulationResults simulationResults) { | ||
final var samples = new HashMap<String, List<Pair<Duration, SerializedValue>>>(); | ||
|
||
simulationResults.realProfiles.forEach((name, p) -> { | ||
var elapsed = Duration.ZERO; | ||
var profile = p.getRight(); | ||
|
||
final var timeline = new ArrayList<Pair<Duration, SerializedValue>>(); | ||
for (final var piece : profile) { | ||
final var extent = piece.getLeft(); | ||
final var dynamics = piece.getRight(); | ||
|
||
timeline.add(Pair.of(elapsed, SerializedValue.of( | ||
dynamics.initial))); | ||
elapsed = elapsed.plus(extent); | ||
timeline.add(Pair.of(elapsed, SerializedValue.of( | ||
dynamics.initial + dynamics.rate * extent.ratioOver(Duration.SECONDS)))); | ||
} | ||
|
||
samples.put(name, timeline); | ||
}); | ||
simulationResults.discreteProfiles.forEach((name, p) -> { | ||
var elapsed = Duration.ZERO; | ||
var profile = p.getRight(); | ||
|
||
final var timeline = new ArrayList<Pair<Duration, SerializedValue>>(); | ||
for (final var piece : profile) { | ||
final var extent = piece.getLeft(); | ||
final var value = piece.getRight(); | ||
|
||
timeline.add(Pair.of(elapsed, value)); | ||
elapsed = elapsed.plus(extent); | ||
timeline.add(Pair.of(elapsed, value)); | ||
} | ||
|
||
samples.put(name, timeline); | ||
}); | ||
|
||
return samples; | ||
} | ||
``` | ||
|
||
## Rename 'command-expansion-server' to 'sequencing-server' ([#439](https://github.com/NASA-AMMOS/aerie/pull/439)) | ||
|
||
To better align with the domain of Aerie sequencing features (command expansion, sequence authoring, command dictionary management, etc.) the `aerie-commanding` image was renamed to `aerie-sequencing`. Any downstream deployment configuration that was using `aerie-commanding` needs to be updated to reference the new [aerie-sequencing image](https://github.com/NASA-AMMOS/aerie/pkgs/container/aerie-sequencing). You can reference the updated deployment [docker-compose.yml](https://github.com/NASA-AMMOS/aerie/blob/develop/deployment/docker-compose.yml#L102) for a detailed example. | ||
|
||
## Add Scheduler Workers ([#406](https://github.com/NASA-AMMOS/aerie/pull/406)) | ||
|
||
A scheduler worker has been added that allows for running multiple concurrent scheduling jobs. You need to make sure any downstream deployment configurations now use at least one [aerie-scheduler-worker image](https://github.com/NASA-AMMOS/aerie/pkgs/container/aerie-scheduler-worker). You can reference the updated deployment [docker-compose.yml](https://github.com/NASA-AMMOS/aerie/blob/develop/deployment/docker-compose.yml#L81) for a detailed example. Also please read the updated [Aerie Scheduler](https://github.com/NASA-AMMOS/aerie/blob/develop/deployment/Environment.md#aerie-scheduler) and [Aerie Scheduler Worker](https://github.com/NASA-AMMOS/aerie/blob/develop/deployment/Environment.md#aerie-scheduler-worker) environment variables to make sure your deployment is up-to-date. |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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