Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
*.md.gotmpl @redhat-developer/RHDH-content
/README.md @redhat-developer/RHDH-content

# Lightspeed:
# Intelligent Assistant:
/charts/backstage/files/lightspeed/ @redhat-developer/rhdh-ai
/charts/rhdh/files/lightspeed/ @redhat-developer/rhdh-ai
/charts/rhdh/files/intelligent-assistant/ @redhat-developer/rhdh-ai
8 changes: 4 additions & 4 deletions .github/actions/test-charts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,16 +254,16 @@ runs:
# --namespace ct-charts \
# --from-literal=.npmrc=$'@myscope:registry=https://my-registry.example.com\n//my-registry.example.com:_authToken=foo'

# Lightspeed existing-resource test (with-lightspeed-existing-config-values.yaml)
# Intelligent Assistant existing-resource test (with-custom-configuration-values.yaml)
kubectl create configmap test-lightspeed-stack \
--namespace ct-charts \
--from-file=lightspeed-stack.yaml=charts/rhdh/files/lightspeed/lightspeed-stack.yaml
--from-file=lightspeed-stack.yaml=charts/rhdh/files/intelligent-assistant/lightspeed-stack.yaml
kubectl create configmap test-lightspeed-server \
--namespace ct-charts \
--from-file=config.yaml=charts/rhdh/files/lightspeed/config.yaml
--from-file=config.yaml=charts/rhdh/files/intelligent-assistant/config.yaml
kubectl create configmap test-lightspeed-profile \
--namespace ct-charts \
--from-file=rhdh-profile.py=charts/rhdh/files/lightspeed/rhdh-profile.py
--from-file=rhdh-profile.py=charts/rhdh/files/intelligent-assistant/rhdh-profile.py
kubectl create secret generic test-lightspeed-secret \
--namespace ct-charts \
--from-literal=LLAMA_STACK_LOGGING=info
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
- name: Generate nightly values override for rhdh chart
if: steps.check.outputs.exists == 'true' && matrix.chart == 'rhdh'
run: |
yq e '{"dynamicPlugins": {"includes": .dynamicPlugins.includes}, "lightspeed": {"plugins": .lightspeed.plugins}, "orchestrator": {"plugins": .orchestrator.plugins}}' \
yq e '{"dynamicPlugins": {"includes": .dynamicPlugins.includes}, "intelligentAssistant": {"plugins": .intelligentAssistant.plugins}, "orchestrator": {"plugins": .orchestrator.plugins}}' \
charts/rhdh/values.yaml > /tmp/rhdh-nightly-values.yaml

- name: Test charts
Expand Down
42 changes: 30 additions & 12 deletions .github/workflows/sync-lightspeed-configs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Sync Lightspeed Configs
name: Sync Lightspeed Core Configs

on:
schedule:
Expand All @@ -7,7 +7,7 @@ on:

jobs:
sync-lightspeed:
name: Sync Lightspeed Configs (${{ matrix.branch }})
name: Sync Lightspeed Core Configs (${{ matrix.branch }})
runs-on: ubuntu-latest

strategy:
Expand All @@ -31,6 +31,24 @@ jobs:
ref: ${{ matrix.branch }}
fetch-depth: 0

- name: Resolve vendored config paths
id: paths
run: |
# Scheduled workflows run from the default branch YAML, then check out
# matrix.branch. Only release-1.10 still vendors Lightspeed under the
# backstage chart; main and later release branches use rhdh.
BRANCH="${{ matrix.branch }}"
if [[ "${BRANCH}" == "release-1.10" ]]; then
FILES_DIR="charts/backstage/files/lightspeed"
CHART_YAML="charts/backstage/Chart.yaml"
else
FILES_DIR="charts/rhdh/files/intelligent-assistant"
CHART_YAML="charts/rhdh/Chart.yaml"
fi
echo "files_dir=${FILES_DIR}" >> "$GITHUB_OUTPUT"
echo "chart_yaml=${CHART_YAML}" >> "$GITHUB_OUTPUT"
echo "Using ${FILES_DIR} and ${CHART_YAML} for ${BRANCH}"

- name: Set up Helm
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
with:
Expand Down Expand Up @@ -59,13 +77,13 @@ jobs:
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Sync Lightspeed config files
- name: Sync Lightspeed Core config files
run: ./hack/sync-lightspeed-configs.sh --ref ${{ matrix.branch }}

- name: Check for changes
id: changes
run: |
if git diff --quiet charts/backstage/files/lightspeed/; then
if git diff --quiet "${{ steps.paths.outputs.files_dir }}"; then
echo "No changes from upstream."
echo "has_changes=false" >> "$GITHUB_OUTPUT"
else
Expand All @@ -78,7 +96,7 @@ jobs:
id: get_version
uses: mikefarah/yq@c14f446382944492701b16c1ddb48bb9dbe683e3 # v4.53.6
with:
cmd: yq '.version' charts/backstage/Chart.yaml
cmd: yq '.version' "${{ steps.paths.outputs.chart_yaml }}"

- name: Compute next patch version
if: steps.changes.outputs.has_changes == 'true'
Expand All @@ -92,7 +110,7 @@ jobs:
if: steps.changes.outputs.has_changes == 'true'
uses: mikefarah/yq@c14f446382944492701b16c1ddb48bb9dbe683e3 # v4.53.6
with:
cmd: yq -i '.version = "${{ steps.semver.outputs.new_version }}"' charts/backstage/Chart.yaml
cmd: yq -i '.version = "${{ steps.semver.outputs.new_version }}"' "${{ steps.paths.outputs.chart_yaml }}"

