From aed1fbeb95c1790ed9faa46bfa410635fb8e8bb6 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 28 May 2022 15:34:05 +0200 Subject: fix(gerrit-tvl): Use only one build filter Buildkite can't handle more than one filter for the query; as of the last commit it just returned an empty list. I've verified with curl based on the request the previous attempt constructed that this works as intended with only setting the commit. Behaviour is probably undefined if there are two builds for the same commit (i.e. a retry). Which one will you see? Who knows! However, since the commit hash contains the Change-Id, we can't get a situation where the build was for two different CLs at the same commit. Gerrit wouldn't allow that. Change-Id: I0dcd0ff44c28d3d15cba23461970bfc8483f4e48 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5768 Autosubmit: tazjin Tested-by: BuildkiteCI Reviewed-by: sterni --- ops/gerrit-tvl/static/tvl.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ops/gerrit-tvl/static/tvl.js b/ops/gerrit-tvl/static/tvl.js index 51c3344c27..684636de30 100644 --- a/ops/gerrit-tvl/static/tvl.js +++ b/ops/gerrit-tvl/static/tvl.js @@ -79,11 +79,10 @@ function jobStateToCheckRunStatus(state) { const tvlChecksProvider = { async fetch(change) { - let {changeNumber, patchsetSha, repo} = change; + let {patchsetSha, repo} = change; const experiments = window.ENABLED_EXPERIMENTS || []; if (experiments.includes("UiFeature__tvl_check_debug")) { - changeNumber = 2872; patchsetSha = '76692104f58b849b1503a8d8a700298003fa7b5f'; repo = 'depot'; } @@ -94,8 +93,6 @@ const tvlChecksProvider = { } const params = { - // besadii groups different patchsets of the same CL under this fake ref - branch: `cl/${changeNumber.toString()}`, commit: patchsetSha, }; const url = `https://api.buildkite.com/v2/organizations/tvl/pipelines/depot/builds?${encodeParams(params)}`; -- cgit 1.4.1