Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ on:

env:
# Common versions
GO_VERSION: '1.24.13'
GOLANGCI_VERSION: 'v1.64.8'
GO_VERSION: '1.25.8'
GOLANGCI_VERSION: 'v2.11.3'
DOCKER_BUILDX_VERSION: 'v0.23.0'

# These environment variables are important to the Crossplane CLI install.sh
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
cache: false # The golangci-lint action does its own caching.

- name: Lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: ${{ env.GOLANGCI_VERSION }}
args: --timeout=5m
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/crossplane/function-auto-ready

go 1.24.13
go 1.25.8

require (
github.com/alecthomas/kong v1.12.0
Expand Down
4 changes: 2 additions & 2 deletions healthchecks/cronjob.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ func checkCronJobHealth(obj *unstructured.Unstructured) bool {
// Check if last execution was successful
// If lastSuccessfulTime is after lastScheduleTime, the last execution succeeded
if cronJob.Status.LastSuccessfulTime != nil && cronJob.Status.LastScheduleTime != nil {
if cronJob.Status.LastSuccessfulTime.Time.After(cronJob.Status.LastScheduleTime.Time) ||
cronJob.Status.LastSuccessfulTime.Time.Equal(cronJob.Status.LastScheduleTime.Time) {
if cronJob.Status.LastSuccessfulTime.After(cronJob.Status.LastScheduleTime.Time) ||
cronJob.Status.LastSuccessfulTime.Equal(cronJob.Status.LastScheduleTime) {
return true
}
// Last execution failed
Expand Down
4 changes: 2 additions & 2 deletions healthchecks/cronjob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestCheckCronJobHealth(t *testing.T) {
"suspend": false,
},
"status": map[string]interface{}{
"lastScheduleTime": "2024-01-01T10:00:00Z",
"lastScheduleTime": "2024-01-01T10:00:00Z",
"lastSuccessfulTime": "2024-01-01T10:05:00Z",
},
},
Expand Down Expand Up @@ -73,7 +73,7 @@ func TestCheckCronJobHealth(t *testing.T) {
"suspend": false,
},
"status": map[string]interface{}{
"lastScheduleTime": "2024-01-01T10:05:00Z",
"lastScheduleTime": "2024-01-01T10:05:00Z",
"lastSuccessfulTime": "2024-01-01T10:00:00Z",
},
},
Expand Down
Loading