Skip to content
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

Feat/wk/schedule v2 #94

Closed
wants to merge 3 commits into from

Conversation

Icarus9913
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Merging #94 (e1c9c7e) into main (2caa6aa) will not change coverage.
Report is 2 commits behind head on main.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #94   +/-   ##
=======================================
  Coverage   40.63%   40.63%           
=======================================
  Files           8        8           
  Lines         507      507           
=======================================
  Hits          206      206           
  Misses        296      296           
  Partials        5        5           
Flag Coverage Δ
unittests 40.63% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@Icarus9913 Icarus9913 force-pushed the feat/wk/schedule-v2 branch 11 times, most recently from 0ed7781 to 3f20485 Compare July 27, 2023 10:00
@Icarus9913 Icarus9913 force-pushed the feat/wk/schedule-v2 branch 17 times, most recently from 21403ef to 26d4a10 Compare August 2, 2023 07:21
RuntimeStatus string `json:"runtimeStatus,omitempty"`
}

const (
Copy link
Collaborator

Choose a reason for hiding this comment

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

type RuntimeStatus 给个 enum 把


if instance.Status.Resource == nil {
newScheduler := scheduler.NewScheduler(s.client, s.apiReader, KindNameNetReach, instance.Name, s.runtimeUniqueMatchLabelKey, logger)
resource, err = newScheduler.CreateTaskRuntimeIfNotExist(ctx, &instance, instance.Spec.AgentSpec)
Copy link
Collaborator

Choose a reason for hiding this comment

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

// comment: creat the resource and update to creating status

if instance.DeletionTimestamp != nil {
s.logger.Sugar().Debugf("ignore deleting task %v", req)
return ctrl.Result{}, nil
}

// create resource
Copy link
Collaborator

Choose a reason for hiding this comment

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

有好几个 kind 都 复用这段 类似的代码,是否 可抽象出函数


newRecord := NewStatusHistoryRecord(startTime, int(n+1), schedulePlan)
// add new round record
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个 函数中的这些 新增 代码, 是因为 原来的有 bug 么 ?

}
}

// let the tracker trace status
Copy link
Collaborator

@weizhoublue weizhoublue Aug 3, 2023

Choose a reason for hiding this comment

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

// comment:
// trace, will do things:
// the tracer will be asynchronous to update the resource status in the CR
//

@@ -0,0 +1,126 @@
// Copyright 2023 Authors of kdoctor-io
// SPDX-License-Identifier: Apache-2.0
Copy link
Collaborator

@weizhoublue weizhoublue Aug 3, 2023

Choose a reason for hiding this comment

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

readme.md
(1) created
(2)delete,

@weizhoublue
Copy link
Collaborator

add corresponding E2E in test/docs

@Icarus9913 Icarus9913 force-pushed the feat/wk/schedule-v2 branch 9 times, most recently from 397261a to 6583342 Compare August 4, 2023 02:20
Signed-off-by: Icarus9913 <icaruswu66@qq.com>
@Icarus9913 Icarus9913 force-pushed the feat/wk/schedule-v2 branch 3 times, most recently from 3a6437a to 4031452 Compare August 4, 2023 03:43
Signed-off-by: Icarus9913 <icaruswu66@qq.com>
Signed-off-by: Icarus9913 <icaruswu66@qq.com>
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.

2 participants