Valentin Lab
2ab84d6692
fix: [compose-core] make special ``no-hooks`` keyword work properly in actions
10 months ago
Valentin Lab
78d3cb4da1
new: [compose-core] prevent sub compose command to try to solve again relation constraints
This is because sub-compose command are often in a subset of the
services and as a consequence they do not share the same environment
and might solve the constraints differently.
10 months ago
Valentin Lab
a9b2c33f96
fix: dev: [compose] avoid unnecessary command ``cat``
10 months ago
Valentin Lab
5d6de46968
fix: [compose] ensure cache directory is available on linux as we can use it
10 months ago
Valentin Lab
bf4da4d8a2
fix: [compose] catch possible error and bail out
10 months ago
Valentin Lab
aded4a7dde
new: [compose-core] add ``memory.limit`` metadata value to limit container's memory
2 years ago
Valentin Lab
9423313038
new: [compose-core] provide ``COMPOSE_ACTION`` to charms
2 years ago
Valentin Lab
15862fe3a8
fix: get only running container for service of given project for =get_running_containers_for_service=
2 years ago
Valentin Lab
264daf1417
fix: do not allow grabbing other project's container when using =ensure_db_docker_running=
2 years ago
Valentin Lab
507997d3a4
fix: ``get_all_relations`` should set ``ALL_RELATIONS`` even on cache hit
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
2 years ago
Valentin Lab
7c23009e9e
new: consider all relations involved in an indirect action upon call of indirect action
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
2 years ago
Valentin Lab
0067609601
fix: default value for ``constraint`` in relation definition of ``metadata.yml`` enforced on empty values.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
2 years ago
Valentin Lab
c559c5b78b
fix: default value for ``auto`` in relation definition of ``metadata.yml`` enforced on empty values.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
2 years ago
Valentin Lab
ba9c23c04d
fix: [compose-core] prevent summoning each services in one go
Some requirement might solve other requests, especially the ones that
are not clear because more than one provider exist.
10 months ago
Valentin Lab
99b78d9411
fix: [compose-core] apply bash syntax improvements
12 months ago
Valentin Lab
cba4f2576f
new: [compose-core] add new ``stub`` service type
``stub`` services do not have any container running nor images.
They are intended to stand for externally managed services.
12 months ago
Valentin Lab
0330936bce
fix: dev: [compose-core] remove useless code !minor
1 year ago
Valentin Lab
62baa4f655
new: [compose-core] avoid displaying information about optional relations available in quiet mode
1 year ago
Valentin Lab
15ac855df8
new: [compose-core] add ``--get-available-actions`` commands
1 year ago
Valentin Lab
00046e6eb2
fix: dev: replace a ``return`` with an ``exit`` !minor
1 year ago
Valentin Lab
bafb5e01ee
fix: [compose-core] improve safety of a bash construct !minor
1 year ago
Valentin Lab
9f4faac412
new: [compose-core] add ``-c|--color`` argument to force color mode
1 year ago
Valentin Lab
0385df68a4
fix: [compose-core] quit with error if ``get_master_service_for_service`` fails
1 year ago
Valentin Lab
9578503e4d
fix: [compose-core] use ``return 1`` instead of ``exit 1`` in ``_get_container_relation()``
1 year ago
Valentin Lab
e89a2d5764
fix: [compose-core] use ``return`` instead of ``exit`` in ``get_healthy_container_ip_for_service``
1 year ago
Valentin Lab
7d860f732a
fix: [compose-core] display errors when running action and constraints are not verified
Before it would quit without any notice. A message is also added for a
common fix when constraints fails unexpectedly.
1 year ago
Valentin Lab
c9f077fce9
fix: make ``shyaml`` installation work again
1 year ago
Valentin Lab
ba79db69a2
fix: use new ``yq`` with ``--nul-output``
Some charms are now using it (as ``gitea``)
1 year ago
Valentin Lab
c447238e0d
fix: [compose] prevent session directory to disappear
2 years ago
Valentin Lab
ec75b78199
fix: output docker cleaning information on the stderr
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
2 years ago
Valentin Lab
d08939ba38
chg: dev: no need to check constraints on infered relation when running action
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
2 years ago
Valentin Lab
142167c7fc
fix: dev: ``exit`` and ``return`` corrections !minor
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
2 years ago
Valentin Lab
3a001879fc
fix: [compose,compose-core] revert detection of used volume
This is not iso-functional and can't detect if a subvolume was mounted.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
2 years ago
Valentin Lab
7a475500b2
fix: [compose] prevent stalling when ``docker inspect`` stalls on a container.
Improve ``is_volume_used`` implementation largely and doesn't require
``docker inspect`` call anymore.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
2 years ago
Valentin Lab
adcd35cc1a
fix: [compose-core] spurious ``return`` in shell body !minor
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
2 years ago
Valentin Lab
f1d99cea05
new: [compose-core] add ``after`` option in relation definition
With ``after``, you can specify another relation name or a list of
relation names, after which the current relation must wait before
launching it's relation hook.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
2 years ago
Valentin Lab
b3c077ee91
fix: allow build after git.0k.io web interface loss and letsencrypt SSL curl system issue
- Alpine base system move from ``3.7`` to ``3.11`` to fix the SSL issue.
- add ``diffutils`` for full blown GNU ``diff`` support
- update of ``kal-shlib-{charm,common,docker}`` versions
- replacement of ``http://git.0k.io `` by hand picked binaries in
``https://docker.0k.io/download ``.
- some forced lib update due to alpine base version change
- pyyaml from ``4.1`` to ``5.4.1``
- add ``yq`` and ``patch``
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
2 years ago
Valentin Lab
0429fab695
fix: [compose-core] whitespaces !minor
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
2 years ago
Valentin Lab
b067d0965a
new: [compose-core] add ability to enforce no-hooks from actions script
Keywords are added in a comment line with ``compose:`` prefix. Keywords
should be space separated. Example:
#!/bin/bash
## compose: no-hooks foo bar
# ... CODE ...
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
2 years ago
Valentin Lab
084f9a0c0a
fix: [compose-core] repair indirect action
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
2 years ago
Valentin Lab
21ec7626c6
chg: dev: [compose-core] minor performance improvement by delaying local declaration !minor
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
de940f402e
fix: dev: [compose-core] minor improvement against unintended option to ``echo`` !minor
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
cb1772f187
fix: [compose-core] make ``get_relation_data_dir()`` output correct directory even when run from a relation
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
29423ac3b6
new: [compose-core] make ``service:relation-file`` always return an existing file
It must create it with ``compose`` / ``default-options`` values by
default if not already created.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
a4d329e570
fix: [compose-core] ``$PROJECT_NAME`` was not available anymore in direct action
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
d486bf50bd
new: [compose-core] add relation and service traversal utilities
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
f4b0750429
fix: [compose-core] not ignore port and timeout arguments
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
c3020e1e6b
fix: invalid default value for ``constraint``
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
12e7d39c90
fix: make error in action NOT ignored as it was meant before
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
a882780b6d
fix: correct typo when using old version of docker !minor
This code is probably not so useful if using compose in docker.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago