Skip to content

feat: release automation configs#262

Open
SoulPancake wants to merge 2 commits intomainfrom
feat/release-automation
Open

feat: release automation configs#262
SoulPancake wants to merge 2 commits intomainfrom
feat/release-automation

Conversation

@SoulPancake
Copy link
Copy Markdown
Member

Description

What problem is being solved?

How is it being solved?

What changes are made to solve it?

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

Warning

Rate limit exceeded

@SoulPancake has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 32 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 25 minutes and 32 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 76580ee8-14c5-4e83-9535-9261462ddcd5

📥 Commits

Reviewing files that changed from the base of the PR and between a6edd7c and 43f6ff4.

📒 Files selected for processing (5)
  • .github/workflows/release-please.yml
  • .release-please-manifest.json
  • RELEASE.md
  • openfga_sdk/constants.py
  • release-please-config.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/release-automation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.84%. Comparing base (a6edd7c) to head (43f6ff4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #262   +/-   ##
=======================================
  Coverage   69.84%   69.84%           
=======================================
  Files         140      140           
  Lines       10743    10743           
=======================================
  Hits         7503     7503           
  Misses       3240     3240           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SoulPancake SoulPancake marked this pull request as ready for review April 2, 2026 06:31
@SoulPancake SoulPancake requested a review from a team as a code owner April 2, 2026 06:31
Copilot AI review requested due to automatic review settings April 2, 2026 06:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds release automation via release-please for the Python SDK repo, including configuration, manifest, a GitHub Actions workflow, and operator documentation.

Changes:

  • Add release-please-config.json and .release-please-manifest.json to drive automated versioning and changelog generation.
  • Add a release-please GitHub Actions workflow with workflow_dispatch inputs.
  • Add RELEASE.md and annotate SDK_VERSION for release-please-managed updates.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
RELEASE.md New release runbook describing how to cut releases and troubleshoot release-please.
release-please-config.json Release-please configuration for Python releases, changelog sections, and extra files to bump.
openfga_sdk/constants.py Marks SDK_VERSION for automated version bumping.
.release-please-manifest.json Initializes the release-please manifest version.
.github/workflows/release-please.yml Adds the workflow that runs the reusable release-please automation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

SDK_VERSION: Final[str] = "0.10.0" # x-release-please-version

# User agent used in HTTP requests.
USER_AGENT: Final[str] = "openfga-sdk python/0.10.0"
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

USER_AGENT hardcodes the version string (0.10.0). When release-please bumps SDK_VERSION, USER_AGENT will drift and will likely break test/constants_consistency_test.py (it asserts SDK_VERSION in USER_AGENT). Consider deriving USER_AGENT from SDK_VERSION (e.g. via f-string) or add an x-release-please-version marker so both get updated together.

Suggested change
USER_AGENT: Final[str] = "openfga-sdk python/0.10.0"
USER_AGENT: Final[str] = f"openfga-sdk python/{SDK_VERSION}"

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +33
bump-type: ${{ inputs.bump-type || 'auto' }}
release-version: ${{ inputs.release-version || '' }}
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The workflow is triggered on both push and workflow_dispatch, but the with: block references inputs.*. The inputs context only exists for workflow_dispatch/workflow_call, and the input names also contain hyphens (which require bracket notation). This will fail on push runs and may also fail to parse for the hyphenated keys. Use github.event.inputs['bump-type'] / github.event.inputs['release-version'] (with sensible defaults) or gate access based on github.event_name.

Suggested change
bump-type: ${{ inputs.bump-type || 'auto' }}
release-version: ${{ inputs.release-version || '' }}
bump-type: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs['bump-type'] || 'auto' }}
release-version: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs['release-version'] || '' }}

Copilot uses AI. Check for mistakes.

jobs:
release:
uses: openfga/sdk-generator/.github/workflows/release-please.yml@main
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The reusable workflow is referenced by branch (openfga/sdk-generator/...@main). For release automation, pinning to an immutable ref (tag or commit SHA) helps avoid supply-chain risk and unexpected behavior changes when main moves.

Suggested change
uses: openfga/sdk-generator/.github/workflows/release-please.yml@main
uses: openfga/sdk-generator/.github/workflows/release-please.yml@3c5c1b9c8d4e2f6a7b8c9d0e1f2a3b4c5d6e7f8

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +5
This project uses [release-please](https://github.com/googleapis/release-please) via a
`workflow_dispatch`-triggered GitHub Actions workflow. This document explains how to cut
a release and what to watch out for.
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The guide says releases use a workflow_dispatch-triggered workflow, but .github/workflows/release-please.yml is also configured to run on push to main. Please update the wording to reflect the actual triggers so operators aren’t surprised by automatic runs.

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +29
- `patch` — bugfixes, docs, small changes
- `minor` — breaking changes (see above)
- `explicit` — you specify the exact version string (e.g. `0.11.0` or `0.11.0-beta.1`)
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The bump-type list omits auto and major, but the workflow dropdown includes both, and later text references patch/minor/major convenience options. Update the step to document all available choices and when to use them to avoid operator error.

Suggested change
- `patch` — bugfixes, docs, small changes
- `minor` — breaking changes (see above)
- `explicit` — you specify the exact version string (e.g. `0.11.0` or `0.11.0-beta.1`)
- `auto` — let release-please infer the next version from Conventional Commit types;
use this only when the previous tag was a normal release (no pre-release suffix)
and there are no manually created tags since then.
- `patch` — convenience option for a patch bump (`0.0.x`): bugfixes, docs, small
changes that are not intentionally breaking.
- `minor` — convenience option for a minor bump (`0.x.0`): use for breaking changes
under the pre-1.0.0 rules described above.
- `major` — convenience option for a major bump (`1.0.0`, `2.0.0`, …); in this
project, use only for a deliberate stable-API graduation decision, not for routine
breaking changes.
- `explicit` — you specify the exact version string (e.g. `0.11.0` or
`0.11.0-beta.1`); recommended when in doubt, and in all the situations listed in
the **When to use `explicit`** section below.

Copilot uses AI. Check for mistakes.
fix: correct retry logic for transient errors → Fixed
docs: update API reference → Documentation
perf: cache DNS lookups → Changed
refactor: extract auth helper → (hidden)
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The Conventional Commits → changelog mapping example marks refactor as “(hidden)”, but release-please-config.json configures refactor as visible (hidden: false) under the “Changed” section. Align the example with the config (or adjust the config) so the generated changelog matches the documented expectations.

Suggested change
refactor: extract auth helper → (hidden)
refactor: extract auth helper → Changed

Copilot uses AI. Check for mistakes.
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.

3 participants