Skip to content

Commit

Permalink
Merge pull request #436 from NASA-AMMOS/release/v1-0-0
Browse files Browse the repository at this point in the history
Release Version 1.0.0
  • Loading branch information
camargo authored Nov 15, 2022
2 parents 5aff889 + b88201f commit f00c877
Show file tree
Hide file tree
Showing 7 changed files with 171 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
# -- Global variables

# Build documentation for the following tags and branches
TAGS = ["v0.13.1", "v0.13.2"]
TAGS = ["v0.13.1", "v0.13.2", "v1.0.0"]
BRANCHES = ["develop"]
# Set the latest version.
LATEST_VERSION = "v0.13.2"
LATEST_VERSION = "v1.0.0"
# Set which versions are not released yet.
UNSTABLE_VERSIONS = ["develop"]
# Set which versions are deprecated
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user-guide/tutorials/ui-custom-base-path.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ This document lists the instructions for building an aerie-ui Docker image with
npm install
```

When you clone aerie-ui the default branch is [develop](https://github.com/NASA-AMMOS/aerie-ui/tree/develop). If you want to build an image from a [specific release](https://github.com/NASA-AMMOS/aerie-ui/releases) you have to checkout the proper tag. For example to checkout [v0.13.2](https://github.com/NASA-AMMOS/aerie-ui/releases/tag/v0.13.2) do:
When you clone aerie-ui the default branch is [develop](https://github.com/NASA-AMMOS/aerie-ui/tree/develop). If you want to build an image from a [specific release](https://github.com/NASA-AMMOS/aerie-ui/releases) you have to checkout the proper tag. For example to checkout [v1.0.0](https://github.com/NASA-AMMOS/aerie-ui/releases/tag/v1.0.0) do:

```sh
git checkout tags/v0.13.2 -b v0.13.2
git checkout tags/v1.0.0 -b v1.0.0
```

2. Update [svelte.config.js](https://github.com/NASA-AMMOS/aerie-ui/blob/develop/svelte.config.js) with the [base path](https://github.com/NASA-AMMOS/aerie-ui/blob/develop/svelte.config.js#L9) you want to use. Note that a leading `/` is required. So for example a valid base path is `/aerie`.
Expand Down
161 changes: 161 additions & 0 deletions docs/source/user-guide/upgrade-guides/0-13-2-to-1-0-0.md
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.
3 changes: 2 additions & 1 deletion docs/source/user-guide/upgrade-guides/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Upgrade Guides
.. toctree::
:maxdepth: 2

0-13-0-to-0-13-1
0-13-2-to-1-0-0
0-13-1-to-0-13-2
0-13-0-to-0-13-1
db_migration_assistant
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ publishing.version=
# Override for releases

# Change the version number here
version.number=0.13.2
version.number=1.0.0

# If you are publishing a release *manually* (i.e. not through github actions),
# override this on the command line with `./gradlew publish -Pversion.isRelease=true`.
Expand Down
4 changes: 2 additions & 2 deletions sequencing-server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sequencing-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sequencing-server",
"version": "0.13.2",
"version": "1.0.0",
"description": "Aerie sequencing server",
"type": "module",
"license": "MIT",
Expand Down

0 comments on commit f00c877

Please sign in to comment.