Skip to content

Commit cfd9ced

Browse files
authored
Merge pull request #6604 from agoscinski/support/2.6.3
Release `v2.6.3`
2 parents 5faff07 + b78c21f commit cfd9ced

File tree

15 files changed

+173
-58
lines changed

15 files changed

+173
-58
lines changed

.docker/aiida-core-base/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ RUN set -x && \
137137
mamba && \
138138
rm micromamba && \
139139
# Pin major.minor version of python
140-
mamba list python | grep '^python ' | tr -s ' ' | cut -d ' ' -f 1,2 >> "${CONDA_DIR}/conda-meta/pinned" && \
140+
mamba list python | grep -oP 'python\s+\K[\d.]+' | tr -s ' ' | cut -d ' ' -f 1,2 >> "${CONDA_DIR}/conda-meta/pinned" && \
141141
mamba clean --all -f -y && \
142142
fix-permissions "${CONDA_DIR}" && \
143143
fix-permissions "/home/${SYSTEM_USER}"

.docker/aiida-core-base/s6-assets/init/aiida-prepare.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ verdi config set warnings.development_version False
1818
# If the environment variable `SETUP_DEFAULT_AIIDA_PROFILE` is not set, set it to `true`.
1919
if [[ ${SETUP_DEFAULT_AIIDA_PROFILE:-true} == true ]] && ! verdi profile show ${AIIDA_PROFILE_NAME} &> /dev/null; then
2020

21-
# For the container that includes the services, this script is called as soon as the RabbitMQ startup script has
22-
# been launched, but it can take a while for the service to come up. If ``verdi presto`` is called straight away
23-
# it is possible it tries to connect to the service before that and it will configure the profile without a broker.
24-
sleep 5
25-
2621
# Create AiiDA profile.
2722
verdi presto \
2823
--verbosity info \
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
rabbitmq-diagnostics ping
4+
5+
if [ $? -ne 0 ]; then
6+
exit 1
7+
fi
8+
9+
rabbitmq-diagnostics check_running
10+
11+
if [ $? -ne 0 ]; then
12+
exit 1
13+
fi
14+
15+
exit 0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3

.docker/aiida-core-with-services/s6-assets/s6-rc.d/rabbitmq/run

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,14 @@
22

33
with-contenv
44

5-
foreground { s6-echo "Calling /etc/init/rabbitmq.sh" }
6-
rabbitmq-server
5+
foreground { s6-echo "Starting RMQ server and notifying back when the service is ready" }
6+
7+
8+
# For the container that includes the services, aiida-prepare.sh script is called as soon as the RabbitMQ startup script has
9+
# been launched, but it can take a while for the RMQ service to come up. If ``verdi presto`` is called straight away
10+
# it is possible it tries to connect to the service before that and it will configure the profile without a broker.
11+
# Here we use s6-notifyoncheck to do the polling healthy check of the readyness of RMQ service.
12+
#
13+
# -w 500: 500 ms between two invocations of ./data/check
14+
15+
s6-notifyoncheck -w 500 rabbitmq-server

