From e5262f44d06dde1c2e06b8814bb9b3c2593cb600 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 02:22:27 +0000 Subject: [PATCH 1/3] ci: add --force and --connector-name inputs to registry compile workflow Adds two optional workflow_dispatch inputs: - force: bypass version marker cache (for metadata-only changes) - connector-name: comma-separated list to scope latest/ resync Closes airbytehq/airbyte-ops-mcp#567 Co-Authored-By: AJ Steers --- .../generate-connector-registries.yml | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/generate-connector-registries.yml b/.github/workflows/generate-connector-registries.yml index b729c0c52c7a..20ea4afa67ef 100644 --- a/.github/workflows/generate-connector-registries.yml +++ b/.github/workflows/generate-connector-registries.yml @@ -7,6 +7,15 @@ on: description: "The git ref to check out from the repository" required: false type: string + force: + description: "Force resync of all latest/ directories even if version markers are current. Useful when metadata changes without a version bump." + required: false + type: boolean + default: false + connector-name: + description: "Comma-separated list of connector names to limit the latest/ resync scope (e.g. 'source-faker,source-github'). Leave empty to compile all connectors." + required: false + type: string workflow_call: permissions: @@ -44,8 +53,19 @@ jobs: env: GCS_CREDENTIALS: ${{ secrets.METADATA_SERVICE_PROD_GCS_CREDENTIALS }} shell: bash - run: > - airbyte-ops registry store compile - --store "${REGISTRY_STORE}" - --with-secrets-mask - --with-legacy-migration v1 + run: | + COMPILE_ARGS="airbyte-ops registry store compile" + COMPILE_ARGS="${COMPILE_ARGS} --store ${REGISTRY_STORE}" + COMPILE_ARGS="${COMPILE_ARGS} --with-secrets-mask" + COMPILE_ARGS="${COMPILE_ARGS} --with-legacy-migration v1" + if [[ "${{ inputs.force }}" == "true" ]]; then + COMPILE_ARGS="${COMPILE_ARGS} --force" + fi + if [[ -n "${{ inputs.connector-name }}" ]]; then + IFS=',' read -ra CONNECTORS <<< "${{ inputs.connector-name }}" + for c in "${CONNECTORS[@]}"; do + COMPILE_ARGS="${COMPILE_ARGS} --connector-name $(echo "$c" | xargs)" + done + fi + echo "Running: ${COMPILE_ARGS}" + ${COMPILE_ARGS} From 248e8312a1e683dc016a00acae76e532e401adda Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 02:27:44 +0000 Subject: [PATCH 2/3] fix: pass workflow inputs via env vars to prevent script injection Co-Authored-By: AJ Steers --- .github/workflows/generate-connector-registries.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate-connector-registries.yml b/.github/workflows/generate-connector-registries.yml index 20ea4afa67ef..618c74706dee 100644 --- a/.github/workflows/generate-connector-registries.yml +++ b/.github/workflows/generate-connector-registries.yml @@ -52,17 +52,19 @@ jobs: - name: Compile Registries env: GCS_CREDENTIALS: ${{ secrets.METADATA_SERVICE_PROD_GCS_CREDENTIALS }} + INPUT_FORCE: ${{ inputs.force }} + INPUT_CONNECTOR_NAME: ${{ inputs.connector-name }} shell: bash run: | COMPILE_ARGS="airbyte-ops registry store compile" COMPILE_ARGS="${COMPILE_ARGS} --store ${REGISTRY_STORE}" COMPILE_ARGS="${COMPILE_ARGS} --with-secrets-mask" COMPILE_ARGS="${COMPILE_ARGS} --with-legacy-migration v1" - if [[ "${{ inputs.force }}" == "true" ]]; then + if [[ "${INPUT_FORCE}" == "true" ]]; then COMPILE_ARGS="${COMPILE_ARGS} --force" fi - if [[ -n "${{ inputs.connector-name }}" ]]; then - IFS=',' read -ra CONNECTORS <<< "${{ inputs.connector-name }}" + if [[ -n "${INPUT_CONNECTOR_NAME}" ]]; then + IFS=',' read -ra CONNECTORS <<< "${INPUT_CONNECTOR_NAME}" for c in "${CONNECTORS[@]}"; do COMPILE_ARGS="${COMPILE_ARGS} --connector-name $(echo "$c" | xargs)" done From 678cffeac504489c16718d9664adc253c7e7547a Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 02:32:10 +0000 Subject: [PATCH 3/3] refactor: pre-compute CLI flags as env vars, no bash conditionals Per review feedback: use GitHub Actions expressions to compute FORCE_FLAG and CONNECTOR_NAME_FLAG as env vars, then reference them directly in a clean one-liner CLI invocation. Co-Authored-By: AJ Steers --- .../generate-connector-registries.yml | 29 +++++++------------ 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/.github/workflows/generate-connector-registries.yml b/.github/workflows/generate-connector-registries.yml index 618c74706dee..9235c8b9b940 100644 --- a/.github/workflows/generate-connector-registries.yml +++ b/.github/workflows/generate-connector-registries.yml @@ -13,7 +13,7 @@ on: type: boolean default: false connector-name: - description: "Comma-separated list of connector names to limit the latest/ resync scope (e.g. 'source-faker,source-github'). Leave empty to compile all connectors." + description: "A connector name to limit the latest/ resync scope (e.g. 'source-faker'). Leave empty to compile all connectors." required: false type: string workflow_call: @@ -52,22 +52,13 @@ jobs: - name: Compile Registries env: GCS_CREDENTIALS: ${{ secrets.METADATA_SERVICE_PROD_GCS_CREDENTIALS }} - INPUT_FORCE: ${{ inputs.force }} - INPUT_CONNECTOR_NAME: ${{ inputs.connector-name }} + FORCE_FLAG: ${{ inputs.force == true && '--force' || '' }} + CONNECTOR_NAME_FLAG: ${{ inputs.connector-name && format('--connector-name {0}', inputs.connector-name) || '' }} shell: bash - run: | - COMPILE_ARGS="airbyte-ops registry store compile" - COMPILE_ARGS="${COMPILE_ARGS} --store ${REGISTRY_STORE}" - COMPILE_ARGS="${COMPILE_ARGS} --with-secrets-mask" - COMPILE_ARGS="${COMPILE_ARGS} --with-legacy-migration v1" - if [[ "${INPUT_FORCE}" == "true" ]]; then - COMPILE_ARGS="${COMPILE_ARGS} --force" - fi - if [[ -n "${INPUT_CONNECTOR_NAME}" ]]; then - IFS=',' read -ra CONNECTORS <<< "${INPUT_CONNECTOR_NAME}" - for c in "${CONNECTORS[@]}"; do - COMPILE_ARGS="${COMPILE_ARGS} --connector-name $(echo "$c" | xargs)" - done - fi - echo "Running: ${COMPILE_ARGS}" - ${COMPILE_ARGS} + run: > + airbyte-ops registry store compile + --store "${REGISTRY_STORE}" + --with-secrets-mask + --with-legacy-migration v1 + ${FORCE_FLAG} + ${CONNECTOR_NAME_FLAG}