nrkno / sofie-core

Sofie Core: A Part of the Sofie TV Studio Automation System
https://github.com/nrkno/Sofie-TV-automation/
MIT License
125 stars 38 forks source link

Bug Report: Package statuses incorrectly get changed when set as next #1154

Open PeterC89 opened 7 months ago

PeterC89 commented 7 months ago

About me

This bug report is posted on behalf of the BBC

Observed Behavior

Package statuses are correct up until the point that the part is set as next at which point they randomly change to Package can't be found on the playout system

Example piece instance:

{
    "_id": "mNgEokWWIJwY32qYhGhrTuxroKM__RfnonXJmh65jasFGu_Kmlv798JrW1M__zPuol3jSJ0yHk_",
    "isTemporary": false,
    "rundownId": "AE3WNBwGLHsbQteS6iZzeMYwPwc_",
    "playlistActivationId": "YC8fQTM5cWhyKoZE6",
    "partInstanceId": "mNgEokWWIJwY32qYhGhrTuxroKM__RfnonXJmh65jasFGu",
    "piece": {
        "_id": "Kmlv798JrW1M__zPuol3jSJ0yHk_",
        "pieceType": "normal",
        "externalId": "someID",
        "name": "BLIP/NEWS/PRES///",
        "lifespan": "part-only",
        "sourceLayerId": "package",
        "outputLayerId": "pgm",
        "enable": {
            "start": 0
        },
        "prerollDuration": 250,
        "abSessions": [
            {
                "poolName": "clip",
                "sessionName": "someID"
            }
        ],
        "expectedPackages": [
            {
                "_id": "BLIP~fNEWS~fPRES~f~f~f.mxf",
                "layers": [
                    "clip_server_A",
                    "clip_server_B"
                ],
                "type": "media_file",
                "version": {},
                "contentVersionHash": "",
                "content": {
                    "filePath": "BLIP~fNEWS~fPRES~f~f~f.mxf"
                },
                "sources": [],
                "sideEffect": {}
            }
        ],
        "content": {
            "path": "",
            "fileName": "BLIP~fNEWS~fPRES~f~f~f.mxf",
            "sourceDuration": 4640
        },
        "startRundownId": "AE3WNBwGLHsbQteS6iZzeMYwPwc_",
        "startSegmentId": "CG6PpZpderq1ppsF65aNoSEysmc_",
        "startPartId": "mNgEokWWIJwY32qYhGhrTuxroKM_",
        "invalid": false
    }
}

Package manager shows that it is correctly processing the package and thumbnail / clip analysis data is generated as expected.

{
  _id: "studio0_casparcgContainer_mNgEokWWIJwY32qYhGhrTuxroKM__q4Xv7F9W3GS8opMQN_Kmlv798JrW1M__zPuol3jSJ0yHk__BLIP~fNEWS~fPRES~f~f~f.mxf",
  containerId: "casparcgContainer",
  deviceId: "packageManagerPackageManager",
  modified: 1707918872384,
  packageId:
    "mNgEokWWIJwY32qYhGhrTuxroKM__q4Xv7F9W3GS8opMQN_Kmlv798JrW1M__zPuol3jSJ0yHk__BLIP~fNEWS~fPRES~f~f~f.mxf",
  status: {
    status: "ready",
    progress: 0,
    statusChanged: 1707918871435,
    statusReason: {
      user: "2 workers available, about to start...",
      tech: "Found 2 workers who supports this Expectation",
    },
    contentVersionHash: "",
    priority: 1011,
    isPlaceholder: false,
  },
  studioId: "studio0",
},
{
  _id: "studio0___corePackageInfo_mNgEokWWIJwY32qYhGhrTuxroKM__q4Xv7F9W3GS8opMQN_Kmlv798JrW1M__zPuol3jSJ0yHk__BLIP~fNEWS~fPRES~f~f~f.mxf",
  containerId: "__corePackageInfo",
  deviceId: "packageManagerPackageManager",
  modified: 1707918872728,
  packageId:
    "mNgEokWWIJwY32qYhGhrTuxroKM__q4Xv7F9W3GS8opMQN_Kmlv798JrW1M__zPuol3jSJ0yHk__BLIP~fNEWS~fPRES~f~f~f.mxf",
  status: {
    status: "ready",
    progress: 1,
    statusChanged: 1707918871512,
    statusReason: {
      user: "Scan completed in 0.3s",
      tech: "Completed at 1707918871787",
    },
    contentVersionHash: "1c66ab5fcb4b7d3e10a7596085b790a503258fa9",
    priority: 1013,
    isPlaceholder: false,
  },
  studioId: "studio0",
}

Expected Behavior

Packages should retain the correct status

Version

release51

Severity / Impact

Not a big issue at this time but disconcerting for the users

Level of Involvement

Just raising awareness at the moment due to lack of time to investigate further

Julusian commented 7 months ago

I think this will be fixed by https://github.com/nrkno/sofie-core/pull/1155, it is one of the cases we found and that PR fixes in release50, so hopefully resolves your problem too

Julusian commented 7 months ago

@PeterC89 The fixes #1155 have been merged to both the release50 and release51 branches. Could you give that a try to confirm whether it fixes your issues?

PeterC89 commented 7 months ago

@Julusian LGTM. Only thing I've observed that seems to be different is if you AdLib a clip and insert it as a piece in a queued part it starts out as 'Can't be found on the playout system' and then about a second later everything catches up with the correct status. It may have always done that but been masked by everything having an incorrect status?

So other than that I'd say this is fixed?

Julusian commented 7 months ago

Glad to hear!

Yes, when playing an adlib we have noticed this too and have a separate bug report internally for this, as we believe it also affected r49, so is not a new issue (for NRK people: SOFIE-3000)