Skip to content

feat: add weekly dev-canary release pipeline#2334

Merged
Vasilije1990 merged 1 commit intodevfrom
ci/dev-canary-release
Mar 11, 2026
Merged

feat: add weekly dev-canary release pipeline#2334
Vasilije1990 merged 1 commit intodevfrom
ci/dev-canary-release

Conversation

@Vasilije1990
Copy link
Contributor

@Vasilije1990 Vasilije1990 commented Mar 9, 2026

Summary

  • Adds dev_canary_release.yml workflow that publishes canary releases from the dev branch
  • Runs automatically every Monday at 06:00 UTC and supports manual dispatch on demand
  • Integrates into release_test.yml so canary can also be triggered after load tests pass

How it works

  1. Test gate — runs basic test suite before any publishing
  2. Version computation — strips .devN suffix from pyproject.toml, appends .dev{YYYYMMDD} (PEP 440 compliant)
  3. PyPI publish — publishes as a pre-release (pip install cognee --pre or pip install cognee==0.5.4.dev20260309)
  4. Docker publish — pushes cognee/cognee:dev-canary (rolling) + cognee/cognee:0.5.4.dev20260309 (pinned)

Usage

  • Install canary from PyPI: pip install cognee --pre
  • Pull canary Docker image: docker pull cognee/cognee:dev-canary
  • Trigger manually: Actions → Dev Canary Release → Run workflow
  • From release pipeline: Actions → Release Test Workflow → Run workflow (runs load tests first, then canary)

Test plan

  • Trigger workflow manually via Actions tab and verify PyPI + Docker publish
  • Verify PEP 440 version format is correct (e.g. 0.5.4.dev20260309)
  • Verify pip install cognee --pre picks up the canary release
  • Verify docker pull cognee/cognee:dev-canary works after publish

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Chores
    • Introduced automated canary release workflow triggering weekly and on-demand.
    • Canary package versions are now published to PyPI with date suffixes.
    • Docker images are now built and published for both AMD64 and ARM64 architectures.

Introduces an automated canary release pipeline that:
- Runs every Monday at 06:00 UTC (weekly) and on manual dispatch
- Gates on basic test suite before publishing
- Publishes PEP 440 dev pre-releases to PyPI (e.g. 0.5.4.dev20260309)
- Pushes Docker images tagged dev-canary + versioned canary tag
- Integrated into release_test.yml for on-demand canary from release pipeline

Install via: pip install cognee --pre
Docker via: docker pull cognee/cognee:dev-canary

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: vasilije <vas.markovic@gmail.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 9, 2026

Walkthrough

Introduces a new GitHub Actions workflow for automated dev canary releases that triggers on a schedule, manual dispatch, and workflow calls. The workflow performs version computation with UTC-based suffixing, gates via existing tests, and publishes both PyPI packages and Docker images to separate registries.

Changes

Cohort / File(s) Summary
Dev Canary Release Workflow
.github/workflows/dev_canary_release.yml
New workflow with four jobs: test-gate (reuses basic_tests), prepare (computes base and canary versions with .devYYYYMMDD format), release-pypi (publishes to PyPI with canary version), and release-docker (builds and pushes multi-architecture Docker images with canary tags).
Release Test Workflow Update
.github/workflows/release_test.yml
Adds packages write permission at workflow level and introduces a new "Dev Canary Release" job that depends on load-tests and invokes dev_canary_release.yml workflow with inherited secrets.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

core-team

Suggested reviewers

  • hande-k
  • borisarzentar
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a weekly canary release pipeline for the dev branch.
Description check ✅ Passed The PR description provides comprehensive details about the workflow, how it works, usage instructions, and a test plan, though it lacks some template sections like explicit acceptance criteria and pre-submission checklist completion.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci/dev-canary-release

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/release_test.yml (1)

19-25: Consider whether running both load-tests and basic_tests is intentional.

When triggered via release_test.yml, the test sequence will be:

  1. load-tests (from release_test.yml)
  2. test-gatebasic_tests (from dev_canary_release.yml)

