Skip to content

WS-1405 CASA matrix service

Daniel Nemergut requested to merge ws1405-casa_matrix_service into 2.8.4-DEVELOPMENT

Made the service that's responsible for comparing installed versions on disk vs allowed versions in the database vs what version has been requested.

Manual testing notes:

  1. Spin up the containers
  2. Log into the capability container as root to set up mock CASA delivery directories:
docker exec -u root -it workspaces-capability-1 bash

mkdir -p /home/casa/packages/RHEL6/release /home/casa/packages/RHEL7/release;
cd /home/casa/packages/RHEL6/release;
mkdir -p casa-6.1.1-13-pipeline-2020.1.0.36/pipeline casa-pipeline-release-5.6.1-8.el6/pipeline casa-release-5.5.0-149/pipeline;
cd /home/casa/packages/RHEL7/release;
mkdir -p casa-6.1.1-13-pipeline-2020.1.0.36/pipeline casa-6.4.1-12-pipeline-2022.2.0.64/pipeline casa-6.4.1-12-pipeline-2022.2.0.68/pipeline casa-release-5.3.0-143/pipeline;
  1. Log into the capability container as vlapipe to test making the links in /home/ssa/casa (thus testing that feature):
docker exec -it workspaces-capability-1 bash

mkdir -p /home/ssa/casa/RHEL6 /home/ssa/casa/RHEL7

poetry shell
python3

import requests
prefix = 'http://capability:3457/casa_matrix/'

r = requests.get(prefix + 'version')
print(r.json())
  1. Additional tests:
r = requests.get(prefix + 'version')
print(r.json())

r = requests.get(prefix + 'version', json={'capability': 'std_calibration'})
print(r.json())

r = requests.get(prefix + 'version', json={'capability': 'restore_cms', 'telescope': 'alma'})
print(r.json())

r = requests.get(prefix + 'version', json={'version': '6.4.1-12|2022.2.0.68'})
print(r.json())

r = requests.get(prefix + 'version', json={'version': '5.5.0'})
print(r.json())

r = requests.get(prefix + 'versions')
print(r.json())

r = requests.get(prefix + 'versions', json={'version': '6.4.1-12|2022.2.0.68'})
print(r.json())

r = requests.get(prefix + 'recipe', json={'capability': 'restore_cms'})
print(r.json())

r = requests.post(prefix + 'db/version', json={'version': '0.0.0'})
print(r.json())

r = requests.post(prefix + 'db/version', json={'version': '1.1.1', 'is_cluster_compatible': False})
print(r.json())

r = requests.put(prefix + 'db/version', json={'version': '1.1.1', 'is_cluster_compatible': True})
print(r.json())

r = requests.post(prefix + 'db/version', json={'version': '2.2.2', 'is_cluster_compatible': False, 'capabilities': ['curator', 'download']})
print(r.json())

r = requests.put(prefix + 'db/version', json={'version': '2.2.2', 'is_cluster_compatible': True, 'capabilities': ['restore_cms', 'std_cms_imaging']})
print(r.json())

r = requests.delete(prefix + 'db/version', json={'version': '0.0.0'})
print(r.json())

r = requests.delete(prefix + 'db/version', json={'version': '1.1.1'})
print(r.json())

r = requests.delete(prefix + 'db/version', json={'version': '2.2.2'})
print(r.json())
Edited by Daniel Nemergut

Merge request reports

Loading