Don't download artifacts for repos with no results in MRVA (#2736)

* Don't download artifacts for repos with no results

* Remove getVariantAnalysisRepoResult requests for repos with no results

* Run fix-scenario-file-numbering for mrva-problem-query-success scenario

* Update CHANGELOG
This commit is contained in:
Charis Kyriakou
2023-08-22 16:23:40 +01:00
committed by GitHub
parent 5fc34248b3
commit 81924af1e4
18 changed files with 22 additions and 39 deletions

View File

@@ -2,6 +2,7 @@
## [UNRELEASED] ## [UNRELEASED]
- When running variant analyses, don't download artifacts for repositories with no results. [#2736](https://github.com/github/vscode-codeql/pull/2736)
- Group the extension settings, so that they're easier to find in the Settings UI. [#2706](https://github.com/github/vscode-codeql/pull/2706) - Group the extension settings, so that they're easier to find in the Settings UI. [#2706](https://github.com/github/vscode-codeql/pull/2706)
## 1.8.10 - 15 August 2023 ## 1.8.10 - 15 August 2023

View File

@@ -94,7 +94,7 @@
"site_admin": true "site_admin": true
}, },
"query_language": "javascript", "query_language": "javascript",
"query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124815Z&X-Amz-Expires=3600&X-Amz-Signature=0f42201f27ad08ac1fa9caccf5005d9dac7bdcae33e88e33d62e2fc337194164&X-Amz-SignedHeaders=host", "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124659Z&X-Amz-Expires=3600&X-Amz-Signature=b791ede467cd1783d31d7ee148763d0d4f9eb7abad7506ef9c25017c94aaa1df&X-Amz-SignedHeaders=host",
"created_at": "2022-10-26T12:45:12Z", "created_at": "2022-10-26T12:45:12Z",
"updated_at": "2022-10-26T12:45:15Z", "updated_at": "2022-10-26T12:45:15Z",
"actions_workflow_run_id": 3329095282, "actions_workflow_run_id": 3329095282,
@@ -122,9 +122,7 @@
"stargazers_count": 192, "stargazers_count": 192,
"updated_at": "2022-03-17T08:34:30Z" "updated_at": "2022-03-17T08:34:30Z"
}, },
"analysis_status": "succeeded", "analysis_status": "in_progress"
"artifact_size_in_bytes": 156706,
"result_count": 8
}, },
{ {
"repository": { "repository": {
@@ -148,9 +146,7 @@
"stargazers_count": 19033, "stargazers_count": 19033,
"updated_at": "2022-11-02T10:25:24Z" "updated_at": "2022-11-02T10:25:24Z"
}, },
"analysis_status": "succeeded", "analysis_status": "in_progress"
"artifact_size_in_bytes": 710,
"result_count": 0
}, },
{ {
"repository": { "repository": {

View File

@@ -1,11 +0,0 @@
{
"request": {
"kind": "getVariantAnalysisRepoResult",
"repositoryId": 257485422
},
"response": {
"status": 200,
"body": "file:15-getVariantAnalysisRepoResult.body.zip",
"contentType": "application/zip"
}
}

View File

@@ -94,7 +94,7 @@
"site_admin": true "site_admin": true
}, },
"query_language": "javascript", "query_language": "javascript",
"query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124659Z&X-Amz-Expires=3600&X-Amz-Signature=b791ede467cd1783d31d7ee148763d0d4f9eb7abad7506ef9c25017c94aaa1df&X-Amz-SignedHeaders=host", "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124705Z&X-Amz-Expires=3600&X-Amz-Signature=dae9aa87c393b62ad6f84fd280c731fcd8e4551917920bf978eac5dd6102caec&X-Amz-SignedHeaders=host",
"created_at": "2022-10-26T12:45:12Z", "created_at": "2022-10-26T12:45:12Z",
"updated_at": "2022-10-26T12:45:15Z", "updated_at": "2022-10-26T12:45:15Z",
"actions_workflow_run_id": 3329095282, "actions_workflow_run_id": 3329095282,

View File

@@ -94,7 +94,7 @@
"site_admin": true "site_admin": true
}, },
"query_language": "javascript", "query_language": "javascript",
"query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124705Z&X-Amz-Expires=3600&X-Amz-Signature=dae9aa87c393b62ad6f84fd280c731fcd8e4551917920bf978eac5dd6102caec&X-Amz-SignedHeaders=host", "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124726Z&X-Amz-Expires=3600&X-Amz-Signature=6698289315bd8d8378a17784ba0be9955e6e9161497137c4ccb29b1d2a3f3587&X-Amz-SignedHeaders=host",
"created_at": "2022-10-26T12:45:12Z", "created_at": "2022-10-26T12:45:12Z",
"updated_at": "2022-10-26T12:45:15Z", "updated_at": "2022-10-26T12:45:15Z",
"actions_workflow_run_id": 3329095282, "actions_workflow_run_id": 3329095282,
@@ -122,7 +122,9 @@
"stargazers_count": 192, "stargazers_count": 192,
"updated_at": "2022-03-17T08:34:30Z" "updated_at": "2022-03-17T08:34:30Z"
}, },
"analysis_status": "in_progress" "analysis_status": "succeeded",
"artifact_size_in_bytes": 156706,
"result_count": 8
}, },
{ {
"repository": { "repository": {

View File

@@ -5,7 +5,7 @@
}, },
"response": { "response": {
"status": 200, "status": 200,
"body": "file:20-getVariantAnalysisRepoResult.body.zip", "body": "file:19-getVariantAnalysisRepoResult.body.zip",
"contentType": "application/zip" "contentType": "application/zip"
} }
} }

