https://prefect.io logo
b

Ben Ayers-Glassey

09/22/2022, 5:17 PM
Hello all! Here are two task runs I want to see: https://cloud.prefect.io/zesty-ai/task-run/fe3de56d-505c-481a-b16e-e067189b6801 https://cloud.prefect.io/zesty-ai/task-run/30ec6159-25c4-4ed1-8215-7e3827014c0a ...but in both cases, I see a mostly-blank page, and some JS errors (see screenshot). Any ideas? Is this a known issue?
Here are text dumps of the various unique JS errors I see in console:
Copy code
build.umd.js:2570 [vue-apollo] An error has occurred for query 'membershipInvitations'
e.<computed>	@	build.umd.js:2570
Copy code
build.umd.js:2570 Invariant Violation: Invariant Violation: 3 (see <https://github.com/apollographql/invariant-packages>)
    at new e (<https://cloud.prefect.io/js/chunk-vendors~b58f7129.b9c15fb2.js:21:5791>)
    at u (<https://cloud.prefect.io/js/chunk-vendors~b58f7129.b9c15fb2.js:21:6057>)
    at w (<https://cloud.prefect.io/js/chunk-vendors~253ae210.8d0c0de5.js:1:130481>)
    at t.setUpQuery (<https://cloud.prefect.io/js/chunk-vendors~253ae210.8d0c0de5.js:1:129275>)
    at t.onSubscribe (<https://cloud.prefect.io/js/chunk-vendors~253ae210.8d0c0de5.js:1:129030>)
    at <https://cloud.prefect.io/js/chunk-vendors~253ae210.8d0c0de5.js:1:123282>
    at new t (<https://cloud.prefect.io/js/chunk-vendors~fdc6512a.98024e3a.js:7:8213>)
    at t.value (<https://cloud.prefect.io/js/chunk-vendors~fdc6512a.98024e3a.js:7:9177>)
    at n.subscribe (<https://cloud.prefect.io/js/chunk-vendors~205977d4.ed6affd3.js:7:83254>)
    at n.value (<https://cloud.prefect.io/js/chunk-vendors~205977d4.ed6affd3.js:7:76807>)
Copy code
common.min.js:5 Refused to load the script '<https://d.la2-c1-ia5.salesforceliveagent.com/chat/rest/EmbeddedService/EmbeddedServiceConfig.jsonp?Settings.prefix=EmbeddedService&org_id=00D2E000000o3Ut&EmbeddedServiceConfig.configName=Chat_Service_Team&callback=embedded_svc.liveAgentAPI.handleChatSettings&version=48>' because it violates the following Content Security Policy directive: "script-src-elem 'self' 'unsafe-eval' 'unsafe-inline' <https://cdn.lr-ingest.io> <https://js.stripe.com> <https://netlify-cdp-loader.netlify.app/netlify.js> <https://prefect.my.salesforce.com/> <https://prefect.force.com/> <https://prefect.my.salesforce.com> <https://c.la1-c2-ia2.salesforceliveagent.com/> <https://d.la1-c2-ia2.salesforceliveagent.com/> <https://static.lightning.force.com> <https://prefect--partial.my.salesforce.com> <https://c.la4-c1cs-phx.salesforceliveagent.com/> <https://d.la4-c1cs-phx.salesforceliveagent.com/> <https://partial-prefect.cs90.force.com/> <https://d.la3-c1cs-ia2.salesforceliveagent.com/> <https://service.force.com/> <https://prefect--aleysian.my.salesforce.com> <https://aleysian-prefect.cs29.force.com/> <https://d.la1-c2-ph2.salesforceliveagent.com/>".

f.loadScriptFromUrl @ common.min.js:5
m

Mason Menges

09/22/2022, 7:26 PM
Hey @Ben Ayers-Glassey Would you be able to provide an example of the task runs you're looking at here to reproduce this behavior? I don't recall a bug like this at the moment
b

Ben Ayers-Glassey

09/22/2022, 10:13 PM
An example, like code? I'm not sure if I can reproduce it or not. This particular flow uses "mapping" to generate thousands of tasks and took 10+ hours to run, maybe that was the issue? Here, I'll just create a super-simple test flow, and if I can reproduce with that, then maybe it means the issue is with my browser or something...
Copy code
In [1]: from prefect import Flow, task

In [2]: @task
   ...: def inc(x): return x + 1

In [3]: @task
   ...: def add(x, y): return x + y

In [4]: 

In [4]: with Flow('test-test') as flow:
   ...:     x = inc(3)
   ...:     y = inc(4)
   ...:     z = add(x, y)
   ...: 

In [5]: flow.register('test')
Flow URL: <https://cloud.prefect.io/zesty-ai/flow/62a1af84-1b96-43aa-b426-7b6407e1e5ea>
 └── ID: dc429d34-1f5e-4f83-9819-e7ca33d23555
 └── Project: test
 └── Labels: ['noo-lappy']
Out[5]: 'dc429d34-1f5e-4f83-9819-e7ca33d23555'
Copy code
$ prefect run --project test -n test-test
Looking up flow metadata... Done
Creating run for flow 'test-test'... Done
└── Name: stylish-tortoise
└── UUID: d5925a52-f220-4a4c-a362-5a7c2228f4c7
└── Labels: ['noo-lappy']
└── Parameters: {}
└── Context: {}
└── URL: <https://cloud.prefect.io/zesty-ai/flow-run/d5925a52-f220-4a4c-a362-5a7c2228f4c7>
Hmmm, so now visiting the flow run and clicking on task runs, I can actually see stuff instead of just a blank page, though the JS console is showing a ton of errors.
So, here's a simple flow which uses mapping:
Copy code
In [6]: with Flow('test-test') as flow:
   ...:     x = inc.map(range(10))
   ...:     y = inc.map(range(10))
   ...:     z = add.map(x, y)
   ...: 

In [7]: flow.register('test')
Flow URL: <https://cloud.prefect.io/zesty-ai/flow/62a1af84-1b96-43aa-b426-7b6407e1e5ea>
 └── ID: 09e539f1-f747-427f-81ce-a29427560e0a
 └── Project: test
 └── Labels: ['noo-lappy']
Out[7]: '09e539f1-f747-427f-81ce-a29427560e0a'
Copy code
$ prefect run --project test -n test-test
Looking up flow metadata... Done
Creating run for flow 'test-test'... Done
└── Name: tangible-turtle
└── UUID: 8181d7c9-d575-4e8f-a951-ee926a226892
└── Labels: ['noo-lappy']
└── Parameters: {}
└── Context: {}
└── URL: <https://cloud.prefect.io/zesty-ai/flow-run/8181d7c9-d575-4e8f-a951-ee926a226892>
...and again, I can see the task runs, but I'm seeing different JS errors in console now...
I went back to one of the original tasks for which I'd been seeing a blank page: https://cloud.prefect.io/zesty-ai/task-run/30ec6159-25c4-4ed1-8215-7e3827014c0a?overview ...in other words, this is one "mapped child" out of thousands. And now I can see it!.. Although again, I see JS errors in console -- and again, they are new ones I haven't seen before... now they're GraphQL timeouts 🤔
Copy code
build.umd.js:2570 GraphQL execution errors for query 'taskRunDependencies'
Copy code
{path: Array(1), message: 'Operation timed out', extensions: {…}}
extensions: {code: 'API_ERROR'}
message: "Operation timed out"
path: ['downstream_task_run_0']
[[Prototype]]: Object
3 Views