From 1f223b15d0c1ee82bf4dd9ba88b2350a20a43fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Vall=C3=A9s?= <3977183+jvallesm@users.noreply.github.com> Date: Tue, 26 Nov 2024 16:36:23 +0100 Subject: [PATCH] feat(mgmt): use unified dashboard endpoints (#239) Because - Pipeline and credit endpoints have different params and schemas. - Some of the information served by the existing endpoints will be handled by the pipeline run feature. This commit - Applies contracts defined in https://github.com/instill-ai/protobufs/pull/435 --- .github/workflows/integration-test.yml | 4 +++- config/settings-env/endpoints.json | 24 +++++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index d7f48c2..bae90f4 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -97,7 +97,9 @@ jobs: - name: Install k6 run: | go install go.k6.io/xk6/cmd/xk6@v${{ env.XK6_VERSION }} - xk6 build v${{ env.K6_VERSION }} --with github.com/grafana/xk6-sql && sudo cp k6 /usr/bin + xk6 build v${{ env.K6_VERSION }} \ + --with github.com/grafana/xk6-sql@v${{ env.XK6_SQL_VERSION }} \ + --with github.com/grafana/xk6-sql-driver-postgres@v${{ env.XK6_SQL_POSTGRES_VERSION }} && sudo cp k6 /usr/bin - name: Run ${{ matrix.component }} integration test (latest) run: | diff --git a/config/settings-env/endpoints.json b/config/settings-env/endpoints.json index 836ad14..a168796 100644 --- a/config/settings-env/endpoints.json +++ b/config/settings-env/endpoints.json @@ -208,12 +208,12 @@ "input_query_strings": [] }, { - "endpoint": "/v1beta/metrics/vdp/pipeline/trigger-count", - "url_pattern": "/v1beta/metrics/vdp/pipeline/trigger-count", + "endpoint": "/v1beta/pipeline-runs/count", + "url_pattern": "/v1beta/pipeline-runs/count", "method": "GET", "timeout": "30s", "input_query_strings": [ - "namespaceId", + "requesterId", "start", "stop" ] @@ -250,6 +250,18 @@ "filter" ] }, + { + "endpoint": "/v1beta/pipeline-runs/query-charts", + "url_pattern": "/v1beta/pipeline-runs/query-charts", + "method": "GET", + "timeout": "30s", + "input_query_strings": [ + "requesterId", + "aggregationWindow", + "start", + "stop" + ] + }, { "endpoint": "/v1beta/model-runs/count", "url_pattern": "/v1beta/model-runs/count", @@ -450,6 +462,12 @@ "method": "POST", "timeout": "30s" }, + { + "endpoint": "/core.mgmt.v1beta.MgmtPublicService/ListPipelineTriggerChartRecordsV0", + "url_pattern": "/core.mgmt.v1beta.MgmtPublicService/ListPipelineTriggerChartRecordsV0", + "method": "POST", + "timeout": "30s" + }, { "endpoint": "/core.mgmt.v1beta.MgmtPublicService/ListPipelineTriggerTableRecords", "url_pattern": "/core.mgmt.v1beta.MgmtPublicService/ListPipelineTriggerTableRecords",