eth-cscs / manta

Another CLI for Alps
https://eth-cscs.github.io/manta/
BSD 3-Clause "New" or "Revised" License
14 stars 3 forks source link

Is it possible to get all the artifacts of a given configuration #71

Closed miguelgila closed 3 months ago

miguelgila commented 4 months ago

Following the delete command, it would be really good to have the possibility to list all the artifacts related to a given CFS configuration that a SAT apply command generated. Something like this fake output for configuration :

CFS sessions:
+-----------------------------------------+------------------------------------------------------+--------------------------------------+
| Name                                    | Configuration                                        | Image ID                             |
+=======================================================================================================================================+
| wildhorn-mc-compute-cscs-24.3.0.r1-0.12 | image-wildhorn-mc-compute-config-cscs-24.3.0.r1-0.12 | 69775fca-eb2d-4989-8d10-3f4644910f88 |
+-----------------------------------------+------------------------------------------------------+--------------------------------------+
BOS sessiontemplates:
+---------------------------------------------------------+------------------------------------------------+--------------------------------------+
| Name                                                    | Configuration                                  | Image ID                             |
+=================================================================================================================================================+
| wildhorn-mc-compute-template-cscs-24.3.0.r1-0.12.x86_64 | wildhorn-mc-compute-config-cscs-24.3.0.r1-0.12 | 69775fca-eb2d-4989-8d10-3f4644910f88 |
+---------------------------------------------------------+------------------------------------------------+--------------------------------------+
CFS configurations:
+------------------------------------------------------+----------------------+
| Name                                                 | Last Update          |
+=============================================================================+
| image-wildhorn-mc-compute-config-cscs-24.3.0.r1-0.12 | 2024-05-07T14:48:41Z |
|------------------------------------------------------+----------------------|
| wildhorn-mc-compute-config-cscs-24.3.0.r1-0.12       | 2024-05-07T14:48:43Z |
+------------------------------------------------------+----------------------+
Images:
+--------------------------------------+
| Image ID                             |
+======================================+
| 69775fca-eb2d-4989-8d10-3f4644910f88 |
+--------------------------------------+
Masber commented 3 months ago

This is a good idea.

Question, should this functionality be compatible with the the entities (CFS configuration, CFS session, BOS sessiontemplate) created by the SAT cli?

miguelgila commented 3 months ago

Getting all the information in one go would be tremendously useful, yes. 👍

Masber commented 3 months ago

this is an idea

$ manta g c -n tmp-fora-mc-cscs-24.3.0.r1-20240521083702
+-------------------------------------------+----------------------+----------------------------------------------------+-----------------------------------------------------------------------------+
| Configuration Name                        | Last updated         | Layers                                             | Derivatives                                                                 |
+=====================================================================================================================================================================================================+
| tmp-fora-mc-cscs-24.3.0.r1-20240521083702 | 2024-05-21T08:37:12Z | Name:     cscs                                     | CFS sessions:                                                               |
|                                           |                      | Branch:   cscs-24.3.0                              |  - fora-mc-cscs-24.3.0.r1-20240521083702                                    |
|                                           |                      | Tag:                                               |                                                                             |
|                                           |                      | Date:     Not defined                              | BOS sessiontemplates:                                                       |
|                                           |                      | Author:   Not defined                              |  - fora-mc-tmp-cscs-24.3.0.r1-20240521083702.x86_64                         |
|                                           |                      | Commit:   99e4b9078c8c175cbc75d07108046a8b010e5872 |                                                                             |
|                                           |                      | Playbook: site.yml                                 | IMS images:                                                                 |
|                                           |                      |                                                    |  - base-mc-compute-cscs-24.3.0.r1_cfs_fora-mc-cscs-24.3.0.r1-20240521083702 |
+-------------------------------------------+----------------------+----------------------------------------------------+-----------------------------------------------------------------------------+

The entities related to a CFS configuration (CFS sessions, BOS sessiontemplate and IMS images) are referred to as "derivatives".

The rationality behind is to be as loyal as possible to current user experience. If manta realizes the user is asking for a single CFS configuration information, then it will automatically fetch more details. Among those extra details we are adding the name of the derivatives related to the CFS configuration. Currently, only showing the same to fit on screen and avoid line wrapping.

Eventually, we will want to move these information into a web interface, the benefit of web interfaces is that they can scroll horizontally therefore we could potentially fit more information

miguelgila commented 3 months ago

I think this is a neat way of showing the related content, thanks! 👍 👍

Masber commented 3 months ago

done in v.1.33.5