- name: Run pre-commit
if: steps.changes.outputs.has_changes == 'true'
Expand All @@ -105,8 +123,9 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEW_VERSION: ${{ steps.semver.outputs.new_version }}
TARGET_BRANCH: ${{ matrix.branch }}
FILES_DIR: ${{ steps.paths.outputs.files_dir }}
run: |
TITLE="chore(lightspeed): sync config files and bump chart to ${NEW_VERSION}"
TITLE="chore(intelligent-assistant): sync Lightspeed Core config files and bump chart to ${NEW_VERSION}"
BRANCH="chore/sync-lightspeed-configs-${TARGET_BRANCH}"

EXISTING_PR=$(gh pr list --head "${BRANCH}" --base "${TARGET_BRANCH}" --state open --json number --jq '.[0].number // empty')
Expand All @@ -126,16 +145,15 @@ jobs:
else
git push origin "${BRANCH}"

SYNCED_FILES=$(git diff --name-only HEAD~1 -- "${FILES_DIR}" | sed 's/^/- `/;s/$/`/')

BODY=$(cat <<EOF
Automated nightly sync of Lightspeed config files from [redhat-ai-dev/lightspeed-configs @ ${TARGET_BRANCH}](https://github.com/redhat-ai-dev/lightspeed-configs/tree/${TARGET_BRANCH}).
Automated nightly sync of Lightspeed Core config files from [redhat-ai-dev/lightspeed-configs @ ${TARGET_BRANCH}](https://github.com/redhat-ai-dev/lightspeed-configs/tree/${TARGET_BRANCH}).

Bumped chart version to **${NEW_VERSION}**.

### Synced files
- \`charts/backstage/files/lightspeed/lightspeed-stack.yaml\`
- \`charts/backstage/files/lightspeed/config.yaml\`
- \`charts/backstage/files/lightspeed/rhdh-profile.py\`
- \`charts/backstage/files/lightspeed/secret.yaml\`
${SYNCED_FILES}

> [!CAUTION]
> Please review the upstream changes carefully before merging.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Generate full-plugins values for template sanity check
if: matrix.chart == 'rhdh'
run: |
yq e '{"dynamicPlugins": {"includes": .dynamicPlugins.includes}, "lightspeed": {"plugins": .lightspeed.plugins}, "orchestrator": {"plugins": .orchestrator.plugins}}' \
yq e '{"dynamicPlugins": {"includes": .dynamicPlugins.includes}, "intelligentAssistant": {"plugins": .intelligentAssistant.plugins}, "orchestrator": {"plugins": .orchestrator.plugins}}' \
charts/rhdh/values.yaml > /tmp/rhdh-full-plugins-values.yaml

- name: Test charts
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Before making a contribution to the charts in this repository, you will need to
- JSON Schema template updated and re-generated the raw schema via the `pre-commit` hook.
- [ ] If you updated the [orchestrator-infra](./charts/orchestrator-infra) chart, make sure the versions of the [Knative CRDs](./charts/orchestrator-infra/crds) are aligned with the versions of the CRDs installed by the OpenShift Serverless operators declared in the [values.yaml](./charts/orchestrator-infra/values.yaml) file. See [Installing Knative Eventing and Knative Serving CRDs](./charts/orchestrator-infra/README.md#installing-knative-eventing-and-knative-serving-crds) for more details.

## Sync Lightspeed vendored config files
## Sync Lightspeed Core vendored config files

The Lightspeed config files under [`charts/rhdh/files/lightspeed`](./charts/rhdh/files/lightspeed) are synced from the upstream [redhat-ai-dev/lightspeed-configs](https://github.com/redhat-ai-dev/lightspeed-configs) repository by [`hack/sync-lightspeed-configs.sh`](./hack/sync-lightspeed-configs.sh).
The Lightspeed Core config files under [`charts/rhdh/files/intelligent-assistant`](./charts/rhdh/files/intelligent-assistant) are synced from the upstream [redhat-ai-dev/lightspeed-configs](https://github.com/redhat-ai-dev/lightspeed-configs) repository by [`hack/sync-lightspeed-configs.sh`](./hack/sync-lightspeed-configs.sh).

Use the default upstream branch:

Expand All @@ -34,5 +34,5 @@ Verify the vendored files are already in sync without writing changes:
./hack/sync-lightspeed-configs.sh --ref main --check
```

The script copies the upstream config files directly, except it appends the chart-managed `mcp_servers` block to `lightspeed-stack.yaml` and renders `secret.yaml` from upstream `env/default-values.env` by dropping comment lines plus `LIGHTSPEED_CORE_IMAGE` and `RAG_CONTENT_IMAGE`, then converting each remaining `KEY=value` line into the chart's YAML secret payload.
Choose the upstream branch or tag that matches the Lightspeed release you want to vendor.
The script copies the upstream `lightspeed-stack.yaml`, `config.yaml`, and `rhdh-profile.py` files into [`charts/rhdh/files/intelligent-assistant`](./charts/rhdh/files/intelligent-assistant). The RHDH chart does not vendor a Lightspeed Core `secret.yaml`; supply provider credentials with `intelligentAssistant.existingSecret`.
Choose the upstream branch or tag that matches the Lightspeed Core release you want to vendor.
2 changes: 1 addition & 1 deletion charts/rhdh/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: redhat-developer-hub
type: application
version: 1.0.2
version: 2.0.0
appVersion: 2.1.0
annotations:
artifacthub.io/category: integration-delivery
Expand Down
Loading
Loading