← Back to Pull requests

[YUNIKORN-2933] Don't add duplicated taskGroup to app #928

Closed
unknown closed this pull request without merging on Oct 29, 2024 06:41 UTC
View on GitHub
unknown unknown commented on Oct 17, 2024 07:09 UTC
Author

What is this PR for?


I think that before properly handling ph tasks with different resource specifications within the same task group, it is necessary to avoid having two task-group with the same name but different resource specifications in the app.

What type of PR is it?


[x] - Bug Fix
[ ] - Improvement
[ ] - Feature
[ ] - Documentation
[ ] - Hot Fix
[ ] - Refactoring

Todos


[ ] - Task

What is the Jira issue?


Issue associated with this PR:https://issues.apache.org/jira/browse/YUNIKORN-2933

How should this be tested?


1. Submit a taskgroup with the same name, for example:
apiVersion: batch/v1
kind: Job
metadata:
  name: gang-scheduling-job-example-1
  namespace: [namespace Name]
spec:
  completions: 2
  parallelism: 2
  template:
    metadata:
      labels:
        app: sleep
        applicationId: "gang-scheduling-job-example-1"
        queue: root.gang-example
      annotations:
        yunikorn.apache.org/task-group-name: task-group-example
        yunikorn.apache.org/task-groups: |-
          [{
              "name": "task-group-example",
              "minMember": 1,
              "minResource": {
                "cpu": "1",
                "memory": "50M"
              }
          },{
              "name": "task-group-example",
              "minMember": 2,
              "minResource": {
                "cpu": "1",
                "memory": "100M"
              }
          }]
    spec:
      schedulerName: yunikorn
      restartPolicy: Never
      containers:
        - name: sleep30
          image: "busybox:stable"
          imagePullPolicy: IfNotPresent
          command: ["sleep", "300"]
          resources:
            limits:
              cpu: "1"
              memory: "100M"

2. Observe whether only 2 ph Pods are created on K8S (kubectl -n [namespace Name] get pod -w)
NAME                                  READY   STATUS    RESTARTS   AGE
gang-scheduling-job-example-1-84ld5   0/1     Pending   0          13s
gang-scheduling-job-example-1-j9rpd   0/1     Pending   0          13s
tg-gang-scheduling-job-example--task-group-example-eu770s0adb   0/1     Pending   0          17s
tg-gang-scheduling-job-example--task-group-example-qaoxan96yt   0/1     Pending   0          17s
tg-gang-scheduling-job-example--task-group-example-eu770s0adb   0/1     Pending   0          18s
tg-gang-scheduling-job-example--task-group-example-qaoxan96yt   0/1     Pending   0          18s
tg-gang-scheduling-job-example--task-group-example-eu770s0adb   0/1     ContainerCreating   0          19s
tg-gang-scheduling-job-example--task-group-example-qaoxan96yt   0/1     ContainerCreating   0          19s
tg-gang-scheduling-job-example--task-group-example-eu770s0adb   0/1     Terminating         0          19s
tg-gang-scheduling-job-example--task-group-example-qaoxan96yt   0/1     Terminating         0          20s
tg-gang-scheduling-job-example--task-group-example-eu770s0adb   1/1     Terminating         0          20s
tg-gang-scheduling-job-example--task-group-example-qaoxan96yt   1/1     Terminating         0          21s
tg-gang-scheduling-job-example--task-group-example-eu770s0adb   0/1     Terminating         0          21s
gang-scheduling-job-example-1-84ld5                             0/1     Pending             0          49s
tg-gang-scheduling-job-example--task-group-example-eu770s0adb   0/1     Terminating         0          21s
tg-gang-scheduling-job-example--task-group-example-eu770s0adb   0/1     Terminating         0          21s
gang-scheduling-job-example-1-84ld5                             0/1     ContainerCreating   0          49s
tg-gang-scheduling-job-example--task-group-example-qaoxan96yt   0/1     Terminating         0          22s
gang-scheduling-job-example-1-j9rpd                             0/1     Pending             0          50s
tg-gang-scheduling-job-example--task-group-example-qaoxan96yt   0/1     Terminating         0          22s
tg-gang-scheduling-job-example--task-group-example-qaoxan96yt   0/1     Terminating         0          22s
gang-scheduling-job-example-1-j9rpd                             0/1     ContainerCreating   0          50s
gang-scheduling-job-example-1-84ld5                             1/1     Running             0          51s
gang-scheduling-job-example-1-j9rpd                             1/1     Running             0          52s

Screenshots (if appropriate)

Questions:


[ ] - The licenses files need update.
[ ] - There is breaking changes for older versions.
[ ] - It needs documentation.

Diff: 584 lines (+438 / -146) across 7 files Reviewer: XbaoWu Review duration: 17251m
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 584 lines diff across 7 files
0.50
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.381
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #928"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 49.9% (MEDIUM) · Higher = larger blast radius
49.9%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 19.7% · Safe to merge
19.7%