Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance /publish to allow for multiple connectors and parallel execution #13864

Merged
merged 106 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
a3100ef
start
Phlair Jun 16, 2022
7a3958f
revert
Phlair Jun 16, 2022
4575f36
azblob
Phlair Jun 16, 2022
9028a58
bq
Phlair Jun 16, 2022
892037b
bq denorm
Phlair Jun 16, 2022
bdd87ac
Merge commit 'da95f5055517f97ed10cf230d3c2054d01661d8e' into george/p…
Phlair Jun 16, 2022
e39f6bf
Merge branch 'george/publish-java-connectors' into george/mega-publish
Phlair Jun 16, 2022
1ef7488
megapublish baaaabyyyy
Phlair Jun 16, 2022
c3cf966
fix needs
Phlair Jun 16, 2022
2c05ac5
matrix connectors
Phlair Jun 16, 2022
981cb6a
auto-bump connector version
octavia-squidington-iii Jun 16, 2022
5181fa0
dont failfast and max parallel 5
Phlair Jun 16, 2022
4e3575b
multi runno
Phlair Jun 17, 2022
ba45af5
minor
Phlair Jun 17, 2022
b9a9939
testing matrix agents
Phlair Jun 17, 2022
93a7695
name
Phlair Jun 17, 2022
4169452
testing multi agents
Phlair Jun 17, 2022
ec76490
tmp fix
Phlair Jun 17, 2022
2da540a
new multi agents
Phlair Jun 17, 2022
5f0c38b
multi test
Phlair Jun 17, 2022
3849459
tryy
Phlair Jun 17, 2022
2a58e3d
let's do this
Phlair Jun 17, 2022
db58ff4
magico
Phlair Jun 17, 2022
d1cf7f2
fix
Phlair Jun 17, 2022
5232e21
label test
Phlair Jun 17, 2022
0ffb08a
Merge commit '6ba511cc6dadd0cdcb6f0dfb758880ecbd83bb96' into george/m…
Phlair Jun 17, 2022
5d4a760
couple more connector bumps
Phlair Jun 17, 2022
1cd9f99
temp
Phlair Jun 17, 2022
5b9ac81
things
Phlair Jun 17, 2022
d43e431
check this
Phlair Jun 17, 2022
2a760fa
lets gooo
Phlair Jun 17, 2022
8a9e074
more connectors
Phlair Jun 17, 2022
bbb5486
Merge commit 'a2a4ab555398e30b06d11c3038008710931c2aa3' into george/m…
Phlair Jun 17, 2022
2434417
Delete TEMP-testing-command.yml
Phlair Jun 17, 2022
1748a5e
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
559c947
Merge branch 'george/mega-publish' of https://github.com/airbytehq/ai…
octavia-squidington-iii Jun 17, 2022
79cb87d
added comment describing bash part
Phlair Jun 17, 2022
4fe526d
running single thread
Phlair Jun 17, 2022
bb7de7a
catch sentry cli
Phlair Jun 17, 2022
b690ac3
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
ede36cf
Merge branch 'george/mega-publish' of https://github.com/airbytehq/ai…
octavia-squidington-iii Jun 17, 2022
9dd629a
Merge branch 'master' into george/mega-publish
Phlair Jun 17, 2022
7e5866b
destinations
Phlair Jun 17, 2022
bb5820d
+ snowflake
Phlair Jun 17, 2022
2d3a0de
saved
Phlair Jun 17, 2022
d7275be
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
8f08f96
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
0f243d8
java source bumps
Phlair Jun 17, 2022
6c88d79
Merge branch 'george/mega-publish' of https://github.com/airbytehq/ai…
Phlair Jun 17, 2022
d409ed6
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
5575f34
Merge branch 'george/mega-publish' of https://github.com/airbytehq/ai…
octavia-squidington-iii Jun 17, 2022
8ad0042
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
fc91f0c
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
e3238ca
Merge branch 'george/mega-publish' of https://github.com/airbytehq/ai…
octavia-squidington-iii Jun 17, 2022
73b3f66
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
83fe86a
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
5f8af97
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
4927fe9
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
bc573eb
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
c9a8248
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
e89cf1d
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
cca4264
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
0c3bb2a
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
a4c06d8
Merge branch 'george/mega-publish' of https://github.com/airbytehq/ai…
octavia-squidington-iii Jun 17, 2022
51b476e
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
5a75812
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
cf9a60c
Merge branch 'george/mega-publish' of https://github.com/airbytehq/ai…
octavia-squidington-iii Jun 17, 2022
f76c6f8
auto-bump connector version
octavia-squidington-iii Jun 17, 2022
32e41e5
auto-bump connector version
octavia-squidington-iii Jun 18, 2022
275a4e7
auto-bump connector version
octavia-squidington-iii Jun 18, 2022
e9e0583
auto-bump connector version
octavia-squidington-iii Jun 18, 2022
c7bb056
auto-bump connector version
octavia-squidington-iii Jun 18, 2022
d4050ef
Merge branch 'master' into george/mega-publish
Phlair Jun 20, 2022
7de94cd
Merge branch 'master' into george/mega-publish
Phlair Jun 20, 2022
2b952b6
merge
Phlair Jun 20, 2022
e2d7624
remove twice-defined methods
Phlair Jun 20, 2022
05121d3
label things
Phlair Jun 20, 2022
9106fed
revert action
Phlair Jun 20, 2022
9201743
Merge commit '546d6333374a258ee70cb8359c3c42f02a5cfc77' into george/m…
Phlair Jun 20, 2022
be6ce9d
using the new test action
Phlair Jun 20, 2022
30b1871
Merge branch 'master' into george/mega-publish
Phlair Jun 20, 2022
5597760
point at action
Phlair Jun 20, 2022
55c3b64
wrong tag on action
Phlair Jun 20, 2022
8e6bc8d
update pool label
Phlair Jun 20, 2022
82f2d97
update to use new ec2-github-runner fork
Phlair Jun 20, 2022
72f934b
this needs to be more generic than publisher
Phlair Jun 20, 2022
e855cb6
change publish to run on pool
Phlair Jun 20, 2022
036565a
add comment about runner-pool usage
Phlair Jun 20, 2022
4f2d60e
updated publish command docs for multi & parallel connector runs
Phlair Jun 20, 2022
57b31ee
auto-bump connector version
octavia-squidington-iii Jun 20, 2022
2908d06
Merge branch 'george/mega-publish' of https://github.com/airbytehq/ai…
octavia-squidington-iii Jun 20, 2022
4dec177
auto-bump connector version
octavia-squidington-iii Jun 20, 2022
cf5f8eb
auto-bump connector version
octavia-squidington-iii Jun 20, 2022
5cd2f3d
Merge branch 'george/mega-publish' of https://github.com/airbytehq/ai…
octavia-squidington-iii Jun 20, 2022
3f73ba2
unbump failed publish versions
Phlair Jun 21, 2022
6d1013d
Merge branch 'george/mega-publish' of https://github.com/airbytehq/ai…
Phlair Jun 21, 2022
610b05a
missed dockerfiles
Phlair Jun 21, 2022
cc849be
remove failed docs
Phlair Jun 21, 2022
f7e1c52
mssql fix
Phlair Jun 21, 2022
113dbe0
overhauled the git comment output
Phlair Jun 21, 2022
1c30f21
bumping a test connector that should work
Phlair Jun 21, 2022
867d72a
Merge branch 'master' into george/mega-publish
Phlair Jun 21, 2022
a4688d9
slight order switcheroo
Phlair Jun 21, 2022
e68f491
output connectors properly in first message
Phlair Jun 21, 2022
035e7ac
auto-bump connector version
octavia-squidington-iii Jun 21, 2022
cf25915
Merge branch 'george/mega-publish' of https://github.com/airbytehq/ai…
octavia-squidington-iii Jun 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 39 additions & 19 deletions .github/workflows/publish-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,29 @@ jobs:
aws-access-key-id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
github-token: ${{ needs.find_valid_pat.outputs.pat }}
preprocess-matrix:
needs: start-publish-image-runner
runs-on: ${{ needs.start-publish-image-runner.outputs.label }}
outputs:
connectorjson: ${{ steps.preprocess.outputs.connectorjson }}
steps:
- id: preprocess
run: |
start="[\""
replace="\",\""
end="\"]"
stripped_connector="$(echo "${{ github.event.inputs.connector }}" | tr -d ' ')"
middle=${stripped_connector//,/$replace}
full="$start$middle$end"
echo "::set-output name=connectorjson::$full"
Comment on lines +172 to +178
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bash witchcraft!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... there may be a jq way that might be cleaner.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment about what this script is trying to do? For example:

# input: connectors/x, connectors/y, connectors/z
# output: ["connectors/x", "connectors/y", "connectors/z"]

publish-image:
timeout-minutes: 240
needs: start-publish-image-runner
needs:
- start-publish-image-runner
- preprocess-matrix
strategy:
matrix:
connector: ${{ fromJSON(needs.preprocess-matrix.outputs.connectorjson) }}
runs-on: ${{ needs.start-publish-image-runner.outputs.label }}
environment: more-secrets
steps:
Expand All @@ -77,7 +97,7 @@ jobs:
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :clock2: ${{github.event.inputs.connector}} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
> :clock2: ${{matrix.connector}} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
with:
Expand All @@ -89,9 +109,9 @@ jobs:
with:
regex_pattern: "^(connectors|bases)/[a-zA-Z0-9-_]+$"
regex_flags: "i" # required to be set for this plugin
search_string: ${{ github.event.inputs.connector }}
search_string: ${{ matrix.connector }}
- name: Validate input workflow format
if: steps.regex.outputs.first_match != github.event.inputs.connector
if: steps.regex.outputs.first_match != matrix.connector
run: echo "The connector provided has an invalid format!" && exit 1
- name: Checkout Airbyte
uses: actions/checkout@v2
Expand Down Expand Up @@ -126,43 +146,43 @@ jobs:
source venv/bin/activate
tox -r -c ./tools/tox_ci.ini
pip install --quiet -e ./tools/ci_*
- name: Write Integration Test Credentials for ${{ github.event.inputs.connector }}
- name: Write Integration Test Credentials for ${{ matrix.connector }}
run: |
source venv/bin/activate
ci_credentials ${{ github.event.inputs.connector }}
ci_credentials ${{ matrix.connector }}
env:
GCP_GSM_CREDENTIALS: ${{ secrets.GCP_GSM_CREDENTIALS }}
- name: Set Name and Version Environment Vars
if: startsWith(github.event.inputs.connector, 'connectors')
if: startsWith(matrix.connector, 'connectors')
run: |
source tools/lib/lib.sh
DOCKERFILE=airbyte-integrations/${{ github.event.inputs.connector }}/Dockerfile
echo "IMAGE_NAME=$(echo ${{ github.event.inputs.connector }} | cut -d"/" -f2)" >> $GITHUB_ENV
DOCKERFILE=airbyte-integrations/${{ matrix.connector }}/Dockerfile
echo "IMAGE_NAME=$(echo ${{ matrix.connector }} | cut -d"/" -f2)" >> $GITHUB_ENV
echo "IMAGE_VERSION=$(_get_docker_image_version ${DOCKERFILE})" >> $GITHUB_ENV
- name: Prepare Sentry
if: startsWith(github.event.inputs.connector, 'connectors')
if: startsWith(matrix.connector, 'connectors')
run: |
curl -sL https://sentry.io/get-cli/ | bash
- name: Create Sentry Release
if: startsWith(github.event.inputs.connector, 'connectors')
if: startsWith(matrix.connector, 'connectors')
run: |
sentry-cli releases set-commits "${{ env.IMAGE_NAME }}@${{ env.IMAGE_VERSION }}" --auto --ignore-missing
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_CONNECTOR_RELEASE_AUTH_TOKEN }}
SENTRY_ORG: airbyte-5j
SENTRY_PROJECT: airbyte-connectors
- name: Publish ${{ github.event.inputs.connector }}
- name: Publish ${{ matrix.connector }}
run: |
echo "$SPEC_CACHE_SERVICE_ACCOUNT_KEY" > spec_cache_key_file.json && docker login -u ${DOCKER_HUB_USERNAME} -p ${DOCKER_HUB_PASSWORD}
./tools/integrations/manage.sh publish airbyte-integrations/${{ github.event.inputs.connector }} ${{ github.event.inputs.run-tests }} --publish_spec_to_cache
./tools/integrations/manage.sh publish airbyte-integrations/${{ matrix.connector }} ${{ github.event.inputs.run-tests }} --publish_spec_to_cache
id: publish
env:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
# Oracle expects this variable to be set. Although usually present, this is not set by default on Github virtual runners.
TZ: UTC
- name: Finalize Sentry release
if: startsWith(github.event.inputs.connector, 'connectors')
if: startsWith(matrix.connector, 'connectors')
run: |
sentry-cli releases finalize "${{ env.IMAGE_NAME }}@${{ env.IMAGE_VERSION }}"
env:
Expand All @@ -175,14 +195,14 @@ jobs:
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :rocket: Successfully published ${{github.event.inputs.connector}}
> :rocket: Successfully published ${{matrix.connector}}
- name: Add Published Failure Comment
if: github.event.inputs.comment-id && !success()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :x: Failed to publish ${{github.event.inputs.connector}}
> :x: Failed to publish ${{matrix.connector}}
- name: Check if connector in definitions yaml
if: github.event.inputs.auto-bump-version == 'true' && success()
run: |
Expand Down Expand Up @@ -226,21 +246,21 @@ jobs:
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :rocket: Auto-bumped version for ${{github.event.inputs.connector}}
> :rocket: Auto-bumped version for ${{matrix.connector}}
- name: Add Version Bump Failure Comment
if: github.event.inputs.comment-id && github.event.inputs.auto-bump-version == 'true' && !success()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :x: Couldn't auto-bump version for ${{github.event.inputs.connector}}
> :x: Couldn't auto-bump version for ${{matrix.connector}}
- name: Add Final Success Comment
if: github.event.inputs.comment-id && success()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :white_check_mark: ${{github.event.inputs.connector}} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
> :white_check_mark: ${{matrix.connector}} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
# In case of self-hosted EC2 errors, remove this block.
stop-publish-image-runner:
name: Stop Build EC2 Runner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ ENV APPLICATION destination-azure-blob-storage

