Skip to content

Commit ed8cebe

Browse files
authored
Small fixes to python cdk publishing (#36945)
* Use correct version reference in commit message * Use correct version reference in changelog message * Backfill changelog messages * Add loop with timeout to keep trying to get the newly published CDK version until it is available * Update error messaging when `source-declarative-manifest` cannot be published
1 parent c471530 commit ed8cebe

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

.github/workflows/publish-cdk-command-manually.yml

+14-6
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
uses: stefanzweifel/git-auto-commit-action@v4
112112
with:
113113
file_pattern: airbyte-cdk/python/pyproject.toml airbyte-cdk/python/CHANGELOG.md
114-
commit_message: 🤖 ${{ github.event.inputs.release-type }} bump Python CDK to version $NEW_VERSION
114+
commit_message: 🤖 ${{ github.event.inputs.release-type }} bump Python CDK to version ${{ steps.bumpversion.outputs.NEW_VERSION }}
115115
commit_user_name: Octavia Squidington III
116116
commit_user_email: [email protected]
117117
- name: Post failure to Slack channel dev-connectors-extensibility
@@ -208,10 +208,18 @@ jobs:
208208
ref: ${{ github.event.inputs.gitref }}
209209
token: ${{ secrets.GH_PAT_MAINTENANCE_OSS }} # This token is what allows us to commit directly to master
210210
- name: Bump CDK dependency of source-declarative-manifest
211+
timeout-minutes: 10
211212
run: |
212213
cd airbyte-integrations/connectors/source-declarative-manifest
213-
# --no-cache is used to ensure the latest version is fetched. Let's see if we need to add a wait...
214-
poetry add airbyte-cdk==${{needs.bump-version.outputs.new_cdk_version}} --no-cache
214+
echo "Attempting to pull the newly published version of airbyte-cdk."
215+
while true; do
216+
# --no-cache to force looking for the new version
217+
poetry add airbyte-cdk==${{needs.bump-version.outputs.new_cdk_version}} --no-cache && break
218+
# Loop to wait for the new version to be available to poetry
219+
echo "Couldn't add new dependency. This is normal if the dependency could not (yet) be found. Retrying in 10 seconds..."
220+
sleep 10
221+
done
222+
echo "Successfully updated the CDK dependency of source-declarative-manifest to ${{needs.bump-version.outputs.new_cdk_version}}"
215223
- name: Bump version of source-declarative-manifest
216224
uses: ./.github/actions/run-airbyte-ci
217225
with:
@@ -229,7 +237,7 @@ jobs:
229237
s3_build_cache_access_key_id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
230238
s3_build_cache_secret_key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
231239
# There is no pull request number as we do this manually, so will just reference when we started doing it manually for now
232-
subcommand: "connectors --concurrency=1 --execute-timeout=3600 --name=source-declarative-manifest bump_version ${{ github.event.inputs.release-type }} '36501' 'Bump CDK version to ${{ steps.bumpversion.outputs.NEW_VERSION }}'"
240+
subcommand: "connectors --concurrency=1 --execute-timeout=3600 --name=source-declarative-manifest bump_version ${{ github.event.inputs.release-type }} '36501' 'Bump CDK version to ${{needs.bump-version.outputs.new_cdk_version}}'"
233241
python_registry_token: ${{ secrets.PYPI_TOKEN }}
234242
- name: Commit and Push Changes
235243
uses: stefanzweifel/git-auto-commit-action@v4
@@ -246,7 +254,7 @@ jobs:
246254
channel-id: C04J1M66D8B
247255
payload: |
248256
{
249-
"text": ":warning: A new version of Python CDK has been released but Connector Builder hasn't been automatically updated",
257+
"text": ":warning: A new version of Python CDK has been released but `source-declarative-manifest` and Connector Builder haven't been automatically updated",
250258
"blocks": [
251259
{
252260
"type": "section",
@@ -259,7 +267,7 @@ jobs:
259267
"type": "section",
260268
"text": {
261269
"type": "mrkdwn",
262-
"text": ":warning: Could not automatically create a PR for Connector Builder>\n"
270+
"text": ":warning: Could not bump version of `source-declarative-manifest`.>\n"
263271
}
264272
},
265273
{

docs/integrations/sources/low-code.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ The changelog below is automatically updated by the `bump_version` command as pa
99

1010
| Version | Date | Pull Request | Subject |
1111
|:--------|:-----------|:---------------------------------------------------------|:---------------------------------------------------------------------|
12-
| 0.81.0 | 2024-04-09 | [36501](https://github.com/airbytehq/airbyte/pull/36501) | Bump CDK version to |
13-
| 0.80.0 | 2024-04-09 | [36501](https://github.com/airbytehq/airbyte/pull/36501) | Bump CDK version to |
14-
| 0.79.2 | 2024-04-09 | [36501](https://github.com/airbytehq/airbyte/pull/36501) | Bump CDK version to |
15-
| 0.79.1 | 2024-04-05 | [36501](https://github.com/airbytehq/airbyte/pull/36501) | Bump CDK version to |
16-
| 0.79.0 | 2024-04-05 | [36501](https://github.com/airbytehq/airbyte/pull/36501) | Bump CDK version to 0.79.0 |
12+
| 0.81.0 | 2024-04-09 | [36501](https://github.com/airbytehq/airbyte/pull/36501) | Bump CDK version to 0.81.0 |
13+
| 0.80.0 | 2024-04-09 | [36501](https://github.com/airbytehq/airbyte/pull/36501) | Bump CDK version to 0.80.0 |
14+
| 0.79.2 | 2024-04-09 | [36501](https://github.com/airbytehq/airbyte/pull/36501) | Bump CDK version to 0.79.2 |
15+
| 0.79.1 | 2024-04-05 | [36501](https://github.com/airbytehq/airbyte/pull/36501) | Bump CDK version to 0.79.1 |
16+
| 0.79.0 | 2024-04-05 | [36501](https://github.com/airbytehq/airbyte/pull/36501) | Bump CDK version to 0.79.0 |
1717
| 0.78.9 | 2024-04-04 | [36834](https://github.com/airbytehq/airbyte/pull/36834) | Update CDK dependency to version 0.78.9 (before new publishing flow) |

0 commit comments

Comments
 (0)