If basic_tests is a subset of or overlaps with load-tests, you may be able to skip the test-gate job when called via workflow_call to reduce CI time. However, if they test different aspects, the redundancy provides additional safety.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release_test.yml around lines 19 - 25, The
dev-canary-release invocation causes both load-tests and basic_tests to run (via
the test-gate in dev_canary_release.yml), which can be redundant; update the
workflow to avoid running test-gate/basic_tests when release_test.yml already
ran load-tests by adding a guard: add a workflow_call input or use
github.event_name/context to detect being called from release_test.yml and then
conditionally skip the test-gate job (or remove the dependency) inside
dev_canary_release.yml; specifically, modify the dev-canary-release job
invocation or the test-gate job in dev_canary_release.yml (referencing job name
test-gate and step/basic_tests) to include an if condition (e.g., only run when
input.run_test_gate == 'true' or when github.event_name !=
'workflow_call_from_release_test') and pass that input from release_test.yml
when calling dev-canary-release.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/dev_canary_release.yml:
- Around line 47-57: The canary version computation (step "Compute canary
version" using variables BASE_VERSION, CLEAN_VERSION, CANARY_VERSION) is only
date-unique and will collide for same-day reruns; change the CANARY_VERSION
generation to append a finer-grained timestamp or unique run identifier (e.g.,
include hour/minute or use GITHUB_RUN_ID/GITHUB_RUN_NUMBER) instead of just date
-u +%Y%m%d, and update the CANARY_VERSION export/echo to use that new value so
each workflow run produces a unique PEP 440-compliant dev suffix.

---

Nitpick comments:
In @.github/workflows/release_test.yml:
- Around line 19-25: The dev-canary-release invocation causes both load-tests
and basic_tests to run (via the test-gate in dev_canary_release.yml), which can
be redundant; update the workflow to avoid running test-gate/basic_tests when
release_test.yml already ran load-tests by adding a guard: add a workflow_call
input or use github.event_name/context to detect being called from
release_test.yml and then conditionally skip the test-gate job (or remove the
dependency) inside dev_canary_release.yml; specifically, modify the
dev-canary-release job invocation or the test-gate job in dev_canary_release.yml
(referencing job name test-gate and step/basic_tests) to include an if condition
(e.g., only run when input.run_test_gate == 'true' or when github.event_name !=
'workflow_call_from_release_test') and pass that input from release_test.yml
when calling dev-canary-release.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c0e0edf4-0b1f-4e81-b569-d72bddf3f113

📥 Commits

Reviewing files that changed from the base of the PR and between f7ba5db and 14dabb0.

📒 Files selected for processing (2)
  • .github/workflows/dev_canary_release.yml
  • .github/workflows/release_test.yml

Comment on lines +47 to +57
- name: Compute canary version
id: version
run: |
BASE_VERSION="$(uv version --short)"
# Strip any existing .devN suffix to get the base
CLEAN_VERSION="${BASE_VERSION%%\.dev*}"
# PEP 440 dev release: 0.5.4.dev20260309
CANARY_VERSION="${CLEAN_VERSION}.dev$(date -u +%Y%m%d)"
echo "version=${CLEAN_VERSION}" >> "$GITHUB_OUTPUT"
echo "canary_version=${CANARY_VERSION}" >> "$GITHUB_OUTPUT"
echo "Canary version: ${CANARY_VERSION}"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Same-day reruns will produce identical canary versions.

The version computation uses date -u +%Y%m%d, meaning multiple workflow runs on the same UTC day produce the same version string. The second PyPI publish will fail because the version already exists.

Consider appending hour/minute or a run number for uniqueness, or document this as expected behavior where concurrency control prevents conflicts.

💡 Optional: Add time component for uniqueness
          # PEP 440 dev release: 0.5.4.dev20260309
-          CANARY_VERSION="${CLEAN_VERSION}.dev$(date -u +%Y%m%d)"
+          CANARY_VERSION="${CLEAN_VERSION}.dev$(date -u +%Y%m%d%H%M)"

Note: This changes the version format to include hour/minute (e.g., 0.5.4.dev202603090600), which is still PEP 440 compliant but may be less readable. Alternatively, rely on concurrency control and document that only one canary per day is published.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Compute canary version
id: version
run: |
BASE_VERSION="$(uv version --short)"
# Strip any existing .devN suffix to get the base
CLEAN_VERSION="${BASE_VERSION%%\.dev*}"
# PEP 440 dev release: 0.5.4.dev20260309
CANARY_VERSION="${CLEAN_VERSION}.dev$(date -u +%Y%m%d)"
echo "version=${CLEAN_VERSION}" >> "$GITHUB_OUTPUT"
echo "canary_version=${CANARY_VERSION}" >> "$GITHUB_OUTPUT"
echo "Canary version: ${CANARY_VERSION}"
- name: Compute canary version
id: version
run: |
BASE_VERSION="$(uv version --short)"
# Strip any existing .devN suffix to get the base
CLEAN_VERSION="${BASE_VERSION%%\.dev*}"
# PEP 440 dev release: 0.5.4.dev20260309
CANARY_VERSION="${CLEAN_VERSION}.dev$(date -u +%Y%m%d%H%M)"
echo "version=${CLEAN_VERSION}" >> "$GITHUB_OUTPUT"
echo "canary_version=${CANARY_VERSION}" >> "$GITHUB_OUTPUT"
echo "Canary version: ${CANARY_VERSION}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/dev_canary_release.yml around lines 47 - 57, The canary
version computation (step "Compute canary version" using variables BASE_VERSION,
CLEAN_VERSION, CANARY_VERSION) is only date-unique and will collide for same-day
reruns; change the CANARY_VERSION generation to append a finer-grained timestamp
or unique run identifier (e.g., include hour/minute or use
GITHUB_RUN_ID/GITHUB_RUN_NUMBER) instead of just date -u +%Y%m%d, and update the
CANARY_VERSION export/echo to use that new value so each workflow run produces a
unique PEP 440-compliant dev suffix.

@Vasilije1990 Vasilije1990 merged commit 542b2dc into dev Mar 11, 2026
139 of 142 checks passed
@Vasilije1990 Vasilije1990 deleted the ci/dev-canary-release branch March 11, 2026 19:47
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.

1 participant