.github/workflows/extract-docker-image-names.sh

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,35 @@ set -euo pipefail
99
# The input to this script is a JSON string passed via BAKE_METADATA env variable
1010
# Here's example input (trimmed to relevant bits):
1111
# BAKE_METADATA: {
12-
# "base": {
12+
# "aiida-core-base": {
13+
# # ...
1314
# "containerimage.descriptor": {
1415
# "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
1516
# "digest": "sha256:8e57a52b924b67567314b8ed3c968859cad99ea13521e60bbef40457e16f391d",
1617
# "size": 6170,
1718
# },
1819
# "containerimage.digest": "sha256:8e57a52b924b67567314b8ed3c968859cad99ea13521e60bbef40457e16f391d",
19-
# "image.name": "ghcr.io/aiidalab/base"
20-
# },
21-
# "aiida-core-base": {
2220
# "image.name": "ghcr.io/aiidateam/aiida-core-base"
23-
# "containerimage.digest": "sha256:6753a809b5b2675bf4c22408e07c1df155907a465b33c369ef93ebcb1c4fec26",
24-
# "...": ""
25-
# }
26-
# "aiida-core-with-services": {
27-
# "image.name": "ghcr.io/aiidateam/aiida-core-with-services"
28-
# "containerimage.digest": "sha256:85ee91f61be1ea601591c785db038e5899d68d5fb89e07d66d9efbe8f352ee48",
29-
# "...": ""
30-
# }
21+
# },
3122
# "aiida-core-dev": {
32-
# "image.name": "ghcr.io/aiidateam/aiida-core-with-services"
3323
# "containerimage.digest": "sha256:4d9be090da287fcdf2d4658bb82f78bad791ccd15dac9af594fb8306abe47e97",
24+
# "...": ...
25+
# "image.name": "ghcr.io/aiidateam/aiida-core-dev"
26+
# },
27+
# "aiida-core-with-services": {
3428
# "...": ""
35-
# }
29+
# "containerimage.digest": "sha256:85ee91f61be1ea601591c785db038e5899d68d5fb89e07d66d9efbe8f352ee48",
30+
# "image.name": "ghcr.io/aiidateam/aiida-core-with-services"
31+
# },
32+
# "some-other-key": ...
3633
# }
3734
#
3835
# Example output (real output is on one line):
3936
#
4037
# images={
41-
# "AIIDA_CORE_BASE_IMAGE": "ghcr.io/aiidateam/aiida-core-base@sha256:8e57a52b924b67567314b8ed3c968859cad99ea13521e60bbef40457e16f391d",
42-
# "AIIDA_CORE_WITH_SERVICES_IMAGE": "ghcr.io/aiidateam/aiida-core-with-services@sha256:6753a809b5b2675bf4c22408e07c1df155907a465b33c369ef93ebcb1c4fec26",
43-
# "AIIDA_CORE_DEV_IMAGE": "ghcr.io/aiidateam/aiida-core-dev@sha256:85ee91f61be1ea601591c785db038e5899d68d5fb89e07d66d9efbe8f352ee48",
38+
# "AIIDA_CORE_BASE_IMAGE": "ghcr.io/aiidateam/aiida-core-base@sha256:4c402a8bfd635650ad691674f8f29e7ddec5fa656fb425452067950415ee447f",
39+
# "AIIDA_CORE_DEV_IMAGE": "ghcr.io/aiidateam/aiida-core-dev@sha256:f94c06e47f801e751f9829010b31532039b210aad2649d43205e16c08371b2ed",
40+
# "AIIDA_CORE_WITH_SERVICES_IMAGE": "ghcr.io/aiidateam/aiida-core-with-services@sha256:bd8272f2a331af7eac3e83c44cc16d23b2e5f601a20ab4a865402659b758515e"
4441
# }
4542
#
4643
# This json output is later turned to environment variables using fromJson() GHA builtin
@@ -52,5 +49,7 @@ if [[ -z ${BAKE_METADATA-} ]];then
5249
exit 1
5350
fi
5451

