diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 81562dea..5191e7d2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,9 +19,9 @@ jobs: strategy: matrix: go-version: - - "1.23" - "1.24" - postgres-version: [16, 15] + - "1.25" + postgres-version: [17, 16, 15] fail-fast: false timeout-minutes: 5 @@ -90,7 +90,7 @@ jobs: name: Go lint runs-on: ubuntu-latest env: - GOLANGCI_LINT_VERSION: v2.2.1 + GOLANGCI_LINT_VERSION: v2.4.0 GOPROXY: https://proxy.golang.org,https://u:${{ secrets.RIVERPRO_GO_MOD_CREDENTIAL }}@riverqueue.com/goproxy,direct permissions: contents: read @@ -133,7 +133,7 @@ jobs: strategy: matrix: node-version: - - "22.14.0" + - "22.18.0" fail-fast: false timeout-minutes: 5 @@ -170,7 +170,7 @@ jobs: strategy: matrix: node-version: - - "22.14.0" + - "22.18.0" fail-fast: false timeout-minutes: 5 @@ -231,7 +231,7 @@ jobs: with: cache: "npm" cache-dependency-path: package-lock.json - node-version: "22.14.0" + node-version: "22.18.0" - name: Install dependencies run: npm install diff --git a/.github/workflows/package-and-release.yaml b/.github/workflows/package-and-release.yaml index 36ee3ca0..f2d4e545 100644 --- a/.github/workflows/package-and-release.yaml +++ b/.github/workflows/package-and-release.yaml @@ -59,7 +59,7 @@ jobs: with: cache: "npm" cache-dependency-path: package-lock.json - node-version: "22.14.0" + node-version: "22.18.0" - name: Install dependencies run: npm install diff --git a/go.mod b/go.mod index 3c01cbfb..36de7836 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module riverqueue.com/riverui -go 1.23.0 +go 1.24 -toolchain go1.24.1 +toolchain go1.24.4 require ( github.com/jackc/pgx/v5 v5.7.5 diff --git a/packager/go.mod b/packager/go.mod index 85cfbfe2..97537d57 100644 --- a/packager/go.mod +++ b/packager/go.mod @@ -2,6 +2,6 @@ module riverqueue.com/riverqueue/packager go 1.24 -toolchain go1.24.1 +toolchain go1.24.4 require golang.org/x/mod v0.18.0 diff --git a/riverproui/cmd/riverproui/main.go b/riverproui/cmd/riverproui/main.go index c709f29a..459b20fc 100644 --- a/riverproui/cmd/riverproui/main.go +++ b/riverproui/cmd/riverproui/main.go @@ -3,11 +3,12 @@ package main import ( "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" - "riverqueue.com/riverpro" - "riverqueue.com/riverpro/driver/riverpropgxv5" "riverqueue.com/riverui/internal/apibundle" "riverqueue.com/riverui/internal/riveruicmd" "riverqueue.com/riverui/riverproui" + + "riverqueue.com/riverpro" + "riverqueue.com/riverpro/driver/riverpropgxv5" ) func main() { diff --git a/riverproui/endpoints.go b/riverproui/endpoints.go index ea394604..015a251c 100644 --- a/riverproui/endpoints.go +++ b/riverproui/endpoints.go @@ -5,13 +5,15 @@ import ( "log/slog" "net/http" + "riverqueue.com/riverui" + "riverqueue.com/riverui/internal/apibundle" + "riverqueue.com/riverui/riverproui/internal/prohandler" + "github.com/riverqueue/apiframe/apiendpoint" "github.com/riverqueue/river/rivershared/baseservice" + "riverqueue.com/riverpro" prodriver "riverqueue.com/riverpro/driver" - "riverqueue.com/riverui" - "riverqueue.com/riverui/internal/apibundle" - "riverqueue.com/riverui/riverproui/internal/prohandler" ) type EndpointsOpts[TTx any] struct { diff --git a/riverproui/go.mod b/riverproui/go.mod index a7a3bfa7..63679f31 100644 --- a/riverproui/go.mod +++ b/riverproui/go.mod @@ -1,6 +1,8 @@ module riverqueue.com/riverui/riverproui -go 1.24.4 +go 1.24 + +toolchain go1.24.4 require ( github.com/google/uuid v1.6.0 diff --git a/riverproui/internal/prohandler/pro_handler_api_endpoints.go b/riverproui/internal/prohandler/pro_handler_api_endpoints.go index 165cfe1b..efce64f6 100644 --- a/riverproui/internal/prohandler/pro_handler_api_endpoints.go +++ b/riverproui/internal/prohandler/pro_handler_api_endpoints.go @@ -8,6 +8,9 @@ import ( "strconv" "time" + "riverqueue.com/riverui/internal/apibundle" + "riverqueue.com/riverui/riverproui/internal/uitype" + "github.com/riverqueue/apiframe/apiendpoint" "github.com/riverqueue/apiframe/apierror" "github.com/riverqueue/river/rivershared/util/ptrutil" @@ -16,12 +19,11 @@ import ( "riverqueue.com/riverpro" riverprodriver "riverqueue.com/riverpro/driver" - "riverqueue.com/riverui/internal/apibundle" - "riverqueue.com/riverui/riverproui/internal/uitype" ) type ProAPIBundle[TTx any] struct { apibundle.APIBundle[TTx] + Client *riverpro.Client[TTx] DB riverprodriver.ProExecutor } @@ -252,6 +254,7 @@ type riverJobMinimal struct { type riverJobSerializable struct { riverJobMinimal + Errors []rivertype.AttemptError `json:"errors"` Metadata json.RawMessage `json:"metadata"` } diff --git a/riverproui/pro_handler_test.go b/riverproui/pro_handler_test.go index eb9170d4..182d47aa 100644 --- a/riverproui/pro_handler_test.go +++ b/riverproui/pro_handler_test.go @@ -11,17 +11,17 @@ import ( "github.com/google/uuid" "github.com/jackc/pgx/v5" "github.com/stretchr/testify/require" + "riverqueue.com/riverui" + "riverqueue.com/riverui/internal/apibundle" + "riverqueue.com/riverui/internal/handlertest" + "riverqueue.com/riverui/internal/riverinternaltest" + "riverqueue.com/riverui/internal/riverinternaltest/testfactory" "github.com/riverqueue/river" "github.com/riverqueue/river/riverdriver" "riverqueue.com/riverpro" "riverqueue.com/riverpro/driver/riverpropgxv5" - "riverqueue.com/riverui" - "riverqueue.com/riverui/internal/apibundle" - "riverqueue.com/riverui/internal/handlertest" - "riverqueue.com/riverui/internal/riverinternaltest" - "riverqueue.com/riverui/internal/riverinternaltest/testfactory" ) type noOpArgs struct { @@ -93,7 +93,7 @@ func TestProHandlerIntegration(t *testing.T) { workflowID := uuid.New() _ = testfactory.Job(ctx, t, exec, &testfactory.JobOpts{Metadata: mustMarshalJSON(t, map[string]uuid.UUID{"workflow_id": workflowID})}) - makeAPICall(t, "ProducerList", http.MethodGet, fmt.Sprintf("/api/pro/producers?queue_name=%s", queue.Name), nil) + makeAPICall(t, "ProducerList", http.MethodGet, "/api/pro/producers?queue_name="+queue.Name, nil) makeAPICall(t, "WorkflowGet", http.MethodGet, fmt.Sprintf("/api/pro/workflows/%s", workflowID), nil) makeAPICall(t, "WorkflowList", http.MethodGet, "/api/pro/workflows", nil) }