Skip to content

Commit

Permalink
Merge branch 'master' into lint-error-return
Browse files Browse the repository at this point in the history
  • Loading branch information
chaosi-zju committed Jan 4, 2024
2 parents 93d6533 + 2deee5d commit bef4c8d
Show file tree
Hide file tree
Showing 32 changed files with 774 additions and 567 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ linters-settings:
arguments:
- preserveScope
- name: error-return
- name: error-strings
staticcheck:
checks:
- all
Expand Down
1 change: 0 additions & 1 deletion api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -17843,7 +17843,6 @@
"properties": {
"creationTimestamp": {
"description": "CreationTimestamp is a timestamp representing the server time when this object was created. Clients should not set this value to avoid the time inconsistency issue. It is represented in RFC3339 form(like '2021-04-25T10:02:10Z') and is in UTC.\n\nPopulated by the system. Read-only.",
"default": {},
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time"
},
"fromCluster": {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/adhocore/gronx v1.6.3
github.com/distribution/distribution/v3 v3.0.0-20210507173845-9329f6a62b67
github.com/distribution/reference v0.5.0
github.com/emirpasic/gods v1.18.1
github.com/evanphx/json-patch/v5 v5.6.0
github.com/go-co-op/gocron v1.30.1
Expand Down
44 changes: 2 additions & 42 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/apis/work/v1alpha2/binding_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ type GracefulEvictionTask struct {
//
// Populated by the system. Read-only.
// +optional
CreationTimestamp metav1.Time `json:"creationTimestamp,omitempty"`
CreationTimestamp *metav1.Time `json:"creationTimestamp,omitempty"`
}

// BindingSnapshot is a snapshot of a ResourceBinding or ClusterResourceBinding.
Expand Down
5 changes: 4 additions & 1 deletion pkg/apis/work/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/controllers/gracefuleviction/evictiontask.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func assessEvictionTasks(bindingSpec workv1alpha2.ResourceBindingSpec,
for _, task := range bindingSpec.GracefulEvictionTasks {
// set creation timestamp for new task
if task.CreationTimestamp.IsZero() {
task.CreationTimestamp = now
task.CreationTimestamp = &now
keptTasks = append(keptTasks, task)
continue
}
Expand Down

0 comments on commit bef4c8d

Please sign in to comment.