Skip to content

Commit

Permalink
update script
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Jul 15, 2024
1 parent 419ce6b commit e3c4ee6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
- improvements to the UI's experiment profile preview.
- `hours_elapsed()` is a function in profile expressions, which returns the hours since the profile started.
- `unit()` can be used in mqtt fetch expressions. Example: `unit():stirring:target_rpm` is identical to `::stirring:target_rpm`. The latter can be seen as a shortened version of the former.
- experiment profiles can have a `description` in the `job` field (i.e. beside `actions`).
- experiment profiles can have a `description` in the `job` field (i.e. at the same level as `actions`).
- Updated Raspberry Pi OS image to 2024-07-04.

#### Breaking changes

- remove the temperature_control, dosing_control, and led_control abstractions. These were introduced early in the Pioreactor software as a way to quickly change automations, but they have been more of a wort than a win. While working on the internals of experiment profiles recently, it became more and more clear how poor this abstraction was. The removal of them has some consequences and some backward incompatibilities, however
- remove the temperature_control, dosing_control, and led_control abstractions. These were introduced early in the Pioreactor software as a way to quickly change automations, but they have been more of a wort than a win. While working on the internals of experiment profiles recently, it became more and more clear how poor this abstraction was. The removal of them has some consequences and some backward incompatibilities:

- updating experiment profiles: experiment profiles that have a `*_control` job will need to be updated to use `*_automation`, _eventually_. For now, we are allowing `*_control` in profiles: in the backend, we are renaming `*_control` to `*_automations`, but a warning will be produced. Later, we'll remove this renaming and profiles will need to be completely updated. Example:
```yaml
Expand Down Expand Up @@ -65,15 +65,15 @@
- update plugins. For users using, specifically, the high-temp plugin, or temperature-expansion-kit plugin, new plugins will be released. Look on the forums, or documentation, for update instructions.
The benefits of removing this abstraction is much less code, less overhead, easier developer experience, and overall simplification. Later, we may create a new abstraction, but now we are moving abstractions back the level 0.
The benefits of removing this abstraction is much less code, less overhead, easier developer experience, and overall simplification. Later, we may create a new abstraction, but now we are moving abstractions back to level 0.
- `log` in experiment profiles now uses expressions instead of Python string formatting. For example: `The unit {unit} is running {job} in experiment {experiment}` should be replaced by expressions in the string: `The unit ${{unit()}} is running ${{job_name()}} in the experiment ${{experiment}}`. Note: `{job}` is not `${{job_name()}}`.
- `log` in experiment profiles now uses expressions instead of Python string formatting. For example: `The unit {unit} is running {job} in experiment {experiment}` should be replaced by expressions in the string: `The unit ${{unit()}} is running ${{job_name()}} in the experiment ${{experiment}}`. Note: `{job}` is now `${{job_name()}}`.
- `cycle_media` and `cycle_alt_media` now publish dosing events, and will be recorded by dosing automations, and the db.


#### Bug fixes

- This behaviour was not intended: when pausing temperature automations, the heater now turns off and stays off until unpaused.
- `cycle_media` and `cycle_alt_media` now publish dosing events, and will be recorded by dosing automations, and the db.
- When pausing temperature automations, the heater now turns off and stays off until unpaused. This is the intended behaviour.

### 24.7.5 & 24.7.6 & 24.7.7

Expand Down
1 change: 0 additions & 1 deletion update_scripts/24.6.10/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ if [ "$HOSTNAME" = "$LEADER_HOSTNAME" ]; then
# Use sed to remove lines containing 'log_type notice'
sudo sed -i '/^log_type notice$/d' "$CONFIG_FILE"


fi
17 changes: 15 additions & 2 deletions update_scripts/upcoming/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,18 @@ set -xeu
export LC_ALL=C


# If leader, delete the jobs 03_temperature_control.yaml, 04_dosing_control.yaml, 05_led_control.yaml
# If leader, delete the charts 06_temperature.yaml
PIO_DIR=/home/pioreactor/.pioreactor
# Get the hostname
HOSTNAME=$(hostname)

# Get the leader address
LEADER_HOSTNAME=$(crudini --get $PIO_DIR/config.ini cluster.topology leader_hostname)

if [ "$HOSTNAME" = "$LEADER_HOSTNAME" ]; then
sudo rm /var/www/pioreactorui/contrib/jobs/03_temperature_control.yaml
sudo rm /var/www/pioreactorui/contrib/jobs/04_dosing_control.yaml
sudo rm /var/www/pioreactorui/contrib/jobs/05_led_control.yaml

sudo rm /var/www/pioreactorui/contrib/charts/06_temperature.yaml

fi

0 comments on commit e3c4ee6

Please sign in to comment.