-
Notifications
You must be signed in to change notification settings - Fork 17
HYPERFLEET-1108 - feat: Label all E2E-created resources with a unique run ID (DRAFT) #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,10 @@ params: | |
| source: "event.id" | ||
| type: "string" | ||
| required: true | ||
| - name: "e2eRunId" | ||
| source: "env.E2E_RUN_ID" | ||
| type: "string" | ||
| required: false | ||
|
|
||
| preconditions: | ||
| - name: "clusterStatus" | ||
|
|
@@ -49,6 +53,7 @@ resources: | |
| labels: | ||
| hyperfleet.io/cluster-id: "{{ .clusterId }}" | ||
| hyperfleet.io/cluster-name: "{{ .clusterName }}" | ||
| e2e.hyperfleet.io/run-id: "{{ .e2eRunId }}" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Unify run label key across Helm and adapter resources Line 56 uses Proposed fix- e2e.hyperfleet.io/run-id: "{{ .e2eRunId }}"
+ e2e.hyperfleet.io/run: "{{ .e2eRunId }}"Or standardize the Helm key to 🤖 Prompt for AI Agents |
||
| annotations: | ||
| hyperfleet.io/generation: "{{ .generationSpec }}" | ||
| discovery: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,11 +8,15 @@ metadata: | |
| hyperfleet.io/cluster-id: "{{ .clusterId }}" | ||
| hyperfleet.io/resource-type: "job" | ||
| app: test-job | ||
| e2e.hyperfleet.io/run-id: "{{ .e2eRunId }}" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Add run-id label on Job Pod template Line 11 labels only the Job object. Pods created by this Job are not guaranteed to carry Proposed fix spec:
backoffLimit: 0
template:
+ metadata:
+ labels:
+ e2e.hyperfleet.io/run-id: "{{ .e2eRunId }}"
spec:
restartPolicy: Never🤖 Prompt for AI Agents |
||
| annotations: | ||
| hyperfleet.io/generation: "{{ .generationSpec }}" | ||
| spec: | ||
| backoffLimit: 0 | ||
| template: | ||
| metadata: | ||
| labels: | ||
| e2e.hyperfleet.io/run-id: "{{ .e2eRunId }}" | ||
| spec: | ||
| restartPolicy: Never | ||
| containers: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Missing character validation for E2E_RUN_ID label value.
Lines 170-179 validate length (≤63 chars) but not allowed characters. Kubernetes label values must match
(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?. Invalid characters (e.g., spaces, special chars) will cause Helm deployment failure at line 218.🔒 Proposed validation fix
if (( ${`#e2e_run_id`} > 63 )); then log_error "E2E_RUN_ID '${e2e_run_id}' is ${`#e2e_run_id`} characters, exceeds the 63-character Kubernetes label value limit." return 1 fi + if [[ ! "${e2e_run_id}" =~ ^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ ]]; then + log_error "E2E_RUN_ID '${e2e_run_id}' contains invalid characters. Must match Kubernetes label value format: ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]" + return 1 + fi🤖 Prompt for AI Agents