Skip to content

Commit 93d12db

Browse files
ci: update /bump-progressive-rollout-version to call /bump-version, update Welcome Message documentation (#75914)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 6ecef7a commit 93d12db

File tree

3 files changed

+58
-154
lines changed

3 files changed

+58
-154
lines changed

.github/pr-welcome-internal.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ Airbyte Maintainers (that's you!) can execute the following slash commands on yo
1212
- 🛠️ Quick Fixes
1313
- `/format-fix` - Fixes most formatting issues.
1414
- `/bump-version` - Bumps connector versions, scraping `changelog` description from the PR title.
15+
- Bump types: `patch` (default), `minor`, `major`, `major_rc`, `rc`, `promote`.
16+
- The `rc` type is a smart default: applies `minor_rc` if stable, or bumps the RC number if already RC.
17+
- The `promote` type strips the RC suffix to finalize a release.
18+
- Example: `/bump-version type=rc` or `/bump-version type=minor`
19+
- `/bump-progressive-rollout-version` - Alias for `/bump-version type=rc`. Bumps with an RC suffix and enables progressive rollout.
1520
- ❇️ AI Testing and Review (internal link: [AI-SDLC Docs](https://github.com/airbytehq/ai-skills/blob/main/docs/hydra/)):
1621
- `/ai-prove-fix` - Runs prerelease readiness checks, including testing against customer connections.
1722
- `/ai-canary-prerelease` - Rolls out prerelease to 5-10 connections for canary testing.
1823
- `/ai-review` - AI-powered PR review for connector safety and quality gates.
1924
- 🚀 Connector Releases:
2025
- `/publish-connectors-prerelease` - Publishes pre-release connector builds (tagged as `{version}-preview.{git-sha}`) for all modified connectors in the PR.
21-
- `/bump-progressive-rollout-version` - Bumps connector version with an RC suffix (`2.16.10-rc.1`) for progressive rollouts (`enableProgressiveRollout: true`).
22-
- Example: `/bump-progressive-rollout-version changelog="Add new feature for progressive rollout"`
2326
- ☕️ JVM connectors:
2427
- `/update-connector-cdk-version connector=<CONNECTOR_NAME>` - Updates the specified connector to the latest CDK version.
2528
Example: `/update-connector-cdk-version connector=destination-bigquery`

.github/workflows/bump-progressive-rollout-version-command.yml

Lines changed: 14 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ on:
1111
description: "Optional. The comment-id of the slash command. Used to update the comment with the status."
1212
required: false
1313

14-
type:
15-
description: "The type of bump to perform. One of 'major', 'minor', or 'patch'."
16-
required: false
17-
default: "patch"
18-
1914
changelog:
2015
description: "Optional. The comment to add to the changelog. If not provided, the PR title will be used."
2116
required: false
@@ -31,6 +26,11 @@ on:
3126
description: "Ref (Ignored)"
3227
required: false
3328

29+
permissions:
30+
contents: read
31+
issues: write
32+
pull-requests: write
33+
3434
run-name: "Bump connector version for progressive rollout in PR: #${{ github.event.inputs.pr }}"
3535
concurrency:
3636
group: ${{ github.workflow }}-${{ github.event.inputs.pr }}
@@ -39,140 +39,12 @@ concurrency:
3939

4040
jobs:
4141
bump-progressive-rollout-version:
42-
name: "Bump version of connectors for progressive rollout in this PR"
43-
runs-on: ubuntu-24.04
44-
steps:
45-
- name: Get job variables
46-
id: job-vars
47-
env:
48-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
shell: bash
50-
run: |
51-
PR_JSON=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.inputs.pr }})
52-
echo "repo=$(echo "$PR_JSON" | jq -r .head.repo.full_name)" >> $GITHUB_OUTPUT
53-
echo "branch=$(echo "$PR_JSON" | jq -r .head.ref)" >> $GITHUB_OUTPUT
54-
echo "pr_title=$(echo "$PR_JSON" | jq -r .title)" >> $GITHUB_OUTPUT
55-
echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT
56-
57-
# NOTE: We still use a PAT here (rather than a GitHub App) because the workflow needs
58-
# permissions to add commits to our main repo as well as forks. This will only work on
59-
# forks if the user installs the app into their fork. Until we document this as a clear
60-
# path, we will have to keep using the PAT.
61-
- name: Checkout Airbyte
62-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
63-
with:
64-
repository: ${{ steps.job-vars.outputs.repo }}
65-
ref: ${{ steps.job-vars.outputs.branch }}
66-
fetch-depth: 1
67-
# Important that token is a PAT so that CI checks are triggered again.
68-
# Without this we would be forever waiting on required checks to pass.
69-
token: ${{ secrets.GH_PAT_APPROVINGTON_OCTAVIA }}
70-
71-
- name: Append comment with job run link
72-
# If comment-id is not provided, this will create a new
73-
# comment with the job run link.
74-
id: first-comment-action
75-
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
76-
with:
77-
comment-id: ${{ github.event.inputs.comment-id }}
78-
issue-number: ${{ github.event.inputs.pr }}
79-
body: |
80-
81-
> **Progressive Rollout Version Bump Started**
82-
>
83-
> This will bump the connector version with an RC suffix and enable progressive rollout.
84-
> [Check job output.][1]
85-
86-
[1]: ${{ steps.job-vars.outputs.run-url }}
87-
88-
- name: Log changelog source
89-
run: |
90-
if [ -n "${{ github.event.inputs.changelog }}" ]; then
91-
echo "Using user-provided changelog: ${{ github.event.inputs.changelog }}"
92-
else
93-
echo "Using PR title as changelog: ${{ steps.job-vars.outputs.pr_title }}"
94-
fi
95-
96-
- name: Run airbyte-ci connectors --modified bump-version with --rc flag
97-
uses: ./.github/actions/run-airbyte-ci
98-
continue-on-error: true
99-
with:
100-
context: "manual"
101-
gcs_credentials: ${{ secrets.METADATA_SERVICE_PROD_GCS_CREDENTIALS }}
102-
sentry_dsn: ${{ secrets.SENTRY_AIRBYTE_CI_DSN }}
103-
github_token: ${{ secrets.GH_PAT_APPROVINGTON_OCTAVIA }}
104-
git_repo_url: https://github.com/${{ steps.job-vars.outputs.repo }}.git
105-
subcommand: |
106-
connectors --modified bump-version \
107-
${{ github.event.inputs.type }} \
108-
"${{ github.event.inputs.changelog != '' && github.event.inputs.changelog || steps.job-vars.outputs.pr_title }}" \
109-
--pr-number ${{ github.event.inputs.pr }} \
110-
--rc
111-
112-
# This is helpful in the case that we change a previously committed generated file to be ignored by git.
113-
- name: Remove any files that have been gitignored
114-
run: git ls-files -i -c --exclude-from=.gitignore | xargs -r git rm --cached
115-
116-
# Check for changes in git
117-
- name: Check for changes
118-
id: git-diff
119-
run: |
120-
git diff --quiet && echo "No changes to commit" || echo "changes=true" >> $GITHUB_OUTPUT
121-
shell: bash
122-
123-
# Commit changes (if any)
124-
- name: Commit changes
125-
id: commit-step
126-
if: steps.git-diff.outputs.changes == 'true'
127-
run: |
128-
git config --global user.name "Octavia Squidington III"
129-
git config --global user.email "octavia-squidington-iii@users.noreply.github.com"
130-
git add .
131-
git commit -m "chore: bump-version for progressive rollout"
132-
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
133-
134-
- name: Push changes to '(${{ steps.job-vars.outputs.repo }})'
135-
if: steps.git-diff.outputs.changes == 'true'
136-
run: |
137-
git remote add contributor https://github.com/${{ steps.job-vars.outputs.repo }}.git
138-
git push contributor HEAD:'${{ steps.job-vars.outputs.branch }}'
139-
140-
- name: Append success comment
141-
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
142-
if: steps.git-diff.outputs.changes == 'true'
143-
with:
144-
comment-id: ${{ steps.first-comment-action.outputs.comment-id }}
145-
reactions: hooray
146-
body: |
147-
> **Progressive Rollout Version Bump: SUCCESS**
148-
>
149-
> The connector version has been bumped with an RC suffix (e.g., `X.Y.Z-rc.1`).
150-
> Changes applied successfully. (${{ steps.commit-step.outputs.sha }})
151-
>
152-
> **Next steps:**
153-
> 1. Merge this PR to publish the RC version
154-
> 2. Monitor the progressive rollout in production
155-
> 3. When ready to promote, use the `finalize_rollout` workflow with `action=promote`
156-
> 4. If issues arise, use `action=rollback` instead
157-
158-
- name: Append success comment (no-op)
159-
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
160-
if: steps.git-diff.outputs.changes != 'true'
161-
with:
162-
comment-id: ${{ steps.first-comment-action.outputs.comment-id }}
163-
reactions: "-1"
164-
body: |
165-
> Job completed successfully (no changes detected).
166-
>
167-
> This might happen if:
168-
> - The connector already has an RC version
169-
> - No modified connectors were detected in this PR
170-
171-
- name: Append failure comment
172-
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
173-
if: failure()
174-
with:
175-
comment-id: ${{ steps.first-comment-action.outputs.comment-id }}
176-
reactions: confused
177-
body: |
178-
> Job failed. Check the [workflow logs](${{ steps.job-vars.outputs.run-url }}) for details.
42+
# Delegate to the bump-version workflow with type=rc.
43+
uses: ./.github/workflows/bump-version-command.yml
44+
with:
45+
pr: ${{ github.event.inputs.pr }}
46+
comment-id: ${{ github.event.inputs.comment-id }}
47+
type: "rc"
48+
changelog: ${{ github.event.inputs.changelog }}
49+
secrets:
50+
GH_PAT_APPROVINGTON_OCTAVIA: ${{ secrets.GH_PAT_APPROVINGTON_OCTAVIA }}

.github/workflows/bump-version-command.yml

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
11
name: Bump versions for connectors in a PR
22

33
on:
4+
workflow_call:
5+
inputs:
6+
pr:
7+
description: "Pull request number. This PR will be referenced in the changelog line."
8+
type: string
9+
required: false
10+
comment-id:
11+
description: "Optional. The comment-id of the slash command. Used to update the comment with the status."
12+
type: string
13+
required: false
14+
type:
15+
description: "The type of bump to perform. One of 'major', 'minor', or 'patch'."
16+
type: string
17+
required: false
18+
default: "patch"
19+
changelog:
20+
description: "Optional. The comment to add to the changelog. If not provided, the PR title will be used."
21+
type: string
22+
required: false
23+
default: ""
24+
secrets:
25+
GH_PAT_APPROVINGTON_OCTAVIA:
26+
required: true
27+
428
workflow_dispatch:
529
inputs:
630
pr:
@@ -32,9 +56,14 @@ on:
3256
description: "Ref (Ignored)"
3357
required: false
3458

35-
run-name: "Bump connector versions in PR: #${{ github.event.inputs.pr }}"
59+
permissions:
60+
contents: read
61+
issues: write
62+
pull-requests: write
63+
64+
run-name: "Bump connector versions in PR: #${{ inputs.pr }}"
3665
concurrency:
37-
group: ${{ github.workflow }}-${{ github.event.inputs.pr }}
66+
group: ${{ github.workflow }}-${{ inputs.pr }}
3867
# Cancel any previous runs on the same branch if they are still in progress
3968
cancel-in-progress: true
4069

@@ -47,7 +76,7 @@ jobs:
4776
id: job-vars
4877
env:
4978
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50-
PR_NUMBER: ${{ github.event.inputs.pr }}
79+
PR_NUMBER: ${{ inputs.pr }}
5180
shell: bash
5281
run: |
5382
PR_JSON=$(gh api "repos/${{ github.repository }}/pulls/$PR_NUMBER")
@@ -76,8 +105,8 @@ jobs:
76105
id: first-comment-action
77106
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
78107
with:
79-
comment-id: ${{ github.event.inputs.comment-id }}
80-
issue-number: ${{ github.event.inputs.pr }}
108+
comment-id: ${{ inputs.comment-id }}
109+
issue-number: ${{ inputs.pr }}
81110
body: |
82111
83112
> Bump Version job started... [Check job output.][1]
@@ -93,7 +122,7 @@ jobs:
93122
- name: Detect modified connectors
94123
id: detect-connectors
95124
env:
96-
PR_NUMBER: ${{ github.event.inputs.pr }}
125+
PR_NUMBER: ${{ inputs.pr }}
97126
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98127
run: |
99128
CONNECTORS=$(
@@ -125,10 +154,10 @@ jobs:
125154
- name: Bump versions for modified connectors
126155
if: steps.detect-connectors.outputs.connectors != ''
127156
env:
128-
BUMP_TYPE: ${{ github.event.inputs.type }}
129-
CHANGELOG_MSG: ${{ github.event.inputs.changelog }}
157+
BUMP_TYPE: ${{ inputs.type }}
158+
CHANGELOG_MSG: ${{ inputs.changelog }}
130159
PR_TITLE: ${{ steps.job-vars.outputs.pr_title }}
131-
PR_NUMBER: ${{ github.event.inputs.pr }}
160+
PR_NUMBER: ${{ inputs.pr }}
132161
CONNECTORS: ${{ steps.detect-connectors.outputs.connectors }}
133162
run: |
134163
MSG="${CHANGELOG_MSG:-$PR_TITLE}"
@@ -163,7 +192,7 @@ jobs:
163192
id: commit-step
164193
if: steps.git-diff.outputs.changes == 'true'
165194
env:
166-
BUMP_TYPE: ${{ github.event.inputs.type }}
195+
BUMP_TYPE: ${{ inputs.type }}
167196
run: |
168197
git config --global user.name "Octavia Squidington III"
169198
git config --global user.email "octavia-squidington-iii@users.noreply.github.com"

0 commit comments

Comments
 (0)