Skip to content

CORE-918: Improve bump-version workflow for docs branch and dbt lock#2249

Merged
elazarlachkar merged 8 commits into
masterfrom
CORE-918-bump-version-workflow
Jun 2, 2026
Merged

CORE-918: Improve bump-version workflow for docs branch and dbt lock#2249
elazarlachkar merged 8 commits into
masterfrom
CORE-918-bump-version-workflow

Conversation

@elazarlachkar

@elazarlachkar elazarlachkar commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Opens a separate docs PR from the docs branch, updating package version in configurable doc paths
  • Runs dbt deps --lock after bumping packages.yml so package-lock.yml is included in the release
  • Merges release PR creation into the bump-version job with human-readable PR titles
  • Replacing archived repo-sync/pull-request with new peter-evans/create-pull-request@v8.0.0 action.

Test plan

Made with Cursor

Summary by CodeRabbit

  • Chores
    • Improved release automation to make version bumps for the dbt package more reliable and automated (including dependency lock updates and branch commits).
    • Added environment validation and runtime setup to ensure consistent CLI/dbt versions during releases.
    • Streamlined documentation flow: docs release branches are created, versioned, pushed, and PRs opened automatically.

elazarlachkar and others added 2 commits June 2, 2026 09:09
Update docs on the docs branch in a separate job, run dbt deps --lock
after bumping packages.yml, and merge PR creation into bump-version.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@linear

linear Bot commented Jun 2, 2026

Copy link
Copy Markdown

CORE-918

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

👋 @elazarlachkar
Thank you for raising your pull request.
Please make sure to add tests and document all user-facing changes.
You can do this by editing the docs files in this pull request.

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Refactors the bump-version GitHub Actions workflow: adds job permissions and Python 3.12 setup, consolidates dbt package version bump plus dbt deps --lock into a release-branch PR to master, and extracts docs updates into a separate job that opens PRs against the docs branch.

Changes

Release Workflow Refactoring

Layer / File(s) Summary
Job permissions and Python environment setup
.github/workflows/bump-version.yml
The bump-version job grants pull-requests: write, sets validated CLI/DBT env vars, checks out the repo, sets up Python 3.12, and installs dbt-core==1.8 before bump operations.
dbt package version bumping and PR creation
.github/workflows/bump-version.yml
Replaces the prior package bump step with editing elementary/monitor/dbt_project/packages.yml, running dbt deps --lock for that dbt project, committing/pushing the release branch, and opening a PR to master via peter-evans/create-pull-request@v8.0.0.
Documentation branch update as separate job
.github/workflows/bump-version.yml
Adds update-docs-branch job to create release/docs-v<cli-version> from docs, update docs/snippets/quickstart-package-install.mdx and docs/data-tests/dbt/upgrade-package.mdx to the validated dbt package version, commit/push, and open a PR back into docs.
sequenceDiagram
  participant GitHubActions
  participant GitRepo
  participant dbt
  participant CreatePRAction
  GitHubActions->>GitRepo: checkout code, set CLI_VERSION/DBT_PACKAGE_VERSION/RELEASE_BRANCH
  GitHubActions->>GitHubActions: setup Python 3.12, pip install dbt-core==1.8
  GitHubActions->>GitRepo: modify elementary/monitor/dbt_project/packages.yml
  GitHubActions->>dbt: run dbt deps --lock (elementary/monitor/dbt_project)
  GitHubActions->>GitRepo: commit & push release branch
  GitHubActions->>CreatePRAction: create PR to master (release branch -> master)
  GitHubActions->>GitRepo: checkout docs ref, create release/docs-v<cli-version>
  GitHubActions->>GitRepo: update docs/snippets/quickstart-package-install.mdx and docs/data-tests/dbt/upgrade-package.mdx
  GitHubActions->>GitRepo: commit & push docs release branch
  GitHubActions->>CreatePRAction: create PR to docs (docs release branch -> docs)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • GuyEshdat

Poem

🐰 I hopped through workflows, tidy and spry,

Python set up under a cloudless sky,
dbt got bumped, deps locked in place,
Docs got a branch and a gentle embrace,
A tiny rabbit cheers the release race.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly reflects the main changes: improving the bump-version workflow with specific focus on docs branch handling and dbt lock file management.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch CORE-918-bump-version-workflow

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/bump-version.yml (1)

75-101: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Make the release branches rerunnable.

Both jobs use deterministic branch names and then do a plain git push. If this workflow is rerun for the same version after the branch already exists remotely—for example, when PR creation flakes after the push—the new local commit will be rejected as a non-fast-forward update and the workflow can't recover cleanly.

