Skip to content

Conversation

@alauda-github-idpbot
Copy link

@alauda-github-idpbot alauda-github-idpbot commented Nov 11, 2025

auto update doc build config for doc pipeline

Summary by CodeRabbit

  • Chores
    • Configured build pipeline infrastructure to support automated documentation builds and pull request validation across multiple documentation targets and language variants.

@coderabbitai
Copy link

coderabbitai bot commented Nov 11, 2025

Walkthrough

Two Kubernetes Build manifest files are added to define documentation building pipelines. .builds/doc-build.yaml configures a production build with nine tasks for different documentation variants, while .builds/doc-pr-build.yaml configures a PR validation build with a single task.

Changes

Cohort / File(s) Summary
Documentation Build Manifests
\.builds/doc-build.yaml, \.builds/doc-pr-build.yaml
New Kubernetes Build resource definitions for documentation pipelines with shared workspace configurations, resource allocations (CPU 2-4, memory 4-8Gi), and cluster template references. Production build includes nine tasks for multiple doc variants; PR build includes a single task.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify YAML syntax and proper Kubernetes Build resource structure
  • Confirm resource requests/limits are appropriate for build tasks
  • Validate workspace and PVC configurations align with infrastructure setup
  • Cross-check task names and pipeline parameter values match intended documentation pipeline

Poem

🐰 Hopping through builds, left and right,
Docs flow in prod and PR light,
Kubernetes tasks in formation stay,
Nine flavors for doc-build's way,
Config by config, manifests bloom! 📜✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Auto-update doc build config' accurately reflects the main changes in the PR, which add/update Kubernetes Build manifests for documentation pipeline builds.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/auto-update-doc-build-main

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.builds/doc-pr-build.yaml (1)

1-41: Consider extracting shared workspace configuration to reduce cross-file duplication.

Both .builds/doc-build.yaml and .builds/doc-pr-build.yaml define identical workspace configurations (lines 8-21). This duplication creates maintenance burden if workspace specs need updates.

If the project uses Kustomize or another templating mechanism, consider extracting the shared workspace spec to a common overlay or base configuration.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a3f6a56 and 04e8a5d.

📒 Files selected for processing (2)
  • .builds/doc-build.yaml (1 hunks)
  • .builds/doc-pr-build.yaml (1 hunks)
🔇 Additional comments (2)
.builds/doc-pr-build.yaml (1)

34-41: Manual verification of Katanomi template configuration required.

No public documentation exists for the Katanomi "ClusterTemplate resolver" configuration. Verification of whether the product-docs-pr-pipeline template is deployed and correctly configured requires:

  • Direct inspection of the cluster resources
  • Confirmation that the template exists at the specified resolver path
  • Validation that the doc-base parameter value aligns with your documentation build requirements
.builds/doc-build.yaml (1)

114-121: No issues found; template references are properly configured.

The code correctly uses the katanomi.dev.clustertemplate resolver pattern. Both .builds/doc-build.yaml and .builds/doc-pr-build.yaml use distinct templates (product-docs-build and product-docs-pr-pipeline respectively) for their intended purposes (production and PR builds), both accepting the doc-base parameter consistently. The resolver configuration is syntactically valid and follows the Tekton/Katanomi ClusterTemplate pattern. Template deployment and cluster-level RBAC are infrastructure concerns outside the scope of repository code review.

Comment on lines +23 to +112
- pipelineTaskName: build-online-docs-io
stepOverrides:
- name: build
resources:
requests:
cpu: 2
memory: 4Gi
limits:
cpu: 4
memory: 8Gi
- pipelineTaskName: build-online-docs-cn
stepOverrides:
- name: build
resources:
requests:
cpu: 2
memory: 4Gi
limits:
cpu: 4
memory: 8Gi
- pipelineTaskName: build-offline-docs
stepOverrides:
- name: build
resources:
requests:
cpu: 2
memory: 4Gi
limits:
cpu: 4
memory: 8Gi
- pipelineTaskName: build-exports-docs
stepOverrides:
- name: build
resources:
requests:
cpu: 2
memory: 4Gi
limits:
cpu: 4
memory: 8Gi
- pipelineTaskName: export-docs
stepOverrides:
- name: export
resources:
requests:
cpu: 2
memory: 4Gi
limits:
cpu: 4
memory: 8Gi
- pipelineTaskName: build-online-docs-russian
stepOverrides:
- name: build
resources:
requests:
cpu: 2
memory: 4Gi
limits:
cpu: 4
memory: 8Gi
- pipelineTaskName: build-offline-docs-russian
stepOverrides:
- name: build
resources:
requests:
cpu: 2
memory: 4Gi
limits:
cpu: 4
memory: 8Gi
- pipelineTaskName: build-exports-docs-russian
stepOverrides:
- name: build
resources:
requests:
cpu: 2
memory: 4Gi
limits:
cpu: 4
memory: 8Gi
- pipelineTaskName: export-docs-russian
stepOverrides:
- name: export
resources:
requests:
cpu: 2
memory: 4Gi
limits:
cpu: 4
memory: 8Gi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Significant code duplication in taskRunSpecs—consolidate with YAML anchors or templating.

The 9 taskRunSpecs entries (lines 23-112) are nearly identical, with only pipelineTaskName and step names varying. This duplication makes maintenance difficult and error-prone. Any future resource allocation change requires updating 9 locations.

Use YAML anchors (&) and aliases (*) to reduce repetition and improve maintainability.

Apply this refactor to consolidate the resource specifications:

+_default_step_override_build: &default_build
+  resources:
+    requests:
+      cpu: 2
+      memory: 4Gi
+    limits:
+      cpu: 4
+      memory: 8Gi
+
+_default_step_override_export: &default_export
+  resources:
+    requests:
+      cpu: 2
+      memory: 4Gi
+    limits:
+      cpu: 4
+      memory: 8Gi
+
 taskRunSpecs:
   - pipelineTaskName: build-online-docs-io
     stepOverrides:
-      - name: build
-        resources:
-          requests:
-            cpu: 2
-            memory: 4Gi
-          limits:
-            cpu: 4
-            memory: 8Gi
+      - name: build
+        <<: *default_build
   - pipelineTaskName: build-online-docs-cn
     stepOverrides:
-      - name: build
-        resources:
-          requests:
-            cpu: 2
-            memory: 4Gi
-          limits:
-            cpu: 4
-            memory: 8Gi
+      - name: build
+        <<: *default_build
   - pipelineTaskName: build-offline-docs
     stepOverrides:
-      - name: build
-        resources:
-          requests:
-            cpu: 2
-            memory: 4Gi
-          limits:
-            cpu: 4
-            memory: 8Gi
+      - name: build
+        <<: *default_build
   - pipelineTaskName: build-exports-docs
     stepOverrides:
-      - name: build
-        resources:
-          requests:
-            cpu: 2
-            memory: 4Gi
-          limits:
-            cpu: 4
-            memory: 8Gi
+      - name: build
+        <<: *default_build
   - pipelineTaskName: export-docs
     stepOverrides:
-      - name: export
-        resources:
-          requests:
-            cpu: 2
-            memory: 4Gi
-          limits:
-            cpu: 4
-            memory: 8Gi
+      - name: export
+        <<: *default_export
   - pipelineTaskName: build-online-docs-russian
     stepOverrides:
-      - name: build
-        resources:
-          requests:
-            cpu: 2
-            memory: 4Gi
-          limits:
-            cpu: 4
-            memory: 8Gi
+      - name: build
+        <<: *default_build
   - pipelineTaskName: build-offline-docs-russian
     stepOverrides:
-      - name: build
-        resources:
-          requests:
-            cpu: 2
-            memory: 4Gi
-          limits:
-            cpu: 4
-            memory: 8Gi
+      - name: build
+        <<: *default_build
   - pipelineTaskName: build-exports-docs-russian
     stepOverrides:
-      - name: build
-        resources:
-          requests:
-            cpu: 2
-            memory: 4Gi
-          limits:
-            cpu: 4
-            memory: 8Gi
+      - name: build
+        <<: *default_build
   - pipelineTaskName: export-docs-russian
     stepOverrides:
-      - name: export
-        resources:
-          requests:
-            cpu: 2
-            memory: 4Gi
-          limits:
-            cpu: 4
-            memory: 8Gi
+      - name: export
+        <<: *default_export

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In .builds/doc-build.yaml around lines 23-112 there is duplicated taskRunSpecs
for nine pipelineTaskName entries that only differ by pipelineTaskName and the
step name; consolidate by extracting the common stepOverrides -> resources ->
requests/limits block into a YAML anchor (e.g., &defaultResources) and reference
it with aliases (*) in each taskRunSpec so each entry only declares
pipelineTaskName and the step name, keeping the aliased resources block; ensure
stepOverrides structure remains valid (use the alias at the step level or the
resources level as appropriate) and remove the repeated requests/limits from
each entry.

@leizhuc leizhuc merged commit c3daf9b into main Nov 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants