Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update connector packaging to support Inline Binary definitions #182

Merged
merged 55 commits into from
Jan 24, 2025

Conversation

codingkarthik
Copy link
Collaborator

@codingkarthik codingkarthik commented Jan 22, 2025

Update connector packaging to support multi-platform CLI binaries

This PR updates our GitHub Actions workflow to support building and packaging CLI binaries for multiple platforms while following the latest connector packaging specification. The changes introduce a more robust approach to creating platform-specific CLI binaries and generating the corresponding metadata for the Hasura CLI plugin system.

Key Changes

Multi-Platform Binary Support

The build workflow now creates platform-specific binaries for:

  • Linux (x86_64 and ARM64)
  • macOS (x86_64 and ARM64)
  • Windows (x86_64)

Enhanced Build and Packaging Process

Each binary is properly named and packaged following Hasura's conventions, with SHA256 checksums generated for verification. The binaries are combined into a single tarball (cli.tar.gz) that gets attached to GitHub releases.

Updated CLI Initialization

The CLI initialization command has been enhanced to support the new binary CLI manifest format. This manifest contains platform-specific information including download URLs, SHA256 checksums, and binary paths. When initializing a new connector configuration, the CLI can now embed this manifest into the connector metadata, enabling the Hasura CLI to automatically download and use the correct binary for the user's platform.

Modernized Metadata Generation

The connector metadata generation has been updated to align with the latest specification from the packaging RFC. Notable changes include:

  • Added support for version field in metadata
  • Enhanced environment variable definitions to include required flag
  • Updated command definitions to support more flexible command types (string, dockerized, shell script)
  • Implemented the new BinaryInline CLI plugin definition format
  • Added support for native toolchain definitions and documentation links

Impact

These changes make our connector more portable across different platforms while maintaining security through checksum verification. The updated metadata format provides better integration with the Hasura ecosystem and improved user experience through platform-specific binary selection.

Testing

  • Verified binary builds for all supported platforms
  • Tested metadata generation with the new CLI manifest
  • Confirmed tarball creation and manifest combination
  • Validated GitHub release artifacts

Related

@codingkarthik codingkarthik changed the title add a test github workflow Update connector packaging to support multi-platform CLI binaries Jan 24, 2025
@codingkarthik codingkarthik changed the title Update connector packaging to support multi-platform CLI binaries Update connector packaging to support Inline Binary definitions Jan 24, 2025
Copy link
Member

@m-Bilal m-Bilal left a comment

Choose a reason for hiding this comment

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

rubberstamp

@codingkarthik codingkarthik added this pull request to the merge queue Jan 24, 2025
Merged via the queue into main with commit 95fffd5 Jan 24, 2025
19 checks passed
@codingkarthik codingkarthik deleted the kc/update-connector-packaging-definition branch January 24, 2025 08:54
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