COPY --from=build /airbyte /airbyte

LABEL io.airbyte.version=0.1.4
LABEL io.airbyte.version=0.1.5
LABEL io.airbyte.name=airbyte/destination-azure-blob-storage
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ ENV ENABLE_SENTRY true

COPY --from=build /airbyte /airbyte

LABEL io.airbyte.version=1.1.8
LABEL io.airbyte.version=1.1.9
LABEL io.airbyte.name=airbyte/destination-bigquery-denormalized
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ ENV ENABLE_SENTRY true

COPY --from=build /airbyte /airbyte

LABEL io.airbyte.version=1.1.8
LABEL io.airbyte.version=1.1.9
LABEL io.airbyte.name=airbyte/destination-bigquery
1 change: 1 addition & 0 deletions docs/integrations/destinations/azureblobstorage.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ They will be like this in the output file:

| Version | Date | Pull Request | Subject |
| :--- | :--- | :--- | :--- |
| 0.1.5 | 2022-06-16 | [\#13852](https://github.com/airbytehq/airbyte/pull/13852) | Updated stacktrace format for any trace message errors |
| 0.1.4 | 2022-05-17 | [12820](https://github.com/airbytehq/airbyte/pull/12820) | Improved 'check' operation performance |
| 0.1.3 | 2022-02-14 | [10256](https://github.com/airbytehq/airbyte/pull/10256) | Add `-XX:+ExitOnOutOfMemoryError` JVM option |
| 0.1.2 | 2022-01-20 | [\#9682](https://github.com/airbytehq/airbyte/pull/9682) | Each data synchronization for each stream is written to a new blob to the folder with stream name. |
Expand Down
2 changes: 2 additions & 0 deletions docs/integrations/destinations/bigquery.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Now that you have set up the BigQuery destination connector, check out the follo

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:-----------------------------------------------------------|:------------------------------------------------------------------------------------------------|
| 1.1.9 | 2022-06-16 | [\#13852](https://github.com/airbytehq/airbyte/pull/13852) | Updated stacktrace format for any trace message errors |
| 1.1.8 | 2022-06-07 | [13579](https://github.com/airbytehq/airbyte/pull/13579) | Always check GCS bucket for GCS loading method to catch invalid HMAC keys. |
| 1.1.7 | 2022-06-07 | [13424](https://github.com/airbytehq/airbyte/pull/13424) | Reordered fields for specification. |
| 1.1.6 | 2022-05-15 | [12768](https://github.com/airbytehq/airbyte/pull/12768) | Clarify that the service account key json field is required on cloud. |
Expand Down Expand Up @@ -171,6 +172,7 @@ Now that you have set up the BigQuery destination connector, check out the follo

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:-----------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------|
| 1.1.9 | 2022-06-16 | [\#13852](https://github.com/airbytehq/airbyte/pull/13852) | Updated stacktrace format for any trace message errors |
| 1.1.8 | 2022-06-07 | [13579](https://github.com/airbytehq/airbyte/pull/13579) | Always check GCS bucket for GCS loading method to catch invalid HMAC keys. |
| 1.1.7 | 2022-06-07 | [13424](https://github.com/airbytehq/airbyte/pull/13424) | Reordered fields for specification. |
| 1.1.6 | 2022-05-15 | [12768](https://github.com/airbytehq/airbyte/pull/12768) | Clarify that the service account key json field is required on cloud. |
Expand Down