Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(srm) update SRM to handle BSSH events from orcabus ICAv2 event pipe #748

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

raylrui
Copy link
Contributor

@raylrui raylrui commented Dec 3, 2024

SRM to handle BSSH events from orcabus ICAv2 event pipe

resolve #696

  1. add 'SequenceRunManagerStackEventRule" for filter BSSH event from ICAv2 event from event pipe
  2. transfer from SQS 'sqs_handler' to orcabus 'event_handler'

image

SRM will take events with rule
example event:

{
    "version": "0",
    "id": f8c3de3d-1fea-4d7c-a8b0-29f63c4c3454",  # Random UUID
    "detail-type": "Event from aws:sqs",
    "source": "Pipe IcaEventPipeConstru-xxxxxxxx",
    "account": "444444444444",
    "time": "2024-11-02T21:58:22Z",
    "region": "ap-southeast-2",
    "resources": [],
    "detail": {
        "ica-event": {
            "gdsFolderPath": "",
            "gdsVolumeName": "bssh.123456789fabcdefghijkl",
            "v1pre3Id": "444555555555",
            "dateModified": "2024-11-02T21:58:13.7451620Z",
            "acl": [
                "wid:12345678-debe-3f9f-8b92-21244f46822c",
                "tid:Yxmm......"
            ],
            "flowcellBarcode": "HVJJJJJJ",
            "icaProjectId": "12345678-53ba-47a5-854d-e6b53101adb7",
            "sampleSheetName": "SampleSheet.V2.134567.csv",
            "apiUrl": "https://api.aps2.sh.basespace.illumina.com/v2/runs/r.4Wz-ABCDEFGHIJKLM-A",
            "name": "222222_A01052_1234_BHVJJJJJJ",
            "id": "r.4Wz-ABCDEFGHIJKLMN-A",
            "instrumentRunId": "222222_A01052_1234_BHVJJJJJJ",
            "status": "PendingAnalysis"
            }
        }
    }

And emit 'SequenceRunStateChange' event

{
    "version": "0",
    "id": "abcdefgh-111-aaaa-e980-1a8d6dab96d1",
    "detail-type": "SequenceRunStateChange",
    "source": "orcabus.sequencerunmanager",
    "account": "44444444",
    "time": "2024-12-03T23:07:09Z",
    "region": "ap-southeast-2",
    "resources": [],
    "detail": {
        "id": 34,
        "instrumentRunId": "222222_A01052_1234_BHVJJJJJJ",
        "runVolumeName": "bssh.123456789fabcdefghijkl",
        "runFolderPath": "",
        "runDataUri": "gds://bssh.123456789fabcdefghijkl",
        "sampleSheetName": "SampleSheet.V2.134567.csv",
        "startTime": "2024-11-08T00:10:13.0962060Z",
        "status": "STARTED"
    }
}

@raylrui raylrui added the feature New feature label Dec 3, 2024
@raylrui raylrui self-assigned this Dec 3, 2024
@raylrui raylrui marked this pull request as ready for review December 4, 2024 00:26
@raylrui
Copy link
Contributor Author

raylrui commented Dec 4, 2024

@reisingerf
for gdsFolderPath in the CAv2 ENS subscription, it always empty like"gdsFolderPath": ""
does that means runFolderPath in 'root path', or do we need organise a new one like icav1 "runFolderPath": "/Runs/5555555_A01001_0193_BBBBBBDRX5_r.88888888ASU26EYuyeJHew"?
I didn't find any BSSH api for that folder path

@reisingerf
Copy link
Member

FYI @victorskl

@raylrui
Copy link
Contributor Author

raylrui commented Dec 4, 2024

just for refer, example event in dev s3://orcabus-universal-events-archive-843407916570/events/year=2024/month=12/day=04/ , link

@reisingerf
Copy link
Member

Yes, the new event does not have all the same information we could find in the ICAv1 events.

The new event will contain an API link though were this information can be retrieved from: apiUrl
(that needs separate credentials IIRC so maybe leave for a later time)

I am not sure we need this information right now. The important information for now is: run id, sample sheet name, status and timestamp.

Perhaps we use the value of apiUrl for the runDataUri or add the apiUrl as a new field? @victorskl opinions?

@reisingerf
Copy link
Member

At some point I do want to pull in the SampleSheet and related information, but that can wait.
Priority for now is to capture the events, so the UI can report the status (and the lab can comment on it once the support for comments is in).

@raylrui
Copy link
Contributor Author

raylrui commented Dec 4, 2024

yes, it is okay for now, and work fine to insert/update record to database for UI,

just a bit concern about bs-runs-upload-manager
with event rule to consume the SUCCEEDED 'SequenceRunStateChange' event, but we can check it later to see

comment function will be added through #751
will merge it later after this one, and with UI refactor

@victorskl
Copy link
Member

Yup. Ray, if we haven't captured yet then pls add these 3 fields be captured, pls. These fields become crucial to retrieve further details about each sequencing run.

"v1pre3Id": "444555555555",
"icaProjectId": "12345678-53ba-47a5-854d-e6b53101adb7",
"apiUrl": "https://api.aps2.sh.basespace.illumina.com/v2/runs/r.4Wz-ABCDEFGHIJKLM-A",

We no longer have direct access to underlay GDS anymore. But through these ^^ 3 fields info; hence they are now replaced GDS details - and, we get blank out as such.

"gdsFolderPath": "",
"gdsVolumeName": "bssh.123456789fabcdefghijkl",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sequence-run-manager: update SRM to handle BSSH events from ICAv2 ENS subscription
3 participants