GoogleCloudPlatform / GoogleCloudPlatform/scion

feat: include broker plugin builds in hub deploy pipeline

Open Beginner friendly
#476 0 comments 0 reactions 0 assignees View on GitHub
area:distribution type:chore
Dominant language
Go
Stars
1.7k
Forks
263
Avg merge
7h 6m
Merged PRs (30d)
447

Description

## Problem

The hub deploy script (`scripts/starter-hub/gce-start-hub.sh`) builds and installs the main `scion` binary but does not build or install any broker plugin binaries (e.g., `scion-plugin-telegram`, `scion-plugin-discord`). These plugins live under `extras/scion-*/` with their own `go.mod` and must be built separately.

This means:
- Every deploy can silently remove a working plugin if the host was reprovisioned
- Setting up a new plugin requires manual SSH access to build from source and install to `$PATH`
- There's no automated way to keep plugin binaries in sync with the hub binary across updates
- Plugin version skew (old plugin binary vs new hub binary) can cause RPC/interface mismatches

## Current Behavior

```bash
# gce-start-hub.sh only builds the main binary:
go build -o scion ./cmd/scion
sudo mv scion /usr/local/bin/scion
# No plugin builds at all
```

## Proposed Solution

Add a plugin build step after the main binary build:

```bash
# Build broker plugin binaries
for plugin_src in extras/scion-telegram extras/scion-discord; do
plugin_name="scion-plugin-$(basename "$plugin_src" | sed 's/^scion-//')"
if [ -d "${plugin_src}/cmd/${plugin_name}" ]; then
go build -o "${plugin_name}" "./cmd/${plugin_name}/"
fi
done

# Install alongside the main binary
for plugin_bin in scion-plugin-*; do
sudo install -m 755 "$plugin_bin" /usr/local/bin/
done
```

A patch has been prepared in the working tree that implements this.

## Additional Context

This was discovered while debugging a broken Telegram integration on the aiopm hub. The plugin binary was never in the deploy pipeline, so it disappeared after infrastructure updates. Combined with #475 (settings.yaml overwrite), this made the entire Telegram integration silently non-functional with no errors in the hub logs — the plugin simply wasn't loaded because the binary didn't exist.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with scripts/starter-hub/gce-start-hub.sh and inspect the build layouts under extras/scion-telegram and extras/scion-discord, including their go.mod files and cmd directories. Verify that deployment builds the available plugin binaries and installs them alongside scion in /usr/local/bin without breaking the existing hub build.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, shell
Domain
devops, infrastructure
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.