Skip to content
This repository was archived by the owner on Apr 26, 2026. It is now read-only.

Add deprecation warning and cross-repo release mirror (replaces #740)#741

Merged
cicalese merged 1 commit intomainfrom
deprecation-warning-and-cross-repo-mirror
Apr 26, 2026
Merged

Add deprecation warning and cross-repo release mirror (replaces #740)#741
cicalese merged 1 commit intomainfrom
deprecation-warning-and-cross-repo-mirror

Conversation

@cicalese
Copy link
Copy Markdown
Contributor

@cicalese cicalese commented Apr 25, 2026

Summary

Replaces the bridge-binary approach in #740 (which would have bricked working installs on canasta upgrade) with: keep shipping the real Go CLI, add a deprecation warning, and mirror the release artifacts to a sister repo so legacy clients keep finding a working binary after the rename.

  • cmd/root/root.go — print a deprecation warning to stderr from PersistentPreRun on every canasta invocation. Suppressible via CANASTA_SUPPRESS_DEPRECATION_WARNING=1 for users who've intentionally pinned 3.x. The CLI continues to work normally; the warning just appears each command.
  • .github/workflows/release.yml — after the existing publish step, mint a cross-repo token via a CanastaWiki GitHub App and mirror the same artifacts to CanastaWiki/Canasta-CLI. Mirror step is gated on:
    • vars.RELEASE_BOT_APP_ID != '' — skipped on forks and pre-App-setup.
    • github.repository != 'CanastaWiki/Canasta-CLI' — skipped when this workflow is running from Canasta-CLI itself (post-rename self-mirror defense).

VERSION is intentionally not bumped in this PR.

Refs #739 (original bridge proposal — superseding). Blocks on #742 (org GitHub App setup) before the merge prerequisites can be satisfied.

DO NOT merge until

  1. PR Add Go-to-Ansible bridge program for v3.7.0 release #740 is closed without merging.
  2. This repo has been renamed (CanastaWiki/Canasta-CLICanastaWiki/Canasta-Go).
  3. CanastaWiki/Canasta-Ansible has been renamed to CanastaWiki/Canasta-CLI.
  4. A CanastaWiki GitHub App with Contents: Read and write has been installed on both Canasta-Go and Canasta-CLI, with vars.RELEASE_BOT_APP_ID and secrets.RELEASE_BOT_PRIVATE_KEY set at the org level.

The reason: if VERSION gets bumped while this PR is merged but the renames haven't happened, the regular publish step would land v3.7.0 in CanastaWiki/Canasta-CLI (the about-to-be-renamed repo), and the new Canasta-CLI repo would have zero releases for legacy clients to find.

After all four prerequisites are met, merge this PR (no release fires — VERSION unchanged), then bump VERSION to 3.7.0 in a follow-up commit. That bump triggers a v3.7.0 release in Canasta-Go (regular publish) and in Canasta-CLI (mirror step).

Test plan

  • go build ./... clean
  • go test ./... clean
  • go vet ./... clean
  • Local smoke test: canasta version writes the binary's version to stdout and the deprecation warning to stderr; CANASTA_SUPPRESS_DEPRECATION_WARNING=1 canasta version writes nothing to stderr.
  • YAML validates (yaml.safe_load(release.yml)).
  • Post-rename + post-App-setup: dry-run the workflow on a non-VERSION push to confirm the build matrix succeeds without firing the release / mirror steps (the existing if: needs.version.outputs.changed == 'true' gate stays in place).
  • Post-rename + post-VERSION-bump: confirm v3.7.0 release lands in both Canasta-Go and Canasta-CLI, and that https://api.github.com/repos/CanastaWiki/Canasta-CLI/releases/latest returns tag_name: v3.7.0 with the four binary assets attached.

… rename

Print a deprecation warning to stderr from PersistentPreRun on every
canasta invocation. The CLI continues to work normally; users see the
warning and the migration command on each command. Suppressible via
CANASTA_SUPPRESS_DEPRECATION_WARNING=1 for CI users who've intentionally
pinned 3.x.

Replaces the earlier bridge-binary plan (PR #740). The bridge approach
would have replaced the working binary with a stub that only prints a
message — bricking the user's wiki ops on the next 'canasta upgrade'.
The new approach keeps a working canasta and gives users time to
migrate.

In the release workflow, add a step after the existing publish that
mirrors the same release artifacts to CanastaWiki/Canasta-CLI. The
mirror is gated on:
  - vars.RELEASE_BOT_APP_ID being set (skipped for forks and
    pre-rename, when no GitHub App is configured), and
  - github.repository != 'CanastaWiki/Canasta-CLI' (skipped when
    the workflow is running from Canasta-CLI itself, to prevent a
    self-mirror after the rename).

After the rename (this repo becomes Canasta-Go and Canasta-Ansible
becomes the new Canasta-CLI), the GitHub App needs to be installed
on both repos and RELEASE_BOT_APP_ID / RELEASE_BOT_PRIVATE_KEY set
at the org level. Bumping VERSION in a follow-up commit then triggers
a v3.7.0 release that lands in both Canasta-Go and Canasta-CLI, so
legacy 3.x clients hitting api.github.com/repos/CanastaWiki/Canasta-CLI/
releases/latest find a working v3.7.0 binary with the deprecation
warning baked in.
cicalese added a commit that referenced this pull request Apr 26, 2026
End-of-life release of the Canasta-Go CLI: adds the deprecation warning
from #741, mirrors release artifacts to CanastaWiki/Canasta-CLI, no
other functional changes. release_date placeholder gets filled in
post-merge once the workflow tags the release.
@cicalese cicalese merged commit a04b5a2 into main Apr 26, 2026
2 checks passed
@cicalese cicalese deleted the deprecation-warning-and-cross-repo-mirror branch April 26, 2026 02:29
@jeffw16
Copy link
Copy Markdown
Member

jeffw16 commented Apr 26, 2026

LGTM

cicalese added a commit that referenced this pull request Apr 26, 2026
…ta-CLI) (#743)

* Bump VERSION to 3.7.0 (final Canasta-Go release)

Triggers the release workflow on merge:
  - Builds the four Go binaries (canasta-{linux,darwin}-{amd64,arm64})
    with the deprecation warning baked in (added in #741).
  - Regular publish step creates Canasta-Go/releases/v3.7.0.
  - Cross-repo mirror step (added in #741) creates the same release
    in CanastaWiki/Canasta-CLI using the GitHub App token, so legacy
    3.x clients hitting api.github.com/repos/CanastaWiki/Canasta-CLI/
    releases/latest find a working v3.7.0 binary.

Phase 6.b in CanastaWiki/Canasta-CLI#357 (master tracking issue
for the v4.0.0 release / rename arc).

DO NOT merge before #741 is merged. If this lands first, the workflow
will publish v3.7.0 to Canasta-Go but skip the mirror step (it doesn't
exist yet on main), leaving the new Canasta-CLI repo with no releases
and breaking legacy canasta upgrade.

* Add v3.7.0 entry to RELEASE_NOTES.md

End-of-life release of the Canasta-Go CLI: adds the deprecation warning
from #741, mirrors release artifacts to CanastaWiki/Canasta-CLI, no
other functional changes. release_date placeholder gets filled in
post-merge once the workflow tags the release.

* Set v3.7.0 release date to April 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants