From 86466104a8f589626dce1c7d6d3e482acb8fe176 Mon Sep 17 00:00:00 2001 From: Nikolay Matrosov Date: Thu, 19 Oct 2023 18:10:12 +0200 Subject: [PATCH 1/6] fix: add missing endpoints for AI services --- src/service-endpoints.ts | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/service-endpoints.ts b/src/service-endpoints.ts index a85b05c8..d3e65e61 100644 --- a/src/service-endpoints.ts +++ b/src/service-endpoints.ts @@ -1,7 +1,4 @@ -import { - ServiceClientConstructor, - ServiceDefinition, -} from '@grpc/grpc-js'; +import { ServiceClientConstructor, ServiceDefinition } from '@grpc/grpc-js'; import { GeneratedServiceClientCtor } from './types'; interface ServiceEndpoint { @@ -17,6 +14,15 @@ export const SERVICE_ENDPOINTS_LIST: ServiceEndpointsList = [ serviceIds: ['yandex.cloud.operation.OperationService'], endpoint: 'operation.api.cloud.yandex.net:443', }, + { + serviceIds: [ + 'yandex.cloud.ai.llm.v1alpha.EmbeddingsService', + 'yandex.cloud.ai.llm.v1alpha.TextGenerationAsyncService', + 'yandex.cloud.ai.llm.v1alpha.TextGenerationService', + 'yandex.cloud.ai.llm.v1alpha.TokenizerService', + ], + endpoint: 'llm.api.cloud.yandex.net:443', + }, { serviceIds: [ 'yandex.cloud.backup.v1.BackupService', @@ -287,6 +293,7 @@ export const SERVICE_ENDPOINTS_LIST: ServiceEndpointsList = [ { serviceIds: [ 'yandex.cloud.ai.ocr.v1.TextRecognitionService', + 'yandex.cloud.ai.ocr.v1.TextRecognitionAsyncService', ], endpoint: 'ocr.api.cloud.yandex.net:443', }, @@ -412,6 +419,13 @@ export const SERVICE_ENDPOINTS_LIST: ServiceEndpointsList = [ ], endpoint: 'loadtesting.api.cloud.yandex.net:443', }, + { + serviceIds: [ + 'speechkit.stt.v3.AsyncRecognizer', + 'speechkit.stt.v3.Recognizer', + ], + endpoint: 'stt.api.cloud.yandex.net:443', + }, ]; export const getServiceClientEndpoint = (generatedClientCtor: GeneratedServiceClientCtor): string => { From c95954f09b4a15e1075b4719b0fc18e1aac2820e Mon Sep 17 00:00:00 2001 From: Nikolay Matrosov Date: Fri, 20 Oct 2023 14:04:12 +0200 Subject: [PATCH 2/6] test: silently turn on `check-endpoints` step --- .github/workflows/pr-checks.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index ca11af2f..d4e3e0d8 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -11,11 +11,14 @@ jobs: steps: - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@f69248b52b7991214847e889f28ba0883ed0ca2c - run: npm run test -# check-endpoints: -# runs-on: ubuntu-20.04 -# steps: -# - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@f69248b52b7991214847e889f28ba0883ed0ca2c -# - run: npm run check-endpoints + check-endpoints: + runs-on: ubuntu-20.04 + # Currently, the check-endpoints script fails on the master branch. + # So we need to continue on error. + continue-on-error: true + steps: + - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@f69248b52b7991214847e889f28ba0883ed0ca2c + - run: npm run check-endpoints lint: runs-on: ubuntu-20.04 steps: From b1cebde4c799ea05d11e52a90b4271bd8aef731d Mon Sep 17 00:00:00 2001 From: Nikolay Matrosov Date: Fri, 20 Oct 2023 14:12:21 +0200 Subject: [PATCH 3/6] test: checkout `cloudapi` submodule before running `check-endpoints` --- .github/workflows/pr-checks.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index d4e3e0d8..c9fd7c7a 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -18,6 +18,8 @@ jobs: continue-on-error: true steps: - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@f69248b52b7991214847e889f28ba0883ed0ca2c + - name: Checkout submodules + run: git submodule update --init --recursive - run: npm run check-endpoints lint: runs-on: ubuntu-20.04 From 8dd6b74804d71f15f29a6d5c546519f3d9336c30 Mon Sep 17 00:00:00 2001 From: Nikolay Matrosov Date: Fri, 20 Oct 2023 14:18:18 +0200 Subject: [PATCH 4/6] test: try to fix checkout `cloudapi` submodule --- .github/workflows/pr-checks.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index c9fd7c7a..dd0d9117 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -18,6 +18,10 @@ jobs: continue-on-error: true steps: - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@f69248b52b7991214847e889f28ba0883ed0ca2c + - name: Reconfigure git to use HTTP authentication + run: > + git config --global url."https://github.com/".insteadOf + git@github.com/ - name: Checkout submodules run: git submodule update --init --recursive - run: npm run check-endpoints From 9fc72bb2948886090f84c9236580fbca480bdea7 Mon Sep 17 00:00:00 2001 From: Nikolay Matrosov Date: Fri, 20 Oct 2023 14:35:06 +0200 Subject: [PATCH 5/6] test: checkout submodules --- .github/actions/checkout-and-install-node/action.yml | 1 + .github/workflows/pr-checks.yml | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/actions/checkout-and-install-node/action.yml b/.github/actions/checkout-and-install-node/action.yml index f5eb6f26..ddddfff6 100644 --- a/.github/actions/checkout-and-install-node/action.yml +++ b/.github/actions/checkout-and-install-node/action.yml @@ -12,6 +12,7 @@ runs: with: fetch-depth: 0 persist-credentials: ${{ inputs.persist-credentials }} + submodules: ${{ inputs.submodules }} - uses: actions/setup-node@v2 with: node-version-file: '.nvmrc' diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index dd0d9117..e996f838 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -18,12 +18,8 @@ jobs: continue-on-error: true steps: - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@f69248b52b7991214847e889f28ba0883ed0ca2c - - name: Reconfigure git to use HTTP authentication - run: > - git config --global url."https://github.com/".insteadOf - git@github.com/ - - name: Checkout submodules - run: git submodule update --init --recursive + with: + submodules: recursive - run: npm run check-endpoints lint: runs-on: ubuntu-20.04 From 37dd72cfbe18fb93b3f19a285d53adb8c61fa96f Mon Sep 17 00:00:00 2001 From: Nikolay Matrosov Date: Fri, 20 Oct 2023 14:39:17 +0200 Subject: [PATCH 6/6] test: move action git hash --- .github/workflows/pr-checks.yml | 8 ++++---- .github/workflows/release.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index e996f838..df266fd4 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -9,7 +9,7 @@ jobs: tests: runs-on: ubuntu-20.04 steps: - - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@f69248b52b7991214847e889f28ba0883ed0ca2c + - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@9fc72bb2948886090f84c9236580fbca480bdea7 - run: npm run test check-endpoints: runs-on: ubuntu-20.04 @@ -17,17 +17,17 @@ jobs: # So we need to continue on error. continue-on-error: true steps: - - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@f69248b52b7991214847e889f28ba0883ed0ca2c + - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@9fc72bb2948886090f84c9236580fbca480bdea7 with: submodules: recursive - run: npm run check-endpoints lint: runs-on: ubuntu-20.04 steps: - - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@f69248b52b7991214847e889f28ba0883ed0ca2c + - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@9fc72bb2948886090f84c9236580fbca480bdea7 - run: npm run lint build: runs-on: ubuntu-20.04 steps: - - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@f69248b52b7991214847e889f28ba0883ed0ca2c + - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@9fc72bb2948886090f84c9236580fbca480bdea7 - run: npm run build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 34908242..90ae7b29 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: name: Release runs-on: ubuntu-20.04 steps: - - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@f69248b52b7991214847e889f28ba0883ed0ca2c + - uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@9fc72bb2948886090f84c9236580fbca480bdea7 with: persist-credentials: false - env: