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
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ require (
go.opentelemetry.io/otel v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
go.uber.org/goleak v1.3.0 // indirect
golang.org/x/crypto v0.46.0 // indirect
golang.org/x/crypto v0.52.0 // indirect
golang.org/x/sync v0.21.0 // indirect
golang.org/x/sys v0.39.0 // indirect
golang.org/x/sys v0.45.0 // indirect
golang.org/x/text v0.38.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt3
go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988=
golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc=
golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM=
golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY=
golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE=
golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
8 changes: 2 additions & 6 deletions handler_api_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,7 @@ func TestAPIHandlerFeaturesGet(t *testing.T) {
// DisableSchemaSharing is required because we're making DB schema changes.
endpoint, bundle := setupEndpointWithOpts(ctx, t, newFeaturesGetEndpoint, &riverdbtest.TestTxOpts{DisableSchemaSharing: true})

_, err := bundle.tx.Exec(ctx, `DROP TABLE IF EXISTS river_client CASCADE;`)
require.NoError(t, err)
_, err = bundle.tx.Exec(ctx, `DROP TABLE IF EXISTS river_job_sequence;`)
_, err := bundle.tx.Exec(ctx, `DROP TABLE IF EXISTS river_job_sequence;`)
require.NoError(t, err)
_, err = bundle.tx.Exec(ctx, `DROP TABLE IF EXISTS river_producer;`)
require.NoError(t, err)
Expand All @@ -270,9 +268,7 @@ func TestAPIHandlerFeaturesGet(t *testing.T) {
// DisableSchemaSharing is required because we're making DB schema changes.
endpoint, bundle := setupEndpointWithOpts(ctx, t, newFeaturesGetEndpoint, &riverdbtest.TestTxOpts{DisableSchemaSharing: true})

_, err := bundle.tx.Exec(ctx, `CREATE TABLE IF NOT EXISTS river_client (id SERIAL PRIMARY KEY);`)
require.NoError(t, err)
_, err = bundle.tx.Exec(ctx, `CREATE TABLE IF NOT EXISTS river_job_sequence (id SERIAL PRIMARY KEY);`)
_, err := bundle.tx.Exec(ctx, `CREATE TABLE IF NOT EXISTS river_job_sequence (id SERIAL PRIMARY KEY);`)
require.NoError(t, err)
_, err = bundle.tx.Exec(ctx, `CREATE TABLE IF NOT EXISTS river_producer (id SERIAL PRIMARY KEY);`)
require.NoError(t, err)
Expand Down
9 changes: 0 additions & 9 deletions riverproui/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,6 @@ func (e *endpoints[TTx]) Extensions(ctx context.Context) (map[string]bool, error
}
defer execTx.Rollback(ctx)

hasClientTable, err := execTx.TableExists(ctx, &riverdriver.TableExistsParams{
Schema: schema,
Table: "river_client",
})
if err != nil {
return nil, err
}

hasPeriodicJobTable, err := execTx.TableExists(ctx, &riverdriver.TableExistsParams{
Schema: schema,
Table: "river_periodic_job",
Expand Down Expand Up @@ -131,7 +123,6 @@ func (e *endpoints[TTx]) Extensions(ctx context.Context) (map[string]bool, error
"durable_periodic_jobs": hasPeriodicJobTable,
"producer_queries": true,
"workflow_queries": hasWorkflowV2Tables,
"has_client_table": hasClientTable,
"has_producer_table": hasProducerTable,
"has_sequence_table": hasSequenceTable,
}, nil
Expand Down
30 changes: 0 additions & 30 deletions riverproui/endpoints_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,36 +95,6 @@ func TestProEndpointsExtensions(t *testing.T) {
})
})

t.Run("ClientTableDetection", func(t *testing.T) { //nolint:dupl
t.Parallel()

t.Run("NoClientTable", func(t *testing.T) {
t.Parallel()

bundle := setup(ctx, t)

_, err := bundle.tx.Exec(ctx, `DROP TABLE IF EXISTS river_client CASCADE;`)
require.NoError(t, err)

ext, err := bundle.endpoint.Extensions(ctx)
require.NoError(t, err)
require.False(t, ext["has_client_table"])
})

t.Run("WithClientTable", func(t *testing.T) {
t.Parallel()

bundle := setup(ctx, t)

_, err := bundle.tx.Exec(ctx, `CREATE TABLE IF NOT EXISTS river_client (id SERIAL PRIMARY KEY);`)
require.NoError(t, err)

ext, err := bundle.endpoint.Extensions(ctx)
require.NoError(t, err)
require.True(t, ext["has_client_table"])
})
})

t.Run("ProducerTableDetection", func(t *testing.T) { //nolint:dupl
t.Parallel()

Expand Down
1 change: 0 additions & 1 deletion riverproui/pro_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ func TestProMountedEndpointResponses(t *testing.T) {
// Static flags always true; dynamic flags should also be true because pro migrations run for tests
expectedExtensions := map[string]bool{
"durable_periodic_jobs": true, // dynamic
"has_client_table": true, // dynamic
"has_producer_table": true, // dynamic
"has_sequence_table": true, // dynamic
"producer_queries": true, // static
Expand Down
1 change: 0 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const router = createRouter({
basepath: getBasePath(),
context: {
features: {
hasClientTable: false,
hasProducerTable: false,
producerQueries: false,
workflowQueries: false,
Expand Down
1 change: 0 additions & 1 deletion src/components/WorkflowDetail.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ vi.mock("@components/workflow-diagram/WorkflowDiagram", () => ({

const features: Features = {
durablePeriodicJobs: false,
hasClientTable: false,
hasProducerTable: true,
hasSequenceTable: false,
jobListHideArgsByDefault: false,
Expand Down
4 changes: 0 additions & 4 deletions src/services/features.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ describe("apiFeaturesToFeatures", () => {
const apiFeatures = {
extensions: {
durable_periodic_jobs: true,
has_client_table: true,
has_producer_table: true,
producer_queries: true,
workflow_queries: true,
Expand All @@ -17,7 +16,6 @@ describe("apiFeaturesToFeatures", () => {

const expected = {
durablePeriodicJobs: true,
hasClientTable: true,
hasProducerTable: true,
hasSequenceTable: false,
jobListHideArgsByDefault: true,
Expand All @@ -32,7 +30,6 @@ describe("apiFeaturesToFeatures", () => {
const apiFeatures = {
extensions: {
durable_periodic_jobs: false,
has_client_table: false,
has_producer_table: false,
producer_queries: false,
workflow_queries: false,
Expand All @@ -42,7 +39,6 @@ describe("apiFeaturesToFeatures", () => {

const expected = {
durablePeriodicJobs: false,
hasClientTable: false,
hasProducerTable: false,
hasSequenceTable: false,
jobListHideArgsByDefault: false,
Expand Down
1 change: 0 additions & 1 deletion src/services/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const KNOWN_EXTENSIONS = [
"durable_periodic_jobs",
"producer_queries",
"workflow_queries",
"has_client_table",
"has_producer_table",
"has_sequence_table",
] as const;
Expand Down
1 change: 0 additions & 1 deletion src/test/utils/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export const createFeatures = (
overrides: Partial<Features> = {},
): Features => ({
durablePeriodicJobs: false,
hasClientTable: false,
hasProducerTable: false,
hasSequenceTable: false,
jobListHideArgsByDefault: false,
Expand Down
Loading