feat: ec pipeline supports large snapshot specs#3124
feat: ec pipeline supports large snapshot specs#3124kasemAlem wants to merge 1 commit intoconforma:mainfrom
Conversation
Review Summary by QodoEC pipeline supports large snapshot specs via custom resources
WalkthroughsDescription• Support custom resource names as snapshot input in EC pipeline • Fetch snapshot from Kubernetes cluster when valid CR name provided • Validate CR names against Kubernetes DNS label rules (≤63 chars, lowercase) • Maintain backward compatibility with file path and literal content handling Diagramflowchart LR
A["SNAPSHOT input"] --> B{"Is file path?"}
B -->|Yes| C["Copy file to working snapshot"]
B -->|No| D{"Valid CR name?"}
D -->|Yes| E["Fetch CR from cluster with kubectl"]
D -->|No| F["Treat as literal content"]
E --> G["Store JSON in working snapshot"]
C --> H["Process with jq"]
F --> H
G --> H
File Changes1. hack/reduce-snapshot.sh
|
Code Review by Qodo
1. kubectl get args mismatch
|
a857a1e to
d015248
Compare
|
/retest |
|
/review |
PR Reviewer Guide 🔍(Review updated until commit af824d7)Here are some key observations to aid the review process:
|
d015248 to
cd9a62b
Compare
|
/review |
|
Persistent review updated to latest commit cd9a62b |
cd9a62b to
941d23c
Compare
|
/review |
|
Persistent review updated to latest commit 941d23c |
941d23c to
af824d7
Compare
|
/review |
|
Persistent review updated to latest commit af824d7 |
When SNAPSHOT is not a file path, treat it as a custom resource name if it matches Kubernetes DNS label rules (lowercase, digits, hyphens, ≤63 chars). In that case fetch the resource with kubectl get and use its JSON as the working snapshot; otherwise keep the previous behavior of writing SNAPSHOT literally to the working file. Signed-off-by: Kasem Alem <kalem@redhat.com>
af824d7 to
e89f999
Compare
|
We intentionally do not pass -n so the fetch uses the current kubectl context. In Tekton the task runs in the pipeline namespace; locally the context is the workspace. The script comments have been updated to document this so the intended namespace (context namespace) is explicit. |
Modify script to enable snapshots with large specs
STONEINTG-1470