Skip to content

Commit 5b6e87e

Browse files
committed
fix helm install
1 parent 6dc66d5 commit 5b6e87e

File tree

3 files changed

+42
-15
lines changed

3 files changed

+42
-15
lines changed

.github/workflows/mlflow-ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,16 @@ jobs:
252252
253253
# Set up environment for the make target
254254
export KUBECONFIG="$KUBECONFIG_FILE"
255-
export REPLICATED_APP="${REPLICATED_APP}"
256-
export REPLICATED_CHANNEL="${REPLICATED_CHANNEL}"
257-
export REPLICATED_LICENSE_ID="${REPLICATED_LICENSE_ID}"
255+
export REPLICATED_APP="${{ env.APP_SLUG }}"
256+
export REPLICATED_CHANNEL="${{ needs.create-release.outputs.channel-slug }}"
257+
export REPLICATED_LICENSE_ID="${{ steps.get-license.outputs.license_id }}"
258+
259+
# Construct OCI URL manually for verification and as a fallback
260+
export OCI_URL="oci://registry.replicated.com/$REPLICATED_APP/$REPLICATED_CHANNEL"
261+
echo "Constructed OCI URL: $OCI_URL"
258262
259263
# Use test-specific values file
260264
export MLFLOW_VALUES="${{ matrix.config.values_file }}"
261-
262265
echo "Running test '${{ matrix.config.name }}' with MLflow values file: $MLFLOW_VALUES"
263266
264267
# Run direct Helm installation

applications/mlflow/Makefile

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,28 @@ registry-login:
116116
.PHONY: test-replicated-helm-with-values
117117
test-replicated-helm-with-values: registry-login
118118
echo "Running Helm installation test with custom values..."; \
119-
echo "Note: This requires REPLICATED_APP and REPLICATED_CHANNEL env vars."; \
120-
if [ -z "$$REPLICATED_APP" ] || [ -z "$$REPLICATED_CHANNEL" ]; then \
121-
echo "ERROR: REPLICATED_APP and REPLICATED_CHANNEL must be set"; \
119+
\
120+
# Determine OCI URL - prefer direct OCI_URL if provided, otherwise construct from app/channel
121+
if [ -n "$$OCI_URL" ]; then \
122+
echo "Using provided OCI URL: $$OCI_URL"; \
123+
else \
124+
echo "No direct OCI_URL provided. Constructing from REPLICATED_APP and REPLICATED_CHANNEL"; \
125+
echo "Note: This requires REPLICATED_APP and REPLICATED_CHANNEL env vars."; \
126+
if [ -z "$$REPLICATED_APP" ] || [ -z "$$REPLICATED_CHANNEL" ]; then \
127+
echo "ERROR: REPLICATED_APP and REPLICATED_CHANNEL must be set"; \
128+
exit 1; \
129+
fi; \
130+
OCI_URL="oci://registry.replicated.com/$$REPLICATED_APP/$$REPLICATED_CHANNEL"; \
131+
echo "Constructed OCI URL: $$OCI_URL"; \
132+
fi; \
133+
\
134+
# Validate OCI_URL is set and not empty
135+
if [ -z "$$OCI_URL" ]; then \
136+
echo "ERROR: OCI_URL is empty. Check that REPLICATED_APP and REPLICATED_CHANNEL are correctly set and not being overridden."; \
137+
echo "REPLICATED_APP=$$REPLICATED_APP"; \
138+
echo "REPLICATED_CHANNEL=$$REPLICATED_CHANNEL"; \
122139
exit 1; \
123140
fi; \
124-
OCI_URL="oci://registry.replicated.com/$$REPLICATED_APP/$$REPLICATED_CHANNEL"; \
125141
\
126142
# Prepare values arguments if provided
127143
MLFLOW_VALUES_ARGS=""; \
@@ -135,21 +151,26 @@ test-replicated-helm-with-values: registry-login
135151
\
136152
# Install infra chart from Replicated registry
137153
echo "Installing infra chart from Replicated registry..."; \
154+
echo "Chart path: $$OCI_URL/infra"; \
138155
helm upgrade --install infra-values-test $$OCI_URL/infra \
139156
--namespace values-test \
140-
--wait --timeout 5m --debug; \
157+
--wait --timeout 5m --debug || { \
158+
echo "ERROR: Failed to install infra chart from $$OCI_URL/infra"; \
159+
echo "Please check that registry login was successful and the chart exists in the registry."; \
160+
exit 1; \
161+
}; \
141162
\
142163
# Install MLflow chart from Replicated registry with custom values
143164
echo "Installing mlflow chart from Replicated registry with custom values..."; \
165+
echo "Chart path: $$OCI_URL/mlflow"; \
144166
helm upgrade --install mlflow-values-test $$OCI_URL/mlflow \
145167
--namespace values-test \
146168
$$MLFLOW_VALUES_ARGS \
147-
--wait --timeout 5m --debug; \
148-
\
149-
# Test the installation
150-
echo "Verifying installation..."; \
151-
kubectl get pods -n values-test; \
152-
\
169+
--wait --timeout 5m --debug || { \
170+
echo "ERROR: Failed to install mlflow chart from $$OCI_URL/mlflow"; \
171+
echo "Please check that registry login was successful and the chart exists in the registry."; \
172+
exit 1; \
173+
}; \
153174
echo "Helm installation with custom values completed successfully."
154175

155176
# Example target to check versions (optional)

applications/mlflow/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ For testing with charts from the Replicated registry, set:
3838
- `REPLICATED_CHANNEL` - The channel slug
3939
- `REPLICATED_LICENSE_ID` - Your Replicated license ID (required for registry authentication)
4040

41+
Alternatively, you can directly specify the OCI URL:
42+
- `OCI_URL` - Direct OCI URL for the charts (e.g., "oci://registry.replicated.com/your-app/your-channel")
43+
4144
For the `test-replicated-helm-with-values` target, you can also set:
4245
- `MLFLOW_VALUES` - Path to a custom values file for MLflow
4346

0 commit comments

Comments
 (0)