opensource-joe commented on issue #3466:
URL:
https://github.com/apache/apisix-dashboard/issues/3466#issuecomment-5299620360
Sent a fix as #3467.
Two corrections to what I wrote above, now that I could measure it properly
rather than infer it.
**The suggested fix in this issue was wrong.** I proposed polling until the
content parses, which treats this as a race to wait out. It is not. Sampling
all three sources at the instant the drawer becomes visible, for a
219-character config:
```
t+0ms textarea= 0 "" viewLines= 1 "{" model=219
t+50ms textarea= 0 "" viewLines=11 "{ \"log_format\"…" model=219
t+1000ms textarea= 0 "" viewLines=11 "{ \"log_format\"…" model=219
```
The hidden textarea is empty at *every* offset, since Monaco keeps only a
small cursor-local buffer there, so the helper always fell through to the
`.view-line` path. Those are virtualised, and the first line of the JSON is
`{`, which is exactly the value in the failure. The model is already complete
at `t+0`, so the right fix is to read the model rather than to wait longer on
the DOM. `uiFillMonacoEditor` and `uiClearMonacoEditor` already write to it,
and `plugin-metadata.drawer-keeps-edits-on-failed-save` already reads it, so
#3467 just makes this spec stop being the outlier.
**The failure rates I quoted are not a stable property.** The 4-of-6 on
`master` was measured while the machine was under load. On an idle machine the
unpatched spec passes 10 of 10. The paint window is only around 50ms wide, so
read those numbers as "fails regularly under load" rather than as a rate. Worth
knowing for anyone trying to reproduce, since a handful of green runs does not
clear it.
Also, for the record, CDP `Emulation.setCPUThrottlingRate` does **not**
force it: throttling slows the test driver along with the renderer, so the
relative timing barely shifts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]