♻️ Minimal hardening
-      - name: Create release branch
-        run: git checkout -b "$RELEASE_BRANCH"
+      - name: Create release branch
+        run: git checkout -B "$RELEASE_BRANCH"-      - name: Push code
-        run: git push origin "$RELEASE_BRANCH"
+      - name: Push code
+        run: git push --force-with-lease --set-upstream origin "$RELEASE_BRANCH"-      - name: Create docs release branch
-        run: git checkout -b "$DOCS_RELEASE_BRANCH"
+      - name: Create docs release branch
+        run: git checkout -B "$DOCS_RELEASE_BRANCH"-      - name: Push code
-        run: git push origin "$DOCS_RELEASE_BRANCH"
+      - name: Push code
+        run: git push --force-with-lease --set-upstream origin "$DOCS_RELEASE_BRANCH"

Also applies to: 120-145

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/bump-version.yml around lines 75 - 101, The workflow fails
when rerun because it creates a new local branch with git checkout -b and does a
plain git push, which errors if the remote branch already exists; update the
"Create release branch" step to use git checkout -B "$RELEASE_BRANCH" (to reset
or recreate the local branch safely) and change the "Push code" step to git push
--set-upstream origin "$RELEASE_BRANCH" --force-with-lease (to update the remote
safely); apply the same changes for the equivalent steps around lines 120-145 so
RELEASE_BRANCH, CLI_VERSION and DBT_PACKAGE_VERSION runs are rerunnable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/bump-version.yml:
- Around line 102-110: The workflow step named "Create pull request" currently
uses the archived action repo-sync/pull-request@7e79a9f5dc3..., which is an
unreliable dependency; replace this step with a maintained approach such as
actions/create-pull-request, using the same inputs (source_branch ->
destination_branch, pr_title, pr_body, github_token), or implement the PR
creation via a short sequence that checks out the branch and runs gh pr create
or actions/github-script to call the GitHub REST API; update the step that
references uses: repo-sync/pull-request@... and map the existing inputs
(source_branch, destination_branch, pr_title, pr_body, github_token) to the
chosen maintained alternative.

---

Outside diff comments:
In @.github/workflows/bump-version.yml:
- Around line 75-101: The workflow fails when rerun because it creates a new
local branch with git checkout -b and does a plain git push, which errors if the
remote branch already exists; update the "Create release branch" step to use git
checkout -B "$RELEASE_BRANCH" (to reset or recreate the local branch safely) and
change the "Push code" step to git push --set-upstream origin "$RELEASE_BRANCH"
--force-with-lease (to update the remote safely); apply the same changes for the
equivalent steps around lines 120-145 so RELEASE_BRANCH, CLI_VERSION and
DBT_PACKAGE_VERSION runs are rerunnable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4b5b1057-554e-4aed-bd94-5a4669a90c78

📥 Commits

Reviewing files that changed from the base of the PR and between 57dfbdc and d94428d.

📒 Files selected for processing (1)
  • .github/workflows/bump-version.yml

Comment thread .github/workflows/bump-version.yml Outdated
elazarlachkar and others added 4 commits June 2, 2026 09:43
Avoid installing the full project; 1.8 is the first supported dbt version.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use peter-evans/create-pull-request v8 for release and docs PR creation.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove add-paths so create-pull-request includes every modified file by default.

Co-authored-by: Cursor <cursoragent@cursor.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/bump-version.yml:
- Around line 103-110: The workflow currently pushes env.RELEASE_BRANCH /
env.DOCS_RELEASE_BRANCH and then calls peter-evans/create-pull-request@v8.0.0
with with.branch pointed at those already-created branches, which violates the
action’s intended branch lifecycle; either remove the manual git push and let
create-pull-request manage the branch (remove the push step and the with.branch
input so the action commits changes and creates the PR branch itself), or keep
the manual push but replace the create-pull-request step with a gh pr create
invocation (use gh pr create --base master for RELEASE_BRANCH and --base docs
for DOCS_RELEASE_BRANCH) so you’re opening a PR against an already-pushed
branch; apply the same chosen approach to both PR steps.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0ed26111-a119-4f60-9134-c16f530650c3

📥 Commits

Reviewing files that changed from the base of the PR and between fe8ecea and f509ae2.

📒 Files selected for processing (1)
  • .github/workflows/bump-version.yml

Comment thread .github/workflows/bump-version.yml
@elazarlachkar elazarlachkar self-assigned this Jun 2, 2026
@elazarlachkar elazarlachkar requested a review from NoyaArie June 2, 2026 07:07
Show CLI and dbt package versions in the bump-version commit message and PR title.

Co-authored-by: Cursor <cursoragent@cursor.com>
@elazarlachkar elazarlachkar merged commit a22a3f0 into master Jun 2, 2026
25 of 26 checks passed
@elazarlachkar elazarlachkar deleted the CORE-918-bump-version-workflow branch June 2, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants