Skip to content
This repository was archived by the owner on Nov 23, 2025. It is now read-only.

Dev#16

Merged
RandithaK merged 6 commits intomainfrom
dev
Nov 15, 2025
Merged

Dev#16
RandithaK merged 6 commits intomainfrom
dev

Conversation

@RandithaK
Copy link
Member

@RandithaK RandithaK commented Nov 15, 2025

Summary by CodeRabbit

  • Chores
    • Streamlined CI/CD pipeline with automated build, testing, and deployment workflows.
    • Improved request forwarding and AI service routing integration.

RandithaK and others added 6 commits November 12, 2025 19:16
fix: Update reverse proxy to preserve custom headers and adjust strip_prefix for AI service
- Update build.yaml with branch-aware image tagging (branch-sha format)
- Add update-manifest.yaml to update k8s-config manifests
- Backup old deploy.yaml (no longer needed with GitOps)

Refs:
- k8s-config/argocd/GITOPS_CI_CD_WORKFLOW.md
- k8s-config/argocd/SERVICE_MIGRATION_GUIDE.md
@RandithaK RandithaK merged commit 572a093 into main Nov 15, 2025
3 of 4 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Nov 15, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Introduces new GitHub Actions workflows for build validation and Kubernetes manifest synchronization, refactors existing build workflow to consolidate Docker image operations, preserves user context headers through the gateway reverse proxy, and adjusts service routing configuration to strip API prefix on outbound requests.

Changes

Cohort / File(s) Change Summary
GitHub Actions Workflows
.github/workflows/build-test.yaml, .github/workflows/build.yaml, .github/workflows/update-manifest.yaml
Adds build-test workflow for PR validation; consolidates build workflow into single Docker build-push job on main branch push; introduces update-manifest workflow triggered on build completion to update K8s Deployment image tags via yq
Gateway Logic
cmd/gateway/main.go
Captures X-User-Subject and X-User-Roles headers before proxy Director call and re-applies them to outgoing request to preserve user context
Service Configuration
config.yaml
Updates AI service routing to strip "/api/v1/ai" prefix when forwarding requests to Agent Bot backend

Sequence Diagram(s)

sequenceDiagram
    Build Workflow->>Update Manifest Workflow: workflow_run trigger<br/>(branch, SHA)
    Update Manifest Workflow->>GitHub: Retrieve context<br/>(branch, short SHA)
    Update Manifest Workflow->>k8s-config Repo: Checkout on branch
    Update Manifest Workflow->>k8s-config Repo: Install yq
    rect rgba(100, 200, 100, 0.2)
        note over Update Manifest Workflow: Update image tag
        Update Manifest Workflow->>k8s-config Repo: yq update Deployment image<br/>ghcr.io/techtorque-2025/${SERVICE}:${branch}-${sha}
    end
    rect rgba(100, 150, 200, 0.2)
        note over Update Manifest Workflow: Conditional commit
        alt git diff has changes
            Update Manifest Workflow->>k8s-config Repo: Commit & push
        else no changes
            Update Manifest Workflow->>Update Manifest Workflow: Skip commit
        end
    end
    Update Manifest Workflow->>GitHub: Output summary<br/>(branch, image tag, path)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Workflow trigger conditions: Verify build-test PR triggers and update-manifest workflow_run event configuration (branch filters, success condition)
  • Gateway header preservation logic: Confirm X-User-Subject and X-User-Roles are correctly extracted before Director call and reapplied to maintain user context
  • Manifest update idempotence: Ensure yq image tag construction and conditional git diff logic prevent unintended re-deployments
  • Environment variable expansion: Validate SERVICE_NAME, DEPLOYMENT_FILE references across workflows

Possibly related PRs

Poem

🐰 Hops excitedly

Build, test, and push in perfect flow,
User headers through proxies go,
Manifests dance on Kubernetes stage,
Docker tags on the deployment page,
ArgoCD syncs the automated way,
CI/CD magic brightens the day! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 62119b6 and fc7e7a5.

📒 Files selected for processing (5)
  • .github/workflows/build-test.yaml (1 hunks)
  • .github/workflows/build.yaml (2 hunks)
  • .github/workflows/update-manifest.yaml (1 hunks)
  • cmd/gateway/main.go (2 hunks)
  • config.yaml (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant