arnoudkooi / sn-scriptsync

Use sn-scriptsync in combination with SN Utils to be able to code in VS Code, including all benefits of a full fledged code editor
https://marketplace.visualstudio.com/items?itemName=arnoudkooicom.sn-scriptsync
Other
43 stars 28 forks source link

"Load/Refresh Artifacts From Scope" can load subset (or none) of scope if > 10000 sys_metadata records #96

Closed mevops closed 1 month ago

mevops commented 6 months ago

I believe that this will be a universal problem rather than just me.

My understanding of the problem:

How it manifests:

There seem to be two options:

  1. The scope tree is built but only with a subset of the records
  2. The job silently fails and never completes. My guess is it's based on the content of the subset received and whether they include anything it can generate from. For my app this is happening with the default 10000 limit

How to replicate it:

I can fairly easily trigger various levels of the issue/fix the issue by setting sysparm_limit=X within the file ~/.vscode/extensions/arnoudkooicom.sn-scriptsync-3.3.3out/extension.js then restarting the VS Code extensions host

Here shows that it silently fails when loading too few sys_metadata records:

image

Here shows a subset load that did successfully load a subset of the tree and notify VS Code it was complete (sysparm_limit set to 20000):

image

Here shows a full successful load (sysparm_limit set to 100000):

image

How I think it could be fixed

Obviously setting a massive sysparm_limit would solve the problem, however I think the best way would actually be to make a change to the SN-Utils browser app so that the requestRecords method pages if it receives 10000 results (or you could use the X-Total-Count header to track it)

arnoudkooi commented 5 months ago

Are you still experiencing this issue? I deliberately set a limit, so when you're in Global, don't try to pull in everything.