From 57cb7fefdc3c86da7d6287e68c57e2e539c962f5 Mon Sep 17 00:00:00 2001 From: Rosalyn Tan Date: Thu, 13 Feb 2025 12:51:43 -0800 Subject: [PATCH 1/3] Don't surface connector evolution or insecure operation issues in VSCode.' --- firebase-vscode/src/data-connect/core-compiler.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firebase-vscode/src/data-connect/core-compiler.ts b/firebase-vscode/src/data-connect/core-compiler.ts index d99b3c970ad..e98a92a03c5 100644 --- a/firebase-vscode/src/data-connect/core-compiler.ts +++ b/firebase-vscode/src/data-connect/core-compiler.ts @@ -48,6 +48,10 @@ function convertGQLErrorToDiagnostic( const perFileDiagnostics: Record = {}; const dcPath = configs.values[0].path; for (const error of gqlErrors) { + if (error.warningLevel) { + // Don't surface connector evolution or insecure operation issues for now; we need to be able to compare with a deployed source for these to have meaning. + continue; + } const absFilePath = `${dcPath}/${error.extensions["file"]}`; const perFileDiagnostic = perFileDiagnostics[absFilePath] || []; perFileDiagnostic.push({ From f5001719438c1db62b4645cf46eb844f42ac3c06 Mon Sep 17 00:00:00 2001 From: Rosalyn Tan Date: Thu, 13 Feb 2025 14:47:10 -0800 Subject: [PATCH 2/3] Fix --- firebase-vscode/src/data-connect/core-compiler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firebase-vscode/src/data-connect/core-compiler.ts b/firebase-vscode/src/data-connect/core-compiler.ts index e98a92a03c5..74aa63f94f4 100644 --- a/firebase-vscode/src/data-connect/core-compiler.ts +++ b/firebase-vscode/src/data-connect/core-compiler.ts @@ -48,7 +48,7 @@ function convertGQLErrorToDiagnostic( const perFileDiagnostics: Record = {}; const dcPath = configs.values[0].path; for (const error of gqlErrors) { - if (error.warningLevel) { + if (error.extensions["warningLevel"]) { // Don't surface connector evolution or insecure operation issues for now; we need to be able to compare with a deployed source for these to have meaning. continue; } From 8e1a73821a58baec6c4f7f858c9a9aa9616b0b85 Mon Sep 17 00:00:00 2001 From: Rosalyn Tan Date: Fri, 14 Feb 2025 13:02:22 -0800 Subject: [PATCH 3/3] Filter by "INSECURE" substring rather than warningLevel. --- firebase-vscode/src/data-connect/core-compiler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firebase-vscode/src/data-connect/core-compiler.ts b/firebase-vscode/src/data-connect/core-compiler.ts index 74aa63f94f4..61826e2f502 100644 --- a/firebase-vscode/src/data-connect/core-compiler.ts +++ b/firebase-vscode/src/data-connect/core-compiler.ts @@ -48,8 +48,8 @@ function convertGQLErrorToDiagnostic( const perFileDiagnostics: Record = {}; const dcPath = configs.values[0].path; for (const error of gqlErrors) { - if (error.extensions["warningLevel"]) { - // Don't surface connector evolution or insecure operation issues for now; we need to be able to compare with a deployed source for these to have meaning. + if (error.message.includes("INSECURE")) { + // Don't surface insecure operation issues for now; we need to be able to compare with a deployed source for these to be accurately presented. continue; } const absFilePath = `${dcPath}/${error.extensions["file"]}`;