View File

@@ -94,7 +94,7 @@
"site_admin": true "site_admin": true
}, },
"query_language": "javascript", "query_language": "javascript",
"query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124726Z&X-Amz-Expires=3600&X-Amz-Signature=6698289315bd8d8378a17784ba0be9955e6e9161497137c4ccb29b1d2a3f3587&X-Amz-SignedHeaders=host", "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124732Z&X-Amz-Expires=3600&X-Amz-Signature=ad791eb1a754f473a50454616e9bd04663dfed60a5c84f2c61f27ced47ee25d0&X-Amz-SignedHeaders=host",
"created_at": "2022-10-26T12:45:12Z", "created_at": "2022-10-26T12:45:12Z",
"updated_at": "2022-10-26T12:45:15Z", "updated_at": "2022-10-26T12:45:15Z",
"actions_workflow_run_id": 3329095282, "actions_workflow_run_id": 3329095282,

View File

@@ -94,7 +94,7 @@
"site_admin": true "site_admin": true
}, },
"query_language": "javascript", "query_language": "javascript",
"query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124732Z&X-Amz-Expires=3600&X-Amz-Signature=ad791eb1a754f473a50454616e9bd04663dfed60a5c84f2c61f27ced47ee25d0&X-Amz-SignedHeaders=host", "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124759Z&X-Amz-Expires=3600&X-Amz-Signature=5b0be34c426152c37e3d4c761bf576a07c9d4bb6222f32c438e02605600f0394&X-Amz-SignedHeaders=host",
"created_at": "2022-10-26T12:45:12Z", "created_at": "2022-10-26T12:45:12Z",
"updated_at": "2022-10-26T12:45:15Z", "updated_at": "2022-10-26T12:45:15Z",
"actions_workflow_run_id": 3329095282, "actions_workflow_run_id": 3329095282,

View File

@@ -94,7 +94,7 @@
"site_admin": true "site_admin": true
}, },
"query_language": "javascript", "query_language": "javascript",
"query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124759Z&X-Amz-Expires=3600&X-Amz-Signature=5b0be34c426152c37e3d4c761bf576a07c9d4bb6222f32c438e02605600f0394&X-Amz-SignedHeaders=host", "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124805Z&X-Amz-Expires=3600&X-Amz-Signature=73b43f47ee53938b91fa7d23c33e750c466fff777ea94ceb052771ee8dc25b6c&X-Amz-SignedHeaders=host",
"created_at": "2022-10-26T12:45:12Z", "created_at": "2022-10-26T12:45:12Z",
"updated_at": "2022-10-26T12:45:15Z", "updated_at": "2022-10-26T12:45:15Z",
"actions_workflow_run_id": 3329095282, "actions_workflow_run_id": 3329095282,

View File

@@ -94,7 +94,7 @@
"site_admin": true "site_admin": true
}, },
"query_language": "javascript", "query_language": "javascript",
"query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124805Z&X-Amz-Expires=3600&X-Amz-Signature=73b43f47ee53938b91fa7d23c33e750c466fff777ea94ceb052771ee8dc25b6c&X-Amz-SignedHeaders=host", "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124815Z&X-Amz-Expires=3600&X-Amz-Signature=0f42201f27ad08ac1fa9caccf5005d9dac7bdcae33e88e33d62e2fc337194164&X-Amz-SignedHeaders=host",
"created_at": "2022-10-26T12:45:12Z", "created_at": "2022-10-26T12:45:12Z",
"updated_at": "2022-10-26T12:45:15Z", "updated_at": "2022-10-26T12:45:15Z",
"actions_workflow_run_id": 3329095282, "actions_workflow_run_id": 3329095282,
@@ -148,7 +148,9 @@
"stargazers_count": 19033, "stargazers_count": 19033,
"updated_at": "2022-11-02T10:25:24Z" "updated_at": "2022-11-02T10:25:24Z"
}, },
"analysis_status": "in_progress" "analysis_status": "succeeded",
"artifact_size_in_bytes": 710,
"result_count": 0
}, },
{ {
"repository": { "repository": {

View File

@@ -1,11 +0,0 @@
{
"request": {
"kind": "getVariantAnalysisRepoResult",
"repositoryId": 236095576
},
"response": {
"status": 200,
"body": "file:26-getVariantAnalysisRepoResult.body.zip",
"contentType": "application/zip"
}
}

View File

@@ -231,7 +231,11 @@ export function isRepoScanSuccessful(
export function repoHasDownloadableArtifact( export function repoHasDownloadableArtifact(
repo: VariantAnalysisScannedRepository, repo: VariantAnalysisScannedRepository,
): boolean { ): boolean {
return repo.analysisStatus === VariantAnalysisRepoStatus.Succeeded; return (
repo.analysisStatus === VariantAnalysisRepoStatus.Succeeded &&
repo.resultCount !== undefined &&
repo.resultCount > 0
);
} }
/** /**