GitHub Actions Debugging — Skill Instructions¶
Workflow Inventory¶
Workflow |
Trigger |
Purpose |
|---|---|---|
|
Push to |
Build + push prerelease Docker images |
|
Push to |
Build + push release Docker images |
|
Push to |
Release Helm charts + integration test + security scan |
|
PR to |
Full BDD test suite on Kind cluster |
|
Manual |
Local testing helper |
|
PR to |
Python formatting with Black |
|
PR to |
Ensure no prerelease suffixes in release |
Auto-Generated Docker Workflows¶
CRITICAL: The 30 Docker build workflows are AUTO-GENERATED. Do not edit them directly.
Config:
automation/generators/dockerbuild-workflow-generator/dockerbuild-config.yamlGenerator:
automation/generators/dockerbuild-workflow-generator/dockerbuild_workflow_generator.py(uses Jinja2)To modify: Edit the config YAML or Jinja2 templates, then regenerate
Docker Build Pipeline Steps¶
Read image name/version from
charts/canvas-oda/values.yamlusingyqValidate version format:
Prerelease:
<n>.<n>.<n>-<suffix>(e.g.,1.2.5-LT5)Release:
<n>.<n>.<n>(e.g.,1.2.5)
Check release image doesn’t already exist (prevents overwriting)
Build multi-arch:
linux/amd64,linux/arm64Inject build args:
SOURCE_DATE_EPOCH,GIT_COMMIT_SHA,CICD_BUILD_TIMEPush to Docker Hub with
latestand version tags
PR Test Pipeline (trigger_tests.yml)¶
Skip Mechanisms¶
[skip tests]in PR title or commit messageIf only
values.yamlchanged with empty prereleaseSuffix removals
Pipeline Steps (334 lines)¶
Kind cluster (Kubernetes v1.30.0) + cloud-provider-kind
Istio install (pinned versions)
Helm dependency update on all sub-charts
Install Canvas from local source:
helm install canvas charts/canvas-odaPort-forward Keycloak (8083) and Resource Inventory (8639)
Install test components in
componentsandodacompns-1namespacesRun BDD tests:
cd feature-definition-and-test-kit && npm startUpload artifacts: operator logs, test results, cucumber.json
Generate badges: Parse cucumber JSON for pass/fail/skip counts
Common Failure Points¶
Symptom |
Likely Cause |
Debug Command |
|---|---|---|
Pod not ready |
Image pull failure |
|
CRD not found |
Helm dependency not updated |
|
Test timeout |
Operator crash loop |
|
Port-forward fail |
Service not yet ready |
|
Istio errors |
Version mismatch |
Check Istio install step version pins |
Chart Release Pipeline¶
Trigger: Push to main
helm dependency updateon all chartshelm/chart-releaser-action— package and publish to GitHub PagesVerify charts available in Helm repo
Integration test on Kind cluster:
Install from published charts:
helm install canvas oda-canvas/canvas-oda --develInstall test component
Verify component status reaches
Complete
Trivy security scan on deployed images
Upload scan results as artifacts
Python Linting (lint-python-code.yml)¶
Uses psf/black formatter on:
automation/generators/dockerbuild-workflow-generator/source/operators/component-management/source/operators/api-management/istio/source/operators/dependentApiSimpleOperator/source/operators/secretsmanagementOperator-hc/
Debugging Commands¶
Cluster State¶
kubectl get all -n canvas
kubectl get all -n components
kubectl get components -n components
kubectl get exposedapis -n components
kubectl get dependentapis -n components
Operator Logs¶
kubectl -n canvas logs deployment/component-operator
kubectl -n canvas logs deployment/api-operator-istio
kubectl -n canvas logs deployment/identity-operator-keycloak
Helm State¶
helm list --all-namespaces
helm status canvas -n canvas
helm get values canvas -n canvas
Component Debugging¶
kubectl describe component <name> -n components
kubectl get events -n components --sort-by=.lastTimestamp
kubectl get component <name> -n components -o yaml
Local Testing¶
Using Act (GitHub Actions Locally)¶
# Run with act
scripts/run-with-act.sh
# Or directly
cd feature-definition-and-test-kit
npm install
npm start
Local Operator Development¶
kopf run --namespace=components --standalone source/operators/<path>/<operator>.py
Version Management in CI¶
File |
Field |
Prerelease |
Release |
|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
The prerelease check workflow (check-no-prerelease-suffixes-in-PR.yml) ensures no prerelease suffixes remain when merging to main.
Artifact Uploads¶
CI uploads these artifacts for post-mortem analysis:
Component operator logs:
component-operator-logsAPI operator logs:
api-operator-istio-logsTest results:
test-resultsCucumber JSON:
cucumber-report(machine-readable test results)Trivy scan:
trivy-results(security findings)
Do¶
Edit Docker workflow config YAML, not generated workflow files
Use
[skip tests]in commit messages for documentation-only changesCheck operator logs first when BDD tests fail
Run
helm dependency updateafter modifying sub-chart versionsUse Kind cluster for local integration testing
Don’t¶
Don’t edit
dockerbuild-*.ymlfiles directly — they’re auto-generatedDon’t push prerelease suffixes to main branch
Don’t skip the prerelease suffix check workflow
Don’t ignore Trivy security findings in release pipeline
Don’t hard-code Kubernetes or Istio versions — use the pinned versions from workflows