Conversation
Please make sure all the checkboxes are checked:
|
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds a new GitHub Actions workflow at Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
44a4b58 to
f277ad6
Compare
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
There was a problem hiding this comment.
Pull request overview
This PR introduces a new GitHub Actions workflow for automating releases across multiple platforms. The workflow supports both dev and main release flavors with an optional test mode (dry run) to prevent publishing to production indices during testing.
Key changes:
- Adds a manual workflow dispatch trigger with configurable flavor (dev/main) and test_mode inputs
- Implements three dependent jobs: GitHub release creation, PyPI package publishing, and Docker image building
- Configures conditional logic to route test releases to test.pypi.org and prevent production pushes during dry runs
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)
59-65: Consider updating the softprops/action-gh-release action to a newer version.The action is pinned to @v1, which is significantly outdated. Updating to v2 or later would benefit from security patches and Node.js runtime improvements.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/release.yml(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.github/**
⚙️ CodeRabbit configuration file
.github/**: * When the project is hosted on GitHub: All GitHub-specific configurations, templates, and tools should be found in the '.github' directory tree.
- 'actionlint' erroneously generates false positives when dealing with GitHub's
${{ ... }}syntax in conditionals.- 'actionlint' erroneously generates incorrect solutions when suggesting the removal of valid
${{ ... }}syntax.
Files:
.github/workflows/release.yml
🪛 actionlint (1.7.9)
.github/workflows/release.yml
60-60: the runner of "softprops/action-gh-release@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (23)
- GitHub Check: Upload results
- GitHub Check: End-to-End Tests / Concurrent Subprocess access test
- GitHub Check: End-to-End Tests / Test multi tenancy with different situations in Cognee
- GitHub Check: End-to-End Tests / Test Cognify - Edge Centered Payload
- GitHub Check: End-to-End Tests / Test Pipeline Caching
- GitHub Check: End-to-End Tests / Conversation sessions test (FS)
- GitHub Check: End-to-End Tests / Test graph edge ingestion
- GitHub Check: End-to-End Tests / Conversation sessions test (Redis)
- GitHub Check: End-to-End Tests / Test using different async databases in parallel in Cognee
- GitHub Check: End-to-End Tests / Test Entity Extraction
- GitHub Check: End-to-End Tests / Test Feedback Enrichment
- GitHub Check: End-to-End Tests / S3 Bucket Test
- GitHub Check: Basic Tests / Run Simple Examples
- GitHub Check: End-to-End Tests / Server Start Test
- GitHub Check: Basic Tests / Run Simple Examples BAML
- GitHub Check: End-to-End Tests / Run Telemetry Pipeline Test
- GitHub Check: End-to-End Tests / Test permissions with different situations in Cognee
- GitHub Check: Basic Tests / Run Unit Tests
- GitHub Check: End-to-End Tests / Test dataset database handlers in Cognee
- GitHub Check: End-to-End Tests / Deduplication Test
- GitHub Check: Basic Tests / Run Integration Tests
- GitHub Check: CLI Tests / CLI Functionality Tests
- GitHub Check: CLI Tests / CLI Integration Tests
🔇 Additional comments (4)
.github/workflows/release.yml (4)
1-16: Workflow inputs and configuration look good.Clear setup with sensible defaults (test_mode defaults to true for safety).
19-34: Job structure and permissions are appropriate.The permissions block correctly grants contents:write for tag creation, and the checkout/uv setup is standard.
67-87: PyPI job setup is correct.Permissions and dependency declaration are appropriate.
104-124: Docker job setup is correct.Permissions and Docker authentication setup are appropriate.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (4)
.github/workflows/release.yml (4)
24-25: Permissions blocks are properly scoped.All jobs now have explicit
permissionsdeclarations following the principle of least privilege. This addresses the previous security warnings.Also applies to: 70-71, 107-108
52-57: Shell syntax is correct.The if/else/fi structure is properly formatted and the conditional logic for tag creation is sound.
92-102: PyPI publish conditions are correct.Both TestPyPI and PyPI publish steps are now gated by
${{ !inputs.test_mode }}, ensuring they only execute for production releases.
126-154: Docker image push conditions are properly configured.Both dev and main image builds now use
push: ${{ !inputs.test_mode }}, ensuring images are only published for production releases.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/release.yml(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.github/**
⚙️ CodeRabbit configuration file
.github/**: * When the project is hosted on GitHub: All GitHub-specific configurations, templates, and tools should be found in the '.github' directory tree.
- 'actionlint' erroneously generates false positives when dealing with GitHub's
${{ ... }}syntax in conditionals.- 'actionlint' erroneously generates incorrect solutions when suggesting the removal of valid
${{ ... }}syntax.
Files:
.github/workflows/release.yml
🪛 actionlint (1.7.9)
.github/workflows/release.yml
60-60: the runner of "softprops/action-gh-release@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (22)
- GitHub Check: End-to-End Tests / Test Feedback Enrichment
- GitHub Check: End-to-End Tests / Test Pipeline Caching
- GitHub Check: End-to-End Tests / Test dataset database handlers in Cognee
- GitHub Check: End-to-End Tests / Conversation sessions test (Redis)
- GitHub Check: End-to-End Tests / Test graph edge ingestion
- GitHub Check: End-to-End Tests / Test permissions with different situations in Cognee
- GitHub Check: End-to-End Tests / Conversation sessions test (FS)
- GitHub Check: End-to-End Tests / Test Entity Extraction
- GitHub Check: End-to-End Tests / Concurrent Subprocess access test
- GitHub Check: Basic Tests / Run Integration Tests
- GitHub Check: End-to-End Tests / Deduplication Test
- GitHub Check: End-to-End Tests / Test using different async databases in parallel in Cognee
- GitHub Check: Basic Tests / Run Simple Examples
- GitHub Check: End-to-End Tests / Test multi tenancy with different situations in Cognee
- GitHub Check: End-to-End Tests / Test Cognify - Edge Centered Payload
- GitHub Check: End-to-End Tests / S3 Bucket Test
- GitHub Check: Basic Tests / Run Unit Tests
- GitHub Check: End-to-End Tests / Server Start Test
- GitHub Check: End-to-End Tests / Run Telemetry Pipeline Test
- GitHub Check: Basic Tests / Run Formatting Check
- GitHub Check: CLI Tests / CLI Integration Tests
- GitHub Check: CLI Tests / CLI Functionality Tests
🔇 Additional comments (1)
.github/workflows/release.yml (1)
1-23: Workflow inputs and job structure are well-designed.The workflow properly uses
workflow_dispatchinputs forflavourandtest_mode, with appropriate defaults and descriptions. The job dependency chain (release-github → release-pypi-package and release-docker-image) ensures sequential execution and proper output propagation.
7930388 to
14ff94f
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
♻️ Duplicate comments (1)
.github/workflows/release.yml (1)
1-26: (Optional) Add a top-levelpermissions:as a secure default.You already set job-level permissions, which is good; adding workflow-level defaults prevents future jobs from accidentally getting broad permissions.
name: release.yml +permissions: + contents: read on: workflow_dispatch:Also applies to: 67-72, 104-109
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)
1-17: Rename workflow display name (optional) to avoid “.yml” noise (currentname: release.yml).-name: release.yml +name: Release
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/release.yml(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.github/**
⚙️ CodeRabbit configuration file
.github/**: * When the project is hosted on GitHub: All GitHub-specific configurations, templates, and tools should be found in the '.github' directory tree.
- 'actionlint' erroneously generates false positives when dealing with GitHub's
${{ ... }}syntax in conditionals.- 'actionlint' erroneously generates incorrect solutions when suggesting the removal of valid
${{ ... }}syntax.
Files:
.github/workflows/release.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (25)
- GitHub Check: End-to-End Tests / Conversation sessions test (Redis)
- GitHub Check: End-to-End Tests / Test dataset database handlers in Cognee
- GitHub Check: End-to-End Tests / Conversation sessions test (FS)
- GitHub Check: End-to-End Tests / Test Pipeline Caching
- GitHub Check: End-to-End Tests / Concurrent Subprocess access test
- GitHub Check: End-to-End Tests / Server Start Test
- GitHub Check: End-to-End Tests / Test Feedback Enrichment
- GitHub Check: End-to-End Tests / Test permissions with different situations in Cognee
- GitHub Check: End-to-End Tests / Run Telemetry Pipeline Test
- GitHub Check: End-to-End Tests / Test Entity Extraction
- GitHub Check: End-to-End Tests / S3 Bucket Test
- GitHub Check: End-to-End Tests / Deduplication Test
- GitHub Check: End-to-End Tests / Test using different async databases in parallel in Cognee
- GitHub Check: End-to-End Tests / Test graph edge ingestion
- GitHub Check: Basic Tests / Run Integration Tests
- GitHub Check: End-to-End Tests / Test Cognify - Edge Centered Payload
- GitHub Check: Basic Tests / Run Simple Examples
- GitHub Check: End-to-End Tests / Run Telemetry Test
- GitHub Check: End-to-End Tests / Test multi tenancy with different situations in Cognee
- GitHub Check: Basic Tests / Run Simple Examples BAML
- GitHub Check: Basic Tests / Run Linting
- GitHub Check: Basic Tests / Run Formatting Check
- GitHub Check: Basic Tests / Run Unit Tests
- GitHub Check: CLI Tests / CLI Functionality Tests
- GitHub Check: CLI Tests / CLI Integration Tests
|
|
||
| release-docker-image: | ||
| needs: release-github | ||
| name: Release Docker Image from ${{ inputs.flavour }} |
There was a problem hiding this comment.
We could split these two into two separate workflows for easier maintenance. We can get the cognee version in the same way we get it in release-github so we don't have to depend on it.
There was a problem hiding this comment.
Do you mean split by flavour or put release-github and release-docker-image to separate workflows?
| test_mode: | ||
| required: true | ||
| type: boolean | ||
| description: Aka Dry Run. If true, it won't affect public indices or repositories |
There was a problem hiding this comment.
Why not call it dry-run since it is dry run already?
There was a problem hiding this comment.
Also thought about it. PyPI release actually publishes the artifacts in test mode, but to the test registry. So it's not the pure dry run.
Description
Inputs:
flavour:devormaintest_mode:Boolean. Aka Dry Run. If true, it won't affect public indices or repositoriesJobs
Test run
Create GitHub Release
Gets the
versionfrompyproject.tomlCreates a tag and release based on the version. The version in
pyproject.tomlmust be already correct!If the version not updated and tag already exists - the process will take no effect and be failed.
Test release was deleted. Here is the screenshot:

Release PyPI Package
Publishes the
distartifacts to pypi.org. Iftest_modeenabled - it will publish it to test.pypi.org (example). <<< That's how I tested it.Release Docker Image
IMPORTANT!
Builds the image and tags it with the version from
pyproject.toml. For example:cognee/cognee:0.5.1.dev0cognee/cognee:0.5.1ONLY main flavor adds the
latesttag!. If a user doesdocker pull cognee/cognee:latest- the latestmainrelease image will be pulledType of Change
Screenshots/Videos (if applicable)
Pre-submission Checklist
DCO Affirmation
I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.