Skip to content

feat(extension): support multi-extension GitHub release repos#593

Open
jkirsteins wants to merge 13 commits into
DataDog:mainfrom
jkirsteins:janis.kirsteins/multi-extension-repo
Open

feat(extension): support multi-extension GitHub release repos#593
jkirsteins wants to merge 13 commits into
DataDog:mainfrom
jkirsteins:janis.kirsteins/multi-extension-repo

Conversation

@jkirsteins

Copy link
Copy Markdown
Contributor

Summary

Add support for installing and listing multiple pup-* extensions from a single GitHub release repository.

This lets a release archive contain executables such as pup-foo and pup-bar, then allows users to install one extension, install all discovered extensions, or list remote versions before installing.

Changes

  • Add pup extension list-remote owner/repo
  • Add pup extension install owner/repo --extension <name>
  • Add pup extension install owner/repo --all
  • Support exact release tags with --tag
  • Infer extension names from platform release archives
  • Preserve archive source metadata in installed extension manifests
  • Support upgrades for archive-sourced extensions
  • Add bounded archive scanning and download limits
  • Verify checksums when checksums.txt is present
  • Use staged extension writes with rollback for local, single-binary GitHub, and archive GitHub installs
  • Avoid invoking gh on the hot path for public GitHub requests; use it only after private/inaccessible repo failures

Trying It

Build locally:

cargo build

List remote extensions from a repository:

target/debug/pup -o table extension list-remote owner/repo

List versions for one extension:

target/debug/pup -o table extension list-remote owner/repo --extension foo

Install the latest stable release containing one extension:

target/debug/pup extension install owner/repo --extension foo

Install a specific release tag:

target/debug/pup extension install owner/repo --extension foo --tag v1.2.3

Install every discovered extension from the selected archive:

target/debug/pup extension install owner/repo --all

Force reinstall or upgrade an existing extension:

target/debug/pup extension install owner/repo --extension foo --force
target/debug/pup extension upgrade foo

For private repositories, either provide a token:

GH_TOKEN=<token> target/debug/pup extension list-remote owner/repo

or authenticate with GitHub CLI:

gh auth login --hostname github.com --scopes repo
target/debug/pup extension list-remote owner/repo

Testing

  • cargo fmt --check
  • cargo clippy -- -D warnings
  • cargo test -- --test-threads=1

Notes

Remote listing currently infers extension names by inspecting bounded platform release archives. A future improvement could add a small release manifest/index asset to avoid downloading archives for metadata-only listing.

@platinummonkey

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea0b8ec811

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Cargo.toml
Comment on lines +41 to +43
"dep:flate2",
"dep:tar",
"dep:zip",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Enable archive dependencies for WASI builds

The WASI CI/release job builds the CLI with cargo build --target wasm32-wasip2 --no-default-features --features wasi (.github/workflows/ci.yml:207), but these new archive crates are only enabled by the native feature while src/extensions/install.rs now references flate2, tar, and zip unconditionally. That leaves the WASI build without those optional dependencies and the binary will fail to compile; add them to the wasi feature or cfg-gate the archive install code out of that target.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verified the WASI build locally with:

cargo check --target wasm32-wasip2 --no-default-features --features wasi

It passes because extensions are cfg-gated and not compiled for the WASI target.

Added a line in README.md under WASM limitations.

@jkirsteins jkirsteins marked this pull request as ready for review June 18, 2026 17:06
@jkirsteins jkirsteins requested a review from a team as a code owner June 18, 2026 17:06
@datadog-datadog-prod-us1-2

This comment has been minimized.

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