55-
images=$(echo "${BAKE_METADATA}" | jq -c '. as $base |[to_entries[] |{"key": (.key|ascii_upcase|sub("-"; "_"; "g") + "_IMAGE"), "value": [(.value."image.name"|split(",")[0]),.value."containerimage.digest"]|join("@")}] |from_entries')
52+
images=$(echo "${BAKE_METADATA}" |
53+
jq -c 'to_entries | map(select(.key | startswith("aiida"))) | from_entries' | # filters out every key that does not start with aiida
54+
jq -c '. as $base |[to_entries[] |{"key": (.key|ascii_upcase|sub("-"; "_"; "g") + "_IMAGE"), "value": [(.value."image.name"|split(",")[0]),.value."containerimage.digest"]|join("@")}] |from_entries')
5655
echo "images=$images"

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## v2.6.3 - 2024-11-TODO
4+
5+
### Fixes
6+
- CLI: Fix exception for `verdi plugin list` (#6560) [[c3b10b7]](https://github.com/aiidateam/aiida-core/commit/c3b10b759a9cd062800ef120591d5c7fd0ae4ee7)
7+
- `DirectScheduler`: Ensure killing child processes (#6572) [[fddffca]](https://github.com/aiidateam/aiida-core/commit/fddffca67b4f7e3b76b19df7db8e1511c449d2d9)
8+
- Engine: Fix state change broadcast before process node is updated (#6580) [[867353c]](https://github.com/aiidateam/aiida-core/commit/867353c415c61d94a2427d5225dd5224a1b95fb9)
9+
10+
### Devops
11+
- Docker: Replace sleep with `s6-notifyoncheck` (#6475) [[9579378b]](https://github.com/aiidateam/aiida-core/commit/9579378ba063237baa5b73380eb8e9f0a28529ee)
12+
- Fix failed docker CI using more reasoning grep regex to parse python version (#6581) [[332a4a91]](https://github.com/aiidateam/aiida-core/commit/332a4a915771afedcb144463b012558e4669e529)
13+
- DevOps: Fix json query in reading the docker names to filter out fields not starting with aiida (#6573) [[e1467edc]](https://github.com/aiidateam/aiida-core/commit/e1467edca902867e53605e0e60b67f8767bf8d3e)
14+
15+
316
## v2.6.2 - 2024-08-07
417

518
### Fixes

src/aiida/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
'For further information please visit http://www.aiida.net/. All rights reserved.'
2828
)
2929
__license__ = 'MIT license, see LICENSE.txt file.'
30-
__version__ = '2.6.2'
30+
__version__ = '2.6.3'
3131
__authors__ = 'The AiiDA team.'
3232
__paper__ = (
3333
'S. P. Huber et al., "AiiDA 1.0, a scalable computational infrastructure for automated reproducible workflows and '

src/aiida/cmdline/commands/cmd_plugin.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,13 @@ def plugin_list(entry_point_group, entry_point):
4747
except EntryPointError as exception:
4848
echo.echo_critical(str(exception))
4949
else:
50-
try:
51-
if (inspect.isclass(plugin) and issubclass(plugin, Process)) or (
52-
hasattr(plugin, 'is_process_function') and plugin.is_process_function
53-
):
54-
print_process_info(plugin)
55-
else:
56-
echo.echo(str(plugin.get_description()))
57-
except AttributeError:
50+
if (inspect.isclass(plugin) and issubclass(plugin, Process)) or (
51+
hasattr(plugin, 'is_process_function') and plugin.is_process_function
52+
):
53+
print_process_info(plugin)
54+
elif plugin.__doc__:
55+
echo.echo(plugin.__doc__)
56+
else:
5857
echo.echo_error(f'No description available for {entry_point}')
5958
else:
6059
entry_points = get_entry_point_names(entry_point_group)

src/aiida/engine/processes/process.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -418,18 +418,14 @@ def on_entered(self, from_state: Optional[plumpy.process_states.State]) -> None:
418418

419419
from aiida.engine.utils import set_process_state_change_timestamp
420420

421-
super().on_entered(from_state)
422-
423421
if self._state.LABEL is ProcessState.EXCEPTED:
424422
# The process is already excepted so simply update the process state on the node and let the process
425423
# complete the state transition to the terminal state. If another exception is raised during this exception
426424
# handling, the process transitioning is cut short and never makes it to the terminal state.
427425
self.node.set_process_state(self._state.LABEL)
428426
return
429427

430-
# For reasons unknown, it is important to update the outputs first, before doing anything else, otherwise there
431-
# is the risk that certain outputs do not get attached before the process reaches a terminal state. Nevertheless
432-
# we need to guarantee that the process state gets updated even if the ``update_outputs`` call excepts, for
428+
# We need to guarantee that the process state gets updated even if the ``update_outputs`` call excepts, for
433429
# example if the process implementation attaches an invalid output through ``Process.out``, and so we call the
434430
# ``ProcessNode.set_process_state`` in the finally-clause. This way the state gets properly set on the node even
435431
# if the process is transitioning to the terminal excepted state.
@@ -443,6 +439,12 @@ def on_entered(self, from_state: Optional[plumpy.process_states.State]) -> None:
443439
self._save_checkpoint()
444440
set_process_state_change_timestamp(self.node)
445441

442+
# The updating of outputs and state has to be performed before the super is called because the super will
443+
# broadcast state changes and parent processes may start running again before the state change is completed. It
444+
# is possible that they will read the old process state and outputs that they check may not yet have been
445+
# attached.
446+
super().on_entered(from_state)
447+
446448
@override
447449
def on_terminated(self) -> None:
448450
"""Called when a Process enters a terminal state."""

0 commit comments

Comments
 (0)