Skip to content

Commit 830ae8f

Browse files
committed
WIP
Signed-off-by: Andrew Stein <steinlink@gmail.com>
1 parent 5d65b0f commit 830ae8f

2 files changed

Lines changed: 17 additions & 18 deletions

File tree

packages/viewer-charts/src/ts/worker/renderer.worker.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,9 @@ export class WorkerRenderer {
279279
}
280280
}
281281
} catch (err) {
282-
// Any unexpected throw — proxy hiccup, chart-impl mutation
283-
// failure, RAF chain rejection — must not leak past the
284-
// outer fire-and-forget caller (`dispatch` does not await
285-
// this method). Surface to the worker console; the host's
286-
// pending promise still gets resolved via the `finally`
287-
// ack below so `draw()` can't deadlock on a renderer error.
288-
console.error("loadAndRender failed", err);
282+
if ((err + "").indexOf("View not found") === -1) {
283+
console.error("loadAndRender failed", err);
284+
}
289285
} finally {
290286
this.post({ kind: "loadAndRenderAck", msgId: msg.msgId });
291287
}

tools/test/src/js/snapshot-sync.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ function git(args: string[], cwd: string) {
3030
function remoteHasRef(
3131
remoteUrl: string,
3232
ref: string,
33-
token: string | undefined,
33+
// token: string | undefined,
3434
): boolean {
3535
try {
36-
const args = ["ls-remote", "--heads"];
37-
if (token) {
38-
args.push(
39-
"-c",
40-
`http.extraHeader=Authorization: Bearer ${token}`,
41-
);
42-
}
43-
args.push(remoteUrl, ref);
36+
const args: string[] = [
37+
"-c",
38+
"http.https://github.com/.extraheader=",
39+
"ls-remote",
40+
"--heads",
41+
remoteUrl,
42+
ref,
43+
];
4444
const out = execFileSync("git", args, {
4545
stdio: ["ignore", "pipe", "pipe"],
4646
})
@@ -55,8 +55,9 @@ function remoteHasRef(
5555

5656
function buildRemoteUrl(repo: string, token: string | undefined): string {
5757
if (token) {
58-
return `https://x-access-token:${token}@github.com/${repo}.git`;
58+
return `https://${token}@github.com/${repo}.git`;
5959
}
60+
6061
return `git@github.com:${repo}.git`;
6162
}
6263

@@ -90,7 +91,7 @@ export async function fetchSnapshots(): Promise<void> {
9091
let ref = requestedRef;
9192
if (
9293
requestedRef !== DEFAULT_REF &&
93-
!remoteHasRef(remoteUrl, requestedRef, token)
94+
!remoteHasRef(remoteUrl, requestedRef)
9495
) {
9596
console.log(
9697
`Snapshot branch '${requestedRef}' not found on ${repo}; falling back to '${DEFAULT_REF}'.`,
@@ -117,6 +118,8 @@ export async function fetchSnapshots(): Promise<void> {
117118
execFileSync(
118119
"git",
119120
[
121+
"-c",
122+
"http.https://github.com/.extraheader=",
120123
"clone",
121124
"--depth",
122125
"1",

0 commit comments

Comments
 (0)