From 2aef4a93e0891c47171cc59df1732ec3162d1f0c Mon Sep 17 00:00:00 2001 From: BodoBolero Date: Tue, 14 Jan 2025 11:49:06 +0100 Subject: [PATCH] naming convention --- .../actions/neon-project-create/action.yml | 35 ++++++++----------- .github/workflows/ingest_benchmark.yml | 8 ++--- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.github/actions/neon-project-create/action.yml b/.github/actions/neon-project-create/action.yml index 6a5a69f4ae..11f46bce8e 100644 --- a/.github/actions/neon-project-create/action.yml +++ b/.github/actions/neon-project-create/action.yml @@ -18,26 +18,26 @@ inputs: description: '[Min, Max] compute units' default: '[1, 1]' # settings below only needed if you want the project to be sharded from the beginning - shard-split-project: + shard_split_project: description: 'by default new projects are not shard-split, specify true to shard-split' required: false default: 'false' - admin-api-key: - description: 'Admin API Key needed for shard-splitting. Must be specified if shard-split-project is true' + admin_api_key: + description: 'Admin API Key needed for shard-splitting. Must be specified if shard_split_project is true' required: false - shard-count: - description: 'Number of shards to split the project into, only applies if shard-split-project is true' + shard_count: + description: 'Number of shards to split the project into, only applies if shard_split_project is true' required: false default: '8' - stripe-size: - description: 'Stripe size, optional, in 8kiB pages. e.g. set 2048 for 16MB stripes. Default is 128 MiB, only applies if shard-split-project is true' + stripe_size: + description: 'Stripe size, optional, in 8kiB pages. e.g. set 2048 for 16MB stripes. Default is 128 MiB, only applies if shard_split_project is true' required: false default: '32768' - psql-path: + psql_path: description: 'Path to psql binary - it is caller responsibility to provision the psql binary' required: false default: '/tmp/neon/pg_install/v16/bin/psql' - libpq-lib-path: + libpq_lib_path: description: 'Path to directory containing libpq library - it is caller responsibility to provision the libpq library' required: false default: '/tmp/neon/pg_install/v16/lib' @@ -90,12 +90,6 @@ runs: echo "Project ${project_id} has been created" if [ "${SHARD_SPLIT_PROJECT}" = "true" ]; then - # we need an ADMIN API KEY to invoke storage controller API for shard splitting - if [[ -z "${ADMIN_API_KEY:-}" ]]; then - echo "::error::ADMIN_API_KEY is not set or is empty but shard splitting was requested" - false # Fail the step - fi - # determine tenant ID TENANT_ID=`${PSQL} ${dsn} -t -A -c "SHOW neon.tenant_id"` @@ -104,6 +98,7 @@ runs: echo "Sending PUT request to https://${API_HOST}/regions/${REGION_ID}/api/v1/admin/storage/proxy/control/v1/tenant/${TENANT_ID}/shard_split" echo "with body {\"new_shard_count\": $((SHARD_COUNT)), \"new_stripe_size\": $((STRIPE_SIZE))}" + # we need an ADMIN API KEY to invoke storage controller API for shard splitting (bash -u above checks that the variable is set) curl -X PUT \ "https://${API_HOST}/regions/${REGION_ID}/api/v1/admin/storage/proxy/control/v1/tenant/${TENANT_ID}/shard_split" \ -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer ${ADMIN_API_KEY}" \ @@ -117,9 +112,9 @@ runs: POSTGRES_VERSION: ${{ inputs.postgres_version }} MIN_CU: ${{ fromJSON(inputs.compute_units)[0] }} MAX_CU: ${{ fromJSON(inputs.compute_units)[1] }} - SHARD_SPLIT_PROJECT: ${{ inputs.shard-split-project }} + SHARD_SPLIT_PROJECT: ${{ inputs.shard_split_project }} ADMIN_API_KEY: ${{ inputs.admin_api_key }} - SHARD_COUNT: ${{ inputs.shard-count }} - STRIPE_SIZE: ${{ inputs.stripe-size }} - PSQL: ${{ inputs.psql-path }} - LD_LIBRARY_PATH: ${{ inputs.libpq-lib-path }} + SHARD_COUNT: ${{ inputs.shard_count }} + STRIPE_SIZE: ${{ inputs.stripe_size }} + PSQL: ${{ inputs.psql_path }} + LD_LIBRARY_PATH: ${{ inputs.libpq_lib_path }} diff --git a/.github/workflows/ingest_benchmark.yml b/.github/workflows/ingest_benchmark.yml index 767d9660bb..b5b19e3b87 100644 --- a/.github/workflows/ingest_benchmark.yml +++ b/.github/workflows/ingest_benchmark.yml @@ -75,10 +75,10 @@ jobs: postgres_version: 16 compute_units: '[7, 7]' # we want to test large compute here to avoid compute-side bottleneck api_key: ${{ secrets.NEON_STAGING_API_KEY }} - shard-split-project: true - admin-api-key: ${{ secrets.NEON_STAGING_ADMIN_API_KEY }} - shard-count: 8 - stripe-size: 512 + shard_split_project: true + admin_api_key: ${{ secrets.NEON_STAGING_ADMIN_API_KEY }} + shard_count: 8 + stripe_size: 512 - name: Initialize Neon project if: ${{ matrix.target_project == 'new_empty_project' }}