Skip to content
Snippets Groups Projects
Commit de092317 authored by Janet Goldstein's avatar Janet Goldstein
Browse files

WS-651:

* `on_carta_ready` needs parent workflow request ID
* `carta envoy` testing documentation augmented
parent 4cb84ad6
No related branches found
No related tags found
1 merge request!513WS-651: give `on_carta_ready` the _parent_ workflow request ID
Pipeline #2937 passed
......@@ -6,10 +6,18 @@ the NRAO Archive or upon completion of a Workspaces image processing request.
## Usage
`carta_envoy [-h] -d DIRECTORY [-n NOTIFY] [-r READY] [--parallel] [--single] [-wf WORKFLOW_REQUEST] [-i IMAGE]`
## Example
To run carta envoy from command line: example on wirth-vml
## Examples
### To run carta envoy from command line: example on wirth-vml
1. download image(s) from webtest
2. `ssh vlapipe@wirth-vml`
3. `activate_profile dsoc-dev`
4. cd download location on lustre, e.g., */lustre/aoc/cluster/pipeline/dsoc-dev/spool/820190220*
5. `/lustre/aoc/cluster/pipeline/dsoc-dev/workspaces/sbin/carta_envoy -d ./VLASS1.1.ql.T01t01.J000228-363000.10.2048.v1/rawdata -r true -n jgoldste@nrao.edu`
### To run CARTA from the workspaces UI on dev
Pick a completed capability request from the database that has image products and open the request page for it;
there will be a "launch carta" button.
https://ws-dev.nrao.edu/workspaces/request-status/21
![img.png](img.png)
\ No newline at end of file
apps/cli/executables/pexable/carta_envoy/img.png

159 KiB

......@@ -59,13 +59,13 @@ class TestCapabilityService:
:return:
"""
wf_request_id = -1
wf_request_id = -2
carta_url = "decartes_image_carta_url"
fake_carta_ready_msg = {
"service": "capability",
"routing_key": "capability",
"carta_url": carta_url,
"subject": {"workflow_request_id": wf_request_id},
"subject": {"workflow_request_id": wf_request_id, "argument": {"parent_wf_request_id": -1}},
"type": "carta-ready",
}
......
......@@ -171,9 +171,10 @@ class CapabilityService(CapabilityServiceIF):
"""
logger.info(f"RECEIVED CARTA READY MESSAGE: {message}")
wf_request_id = int(message["subject"]["workflow_request_id"])
subject = message["subject"]
parent_wf_request_id = int(subject["argument"]["parent_wf_request_id"])
execution = self.capability_info.lookup_execution_by_workflow_request_id(wf_request_id)
execution = self.capability_info.lookup_execution_by_workflow_request_id(parent_wf_request_id)
request_version = execution.version
request_version.workflow_metadata = {"carta_url": message["carta_url"]}
......
......@@ -173,6 +173,12 @@ class CapabilityInfoIF(QueueReporterIF, metaclass=ABCMeta):
def lookup_execution(self, execution_id: int) -> CapabilityExecutionIF:
raise NotImplementedError
@abstractmethod
def lookup_execution_by_workflow_request_id(
self, workflow_request_id: int
) -> CapabilityExecutionIF:
raise NotImplementedError
@abstractmethod
def save_execution(self, execution: CapabilityExecutionIF):
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment